From f66eeb3b19209be43cef35beb9b4efb62cf4a9d8 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sun, 20 Oct 2024 20:55:31 +0900 Subject: [PATCH] rename --- locales/index.d.ts | 8 ++++---- locales/ja-JP.yml | 8 ++++---- .../1729333924409-signinRequiredForShowContents.js | 4 ++-- packages/backend/src/core/WebhookTestService.ts | 2 +- .../src/core/activitypub/ApRendererService.ts | 2 +- .../backend/src/core/activitypub/misc/contexts.ts | 2 +- .../src/core/activitypub/models/ApPersonService.ts | 2 +- packages/backend/src/core/activitypub/type.ts | 2 +- .../backend/src/core/entities/NoteEntityService.ts | 2 +- .../backend/src/core/entities/UserEntityService.ts | 2 +- packages/backend/src/models/User.ts | 2 +- packages/backend/src/models/json-schema/user.ts | 2 +- .../backend/src/server/api/endpoints/i/update.ts | 4 ++-- .../backend/src/server/api/endpoints/notes/show.ts | 2 +- .../backend/src/server/web/ClientServerService.ts | 2 +- packages/frontend/src/pages/settings/privacy.vue | 14 +++++++------- packages/misskey-js/src/autogen/types.ts | 4 ++-- 17 files changed, 32 insertions(+), 32 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 583004b37e..95891544f2 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -5198,19 +5198,19 @@ export interface Locale extends ILocale { /** * コンテンツの表示にログインを必須にする */ - "signinRequiredForShowContents": string; + "requireSigninToViewContents": string; /** * あなたが作成した全てのノートなどのコンテンツを表示するのにログインを必須にします。クローラーから情報を収集されるのを防ぐ効果が期待できます。 */ - "signinRequiredForShowContentsDescription1": string; + "requireSigninToViewContentsDescription1": string; /** * URLプレビュー(OGP)、Webページへの埋め込み、ノートの引用に対応していないサーバーからの表示も不可になります。 */ - "signinRequiredForShowContentsDescription2": string; + "requireSigninToViewContentsDescription2": string; /** * リモートサーバーに連合されたコンテンツにはこれらの制限は適用されません。 */ - "signinRequiredForShowContentsDescription3": string; + "requireSigninToViewContentsDescription3": string; }; "_abuseUserReport": { /** diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 2bf0bdd365..3235750883 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1296,10 +1296,10 @@ yourNameContainsProhibitedWordsDescription: "名前に禁止されている文 thisContentsAreMarkedAsSigninRequiredByAuthor: "このコンテンツの閲覧にはログインが必要と作者によって設定されています" _accountSettings: - signinRequiredForShowContents: "コンテンツの表示にログインを必須にする" - signinRequiredForShowContentsDescription1: "あなたが作成した全てのノートなどのコンテンツを表示するのにログインを必須にします。クローラーから情報を収集されるのを防ぐ効果が期待できます。" - signinRequiredForShowContentsDescription2: "URLプレビュー(OGP)、Webページへの埋め込み、ノートの引用に対応していないサーバーからの表示も不可になります。" - signinRequiredForShowContentsDescription3: "リモートサーバーに連合されたコンテンツにはこれらの制限は適用されません。" + requireSigninToViewContents: "コンテンツの表示にログインを必須にする" + requireSigninToViewContentsDescription1: "あなたが作成した全てのノートなどのコンテンツを表示するのにログインを必須にします。クローラーから情報を収集されるのを防ぐ効果が期待できます。" + requireSigninToViewContentsDescription2: "URLプレビュー(OGP)、Webページへの埋め込み、ノートの引用に対応していないサーバーからの表示も不可になります。" + requireSigninToViewContentsDescription3: "リモートサーバーに連合されたコンテンツにはこれらの制限は適用されません。" _abuseUserReport: forward: "転送" diff --git a/packages/backend/migration/1729333924409-signinRequiredForShowContents.js b/packages/backend/migration/1729333924409-signinRequiredForShowContents.js index bf77dd0daa..5d4d1fcce2 100644 --- a/packages/backend/migration/1729333924409-signinRequiredForShowContents.js +++ b/packages/backend/migration/1729333924409-signinRequiredForShowContents.js @@ -7,10 +7,10 @@ export class SigninRequiredForShowContents1729333924409 { name = 'SigninRequiredForShowContents1729333924409' async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "signinRequiredForShowContents" boolean NOT NULL DEFAULT false`); + await queryRunner.query(`ALTER TABLE "user" ADD "requireSigninToViewContents" boolean NOT NULL DEFAULT false`); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "signinRequiredForShowContents"`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "requireSigninToViewContents"`); } } diff --git a/packages/backend/src/core/WebhookTestService.ts b/packages/backend/src/core/WebhookTestService.ts index 92dcb95c1e..254d961040 100644 --- a/packages/backend/src/core/WebhookTestService.ts +++ b/packages/backend/src/core/WebhookTestService.ts @@ -83,7 +83,7 @@ function generateDummyUser(override?: Partial): MiUser { isExplorable: true, isHibernated: false, isDeleted: false, - signinRequiredForShowContents: false, + requireSigninToViewContents: false, emojis: [], score: 0, host: null, diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index e867b18c46..8235d7ba30 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -495,7 +495,7 @@ export class ApRendererService { summary: profile.description ? this.mfmService.toHtml(mfm.parse(profile.description)) : null, _misskey_summary: profile.description, _misskey_followedMessage: profile.followedMessage, - _misskey_signinRequiredForShowContents: user.signinRequiredForShowContents, + _misskey_requireSigninToViewContents: user.requireSigninToViewContents, icon: avatar ? this.renderImage(avatar) : null, image: banner ? this.renderImage(banner) : null, tag, diff --git a/packages/backend/src/core/activitypub/misc/contexts.ts b/packages/backend/src/core/activitypub/misc/contexts.ts index c909cb9d6c..447f7ef3db 100644 --- a/packages/backend/src/core/activitypub/misc/contexts.ts +++ b/packages/backend/src/core/activitypub/misc/contexts.ts @@ -555,7 +555,7 @@ const extension_context_definition = { '_misskey_votes': 'misskey:_misskey_votes', '_misskey_summary': 'misskey:_misskey_summary', '_misskey_followedMessage': 'misskey:_misskey_followedMessage', - '_misskey_signinRequiredForShowContents': 'misskey:_misskey_signinRequiredForShowContents', + '_misskey_requireSigninToViewContents': 'misskey:_misskey_requireSigninToViewContents', 'isCat': 'misskey:isCat', // vcard vcard: 'http://www.w3.org/2006/vcard/ns#', diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index 568d90118a..c7915ed94f 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -356,7 +356,7 @@ export class ApPersonService implements OnModuleInit { tags, isBot, isCat: (person as any).isCat === true, - signinRequiredForShowContents: (person as any).signinRequiredForShowContents === true, + requireSigninToViewContents: (person as any).requireSigninToViewContents === true, emojis, })) as MiRemoteUser; diff --git a/packages/backend/src/core/activitypub/type.ts b/packages/backend/src/core/activitypub/type.ts index 0bea5c0040..8a860335fa 100644 --- a/packages/backend/src/core/activitypub/type.ts +++ b/packages/backend/src/core/activitypub/type.ts @@ -14,7 +14,7 @@ export interface IObject { summary?: string; _misskey_summary?: string; _misskey_followedMessage?: string | null; - _misskey_signinRequiredForShowContents?: boolean; + _misskey_requireSigninToViewContents?: boolean; published?: string; cc?: ApObject; to?: ApObject; diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index 22e3263c9f..62016936a2 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -149,7 +149,7 @@ export class NoteEntityService implements OnModuleInit { } } - if (packedNote.user.signinRequiredForShowContents && meId == null) { + if (packedNote.user.requireSigninToViewContents && meId == null) { hide = true; } diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 9c62f4e425..747ffc780f 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -490,7 +490,7 @@ export class UserEntityService implements OnModuleInit { }))) : [], isBot: user.isBot, isCat: user.isCat, - signinRequiredForShowContents: user.signinRequiredForShowContents === false ? undefined : true, + requireSigninToViewContents: user.requireSigninToViewContents === false ? undefined : true, instance: user.host ? this.federatedInstanceService.federatedInstanceCache.fetch(user.host).then(instance => instance ? { name: instance.name, softwareName: instance.softwareName, diff --git a/packages/backend/src/models/User.ts b/packages/backend/src/models/User.ts index a2affb698f..6fcff77854 100644 --- a/packages/backend/src/models/User.ts +++ b/packages/backend/src/models/User.ts @@ -205,7 +205,7 @@ export class MiUser { @Column('boolean', { default: false, }) - public signinRequiredForShowContents: boolean; + public requireSigninToViewContents: boolean; // アカウントが削除されたかどうかのフラグだが、完全に削除される際は物理削除なので実質削除されるまでの「削除が進行しているかどうか」のフラグ @Column('boolean', { diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index 8e0d8440a9..817f8e9292 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -115,7 +115,7 @@ export const packedUserLiteSchema = { type: 'boolean', nullable: false, optional: true, }, - signinRequiredForShowContents: { + requireSigninToViewContents: { type: 'boolean', nullable: false, optional: true, }, diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 3ae3f9160b..6680c96f3f 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -179,7 +179,7 @@ export const paramDef = { autoAcceptFollowed: { type: 'boolean' }, noCrawle: { type: 'boolean' }, preventAiLearning: { type: 'boolean' }, - signinRequiredForShowContents: { type: 'boolean' }, + requireSigninToViewContents: { type: 'boolean' }, isBot: { type: 'boolean' }, isCat: { type: 'boolean' }, injectFeaturedNote: { type: 'boolean' }, @@ -335,7 +335,7 @@ export default class extends Endpoint { // eslint- if (typeof ps.autoAcceptFollowed === 'boolean') profileUpdates.autoAcceptFollowed = ps.autoAcceptFollowed; if (typeof ps.noCrawle === 'boolean') profileUpdates.noCrawle = ps.noCrawle; if (typeof ps.preventAiLearning === 'boolean') profileUpdates.preventAiLearning = ps.preventAiLearning; - if (typeof ps.signinRequiredForShowContents === 'boolean') updates.signinRequiredForShowContents = ps.signinRequiredForShowContents; + if (typeof ps.requireSigninToViewContents === 'boolean') updates.requireSigninToViewContents = ps.requireSigninToViewContents; if (typeof ps.isCat === 'boolean') updates.isCat = ps.isCat; if (typeof ps.injectFeaturedNote === 'boolean') profileUpdates.injectFeaturedNote = ps.injectFeaturedNote; if (typeof ps.receiveAnnouncementEmail === 'boolean') profileUpdates.receiveAnnouncementEmail = ps.receiveAnnouncementEmail; diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index e841a3b102..11839bce36 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -55,7 +55,7 @@ export default class extends Endpoint { // eslint- throw err; }); - if (note.user!.signinRequiredForShowContents && me == null) { + if (note.user!.requireSigninToViewContents && me == null) { throw new ApiError(meta.errors.signinRequired); } diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 2fd5fbd397..4860ef3e12 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -609,7 +609,7 @@ export class ClientServerService { relations: ['user'], }); - if (note && !note.user!.signinRequiredForShowContents) { + if (note && !note.user!.requireSigninToViewContents) { const _note = await this.noteEntityService.pack(note); const profile = await this.userProfilesRepository.findOneByOrFail({ userId: note.userId }); reply.header('Cache-Control', 'public, max-age=15'); diff --git a/packages/frontend/src/pages/settings/privacy.vue b/packages/frontend/src/pages/settings/privacy.vue index e49734812c..88fb784ae3 100644 --- a/packages/frontend/src/pages/settings/privacy.vue +++ b/packages/frontend/src/pages/settings/privacy.vue @@ -43,12 +43,12 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.makeExplorable }} - - {{ i18n.ts._accountSettings.signinRequiredForShowContents }}{{ i18n.ts.beta }} + + {{ i18n.ts._accountSettings.requireSigninToViewContents }}{{ i18n.ts.beta }} @@ -98,7 +98,7 @@ const autoAcceptFollowed = ref($i.autoAcceptFollowed); const noCrawle = ref($i.noCrawle); const preventAiLearning = ref($i.preventAiLearning); const isExplorable = ref($i.isExplorable); -const signinRequiredForShowContents = ref($i.signinRequiredForShowContents ?? false); +const requireSigninToViewContents = ref($i.requireSigninToViewContents ?? false); const hideOnlineStatus = ref($i.hideOnlineStatus); const publicReactions = ref($i.publicReactions); const followingVisibility = ref($i.followingVisibility); @@ -116,7 +116,7 @@ function save() { noCrawle: !!noCrawle.value, preventAiLearning: !!preventAiLearning.value, isExplorable: !!isExplorable.value, - signinRequiredForShowContents: !!signinRequiredForShowContents.value, + requireSigninToViewContents: !!requireSigninToViewContents.value, hideOnlineStatus: !!hideOnlineStatus.value, publicReactions: !!publicReactions.value, followingVisibility: followingVisibility.value, diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index d31a30b524..8f84aa37ff 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3736,7 +3736,7 @@ export type components = { }[]; isBot?: boolean; isCat?: boolean; - signinRequiredForShowContents?: boolean; + requireSigninToViewContents?: boolean; instance?: { name: string | null; softwareName: string | null; @@ -19845,7 +19845,7 @@ export type operations = { autoAcceptFollowed?: boolean; noCrawle?: boolean; preventAiLearning?: boolean; - signinRequiredForShowContents?: boolean; + requireSigninToViewContents?: boolean; isBot?: boolean; isCat?: boolean; injectFeaturedNote?: boolean;