From ed39bb1f14398fe865213ccc2a74222c6b9fc965 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 30 Sep 2023 02:04:24 +0900 Subject: [PATCH 01/10] =?UTF-8?q?=E9=81=8B=E5=96=B6=E8=80=85=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=83=BB=E3=83=97=E3=83=A9=E3=82=A4=E3=83=90=E3=82=B7?= =?UTF-8?q?=E3=83=BC=E3=83=9D=E3=83=AA=E3=82=B7=E3=83=BC=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=AF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 3 +++ locales/ja-JP.yml | 3 +++ .../migration/1696003580220-AddSomeUrls.js | 15 +++++++++++ packages/backend/src/models/Meta.ts | 12 +++++++++ .../src/server/api/endpoints/admin/meta.ts | 2 ++ .../server/api/endpoints/admin/update-meta.ts | 10 +++++++ .../backend/src/server/api/endpoints/meta.ts | 2 ++ .../src/components/MkSignupDialog.rules.vue | 27 ++++++++++++++++++- .../src/components/MkVisitorDashboard.vue | 20 +++++++++++++- packages/frontend/src/pages/about.vue | 2 ++ .../frontend/src/pages/admin/moderation.vue | 8 ++++++ .../frontend/src/pages/admin/settings.vue | 9 +++++++ packages/frontend/src/ui/_common_/common.ts | 20 +++++++++++++- packages/misskey-js/src/entities.ts | 2 ++ 14 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 packages/backend/migration/1696003580220-AddSomeUrls.js diff --git a/locales/index.d.ts b/locales/index.d.ts index 15736f6994af..3e0b2e61bc13 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1129,6 +1129,9 @@ export interface Locale { "notificationRecieveConfig": string; "mutualFollow": string; "fileAttachedOnly": string; + "impressum": string; + "impressumDescription": string; + "privacyPolicy": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index dcdff1b317fd..392bfe870b6e 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1126,6 +1126,9 @@ edited: "編集済み" notificationRecieveConfig: "通知の受信設定" mutualFollow: "相互フォロー" fileAttachedOnly: "ファイル付きのみ" +impressum: "運営者情報" +impressumDescription: "ドイツなどの一部の国と地域では表示が義務付けられています(Impressum)。" +privacyPolicy: "プライバシーポリシー" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/backend/migration/1696003580220-AddSomeUrls.js b/packages/backend/migration/1696003580220-AddSomeUrls.js new file mode 100644 index 000000000000..803c4c23af64 --- /dev/null +++ b/packages/backend/migration/1696003580220-AddSomeUrls.js @@ -0,0 +1,15 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +export class AddSomeUrls1696003580220 { + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" ADD "impressumUrl" character varying(1024)`); + await queryRunner.query(`ALTER TABLE "meta" ADD "privacyPolicyUrl" character varying(1024)`); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "impressumUrl"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "privacyPolicyUrl"`); + } +} diff --git a/packages/backend/src/models/Meta.ts b/packages/backend/src/models/Meta.ts index e69bef8e9845..9ae2d1c28e62 100644 --- a/packages/backend/src/models/Meta.ts +++ b/packages/backend/src/models/Meta.ts @@ -335,6 +335,18 @@ export class MiMeta { }) public feedbackUrl: string | null; + @Column('varchar', { + length: 1024, + nullable: true, + }) + public impressumUrl: string | null; + + @Column('varchar', { + length: 1024, + nullable: true, + }) + public privacyPolicyUrl: string | null; + @Column('varchar', { length: 8192, nullable: true, diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index c3ba07cdd086..238197bee4f4 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -328,6 +328,8 @@ export default class extends Endpoint { // eslint- tosUrl: instance.termsOfServiceUrl, repositoryUrl: instance.repositoryUrl, feedbackUrl: instance.feedbackUrl, + impressumUrl: instance.impressumUrl, + privacyPolicyUrl: instance.privacyPolicyUrl, disableRegistration: instance.disableRegistration, emailRequiredForSignup: instance.emailRequiredForSignup, enableHcaptcha: instance.enableHcaptcha, diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index ea6ebdd1fe1a..b14eb62566d2 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -86,6 +86,8 @@ export const paramDef = { tosUrl: { type: 'string', nullable: true }, repositoryUrl: { type: 'string' }, feedbackUrl: { type: 'string' }, + impressumUrl: { type: 'string' }, + privacyPolicyUrl: { type: 'string' }, useObjectStorage: { type: 'boolean' }, objectStorageBaseUrl: { type: 'string', nullable: true }, objectStorageBucket: { type: 'string', nullable: true }, @@ -341,6 +343,14 @@ export default class extends Endpoint { // eslint- set.feedbackUrl = ps.feedbackUrl; } + if (ps.impressumUrl !== undefined) { + set.impressumUrl = ps.impressumUrl; + } + + if (ps.privacyPolicyUrl !== undefined) { + set.privacyPolicyUrl = ps.privacyPolicyUrl; + } + if (ps.useObjectStorage !== undefined) { set.useObjectStorage = ps.useObjectStorage; } diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index fa6486ed1834..ee8002bfba6f 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -299,6 +299,8 @@ export default class extends Endpoint { // eslint- tosUrl: instance.termsOfServiceUrl, repositoryUrl: instance.repositoryUrl, feedbackUrl: instance.feedbackUrl, + impressumUrl: instance.impressumUrl, + privacyPolicyUrl: instance.privacyPolicyUrl, disableRegistration: instance.disableRegistration, emailRequiredForSignup: instance.emailRequiredForSignup, enableHcaptcha: instance.enableHcaptcha, diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index aa4a184d7b88..e196cc67f3da 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -39,6 +39,15 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.agree }} + + + + + {{ i18n.ts.privacyPolicy }} + + {{ i18n.ts.agree }} + + @@ -71,13 +80,15 @@ import * as os from '@/os.js'; const availableServerRules = instance.serverRules.length > 0; const availableTos = instance.tosUrl != null; +const availablePrivacyPolicy = instance.privacyPolicyUrl != null; const agreeServerRules = ref(false); const agreeTos = ref(false); +const agreePrivacyPolicy = ref(false); const agreeNote = ref(false); const agreed = computed(() => { - return (!availableServerRules || agreeServerRules.value) && (!availableTos || agreeTos.value) && agreeNote.value; + return (!availableServerRules || agreeServerRules.value) && (!availableTos || agreeTos.value) && (!availablePrivacyPolicy || agreePrivacyPolicy.value) && agreeNote.value; }); const emit = defineEmits<{ @@ -113,6 +124,20 @@ async function updateAgreeTos(v: boolean) { } } +async function updateAgreePrivacyPolicy(v: boolean) { + if (v) { + const confirm = await os.confirm({ + type: 'question', + title: i18n.ts.doYouAgree, + text: i18n.t('iHaveReadXCarefullyAndAgree', { x: i18n.ts.privacyPolicy }), + }); + if (confirm.canceled) return; + agreePrivacyPolicy.value = true; + } else { + agreePrivacyPolicy.value = false; + } +} + async function updateAgreeNote(v: boolean) { if (v) { const confirm = await os.confirm({ diff --git a/packages/frontend/src/components/MkVisitorDashboard.vue b/packages/frontend/src/components/MkVisitorDashboard.vue index e4520bbb2d4a..40493a5d067a 100644 --- a/packages/frontend/src/components/MkVisitorDashboard.vue +++ b/packages/frontend/src/components/MkVisitorDashboard.vue @@ -104,7 +104,25 @@ function showMenu(ev) { action: () => { os.pageWindow('/about-misskey'); }, - }, null, { + }, null, (instance.impressumUrl) ? { + text: i18n.ts.impressum, + icon: 'ti ti-file-invoice', + action: () => { + window.open(instance.impressumUrl, '_blank'); + }, + } : undefined, (instance.tosUrl) ? { + text: i18n.ts.termsOfService, + icon: 'ti ti-notebook', + action: () => { + window.open(instance.tosUrl, '_blank'); + }, + } : undefined, (instance.privacyPolicyUrl) ? { + text: i18n.ts.privacyPolicy, + icon: 'ti ti-shield-lock', + action: () => { + window.open(instance.privacyPolicyUrl, '_blank'); + }, + } : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : null, { text: i18n.ts.help, icon: 'ti ti-help-circle', action: () => { diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 02768b077406..99bc1c003faf 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -53,7 +53,9 @@ SPDX-License-Identifier: AGPL-3.0-only
  • + {{ i18n.ts.impressum }} {{ i18n.ts.termsOfService }} + {{ i18n.ts.privacyPolicy }} diff --git a/packages/frontend/src/pages/admin/moderation.vue b/packages/frontend/src/pages/admin/moderation.vue index 46f92729e816..ce914fae8acd 100644 --- a/packages/frontend/src/pages/admin/moderation.vue +++ b/packages/frontend/src/pages/admin/moderation.vue @@ -25,6 +25,11 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + @@ -69,6 +74,7 @@ let emailRequiredForSignup: boolean = $ref(false); let sensitiveWords: string = $ref(''); let preservedUsernames: string = $ref(''); let tosUrl: string | null = $ref(null); +let privacyPolicyUrl: string | null = $ref(null); async function init() { const meta = await os.api('admin/meta'); @@ -77,6 +83,7 @@ async function init() { sensitiveWords = meta.sensitiveWords.join('\n'); preservedUsernames = meta.preservedUsernames.join('\n'); tosUrl = meta.tosUrl; + privacyPolicyUrl = meta.privacyPolicyUrl; } function save() { @@ -84,6 +91,7 @@ function save() { disableRegistration: !enableRegistration, emailRequiredForSignup, tosUrl, + privacyPolicyUrl, sensitiveWords: sensitiveWords.split('\n'), preservedUsernames: preservedUsernames.split('\n'), }).then(() => { diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue index f93678d72802..60ea8bb9801c 100644 --- a/packages/frontend/src/pages/admin/settings.vue +++ b/packages/frontend/src/pages/admin/settings.vue @@ -34,6 +34,12 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + @@ -127,6 +133,7 @@ let shortName: string | null = $ref(null); let description: string | null = $ref(null); let maintainerName: string | null = $ref(null); let maintainerEmail: string | null = $ref(null); +let impressumUrl: string | null = $ref(null); let pinnedUsers: string = $ref(''); let cacheRemoteFiles: boolean = $ref(false); let cacheRemoteSensitiveFiles: boolean = $ref(false); @@ -143,6 +150,7 @@ async function init(): Promise { description = meta.description; maintainerName = meta.maintainerName; maintainerEmail = meta.maintainerEmail; + impressumUrl = meta.impressumUrl; pinnedUsers = meta.pinnedUsers.join('\n'); cacheRemoteFiles = meta.cacheRemoteFiles; cacheRemoteSensitiveFiles = meta.cacheRemoteSensitiveFiles; @@ -160,6 +168,7 @@ function save(): void { description, maintainerName, maintainerEmail, + impressumUrl, pinnedUsers: pinnedUsers.split('\n'), cacheRemoteFiles, cacheRemoteSensitiveFiles, diff --git a/packages/frontend/src/ui/_common_/common.ts b/packages/frontend/src/ui/_common_/common.ts index ca4a71a67f0f..e075e05db367 100644 --- a/packages/frontend/src/ui/_common_/common.ts +++ b/packages/frontend/src/ui/_common_/common.ts @@ -68,7 +68,25 @@ export function openInstanceMenu(ev: MouseEvent) { text: i18n.ts.manageCustomEmojis, icon: 'ti ti-icons', } : undefined], - }, null, { + }, null, (instance.impressumUrl) ? { + text: i18n.ts.impressum, + icon: 'ti ti-file-invoice', + action: () => { + window.open(instance.impressumUrl, '_blank'); + }, + } : undefined, (instance.tosUrl) ? { + text: i18n.ts.termsOfService, + icon: 'ti ti-notebook', + action: () => { + window.open(instance.tosUrl, '_blank'); + }, + } : undefined, (instance.privacyPolicyUrl) ? { + text: i18n.ts.privacyPolicy, + icon: 'ti ti-shield-lock', + action: () => { + window.open(instance.privacyPolicyUrl, '_blank'); + }, + } : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : null, { text: i18n.ts.help, icon: 'ti ti-help-circle', action: () => { diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index e6bac2a5f46f..29f9291a3462 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -323,6 +323,8 @@ export type LiteInstanceMetadata = { tosUrl: string | null; repositoryUrl: string; feedbackUrl: string; + impressumUrl: string | null; + privacyPolicyUrl: string | null; disableRegistration: boolean; disableLocalTimeline: boolean; disableGlobalTimeline: boolean; From 004959ae879e610d73e46f8fadc852a1d0a883ee Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 30 Sep 2023 02:05:58 +0900 Subject: [PATCH 02/10] Update Changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 698b4aceadf8..a67f412fb063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ --> +## next + +### General +- Feat: プライバシーポリシー・運営者情報(Impressum)の指定が可能になりました + - プライバシーポリシーはサーバー登録時に同意確認が入ります + ## 2023.9.2 ### General From 764d3b2fd0df84e75acb3023eed495b2548b7839 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 30 Sep 2023 02:22:16 +0900 Subject: [PATCH 03/10] Run api extractor --- packages/misskey-js/etc/misskey-js.api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index f0fc47c2073e..335d237ce928 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -2412,6 +2412,8 @@ type LiteInstanceMetadata = { tosUrl: string | null; repositoryUrl: string; feedbackUrl: string; + impressumUrl: string | null; + privacyPolicyUrl: string | null; disableRegistration: boolean; disableLocalTimeline: boolean; disableGlobalTimeline: boolean; @@ -2983,7 +2985,7 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u // src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts // src/api.types.ts:631:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts // src/entities.ts:107:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts -// src/entities.ts:595:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts +// src/entities.ts:597:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts // src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) From 384afaa1b570e1581affd616cc439e0a6bdcc229 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 30 Sep 2023 15:26:01 +0900 Subject: [PATCH 04/10] =?UTF-8?q?=E3=83=97=E3=83=A9=E3=82=A4=E3=83=90?= =?UTF-8?q?=E3=82=B7=E3=83=BC=E3=83=9D=E3=83=AA=E3=82=B7=E3=83=BC=E3=83=BB?= =?UTF-8?q?=E5=88=A9=E7=94=A8=E8=A6=8F=E7=B4=84=E3=81=AE=E5=90=8C=E6=84=8F?= =?UTF-8?q?=E3=82=92=E3=81=BE=E3=81=A8=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 3 + locales/ja-JP.yml | 3 + .../src/components/MkSignupDialog.rules.vue | 69 +++++++++---------- .../frontend/src/pages/admin/moderation.vue | 2 +- .../frontend/src/pages/admin/settings.vue | 2 +- 5 files changed, 39 insertions(+), 40 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 3e0b2e61bc13..9f8a616e6925 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1130,8 +1130,11 @@ export interface Locale { "mutualFollow": string; "fileAttachedOnly": string; "impressum": string; + "impressumUrl": string; "impressumDescription": string; "privacyPolicy": string; + "privacyPolicyUrl": string; + "tosAndPrivacyPolicy": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 392bfe870b6e..c840e2f426ba 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1127,8 +1127,11 @@ notificationRecieveConfig: "通知の受信設定" mutualFollow: "相互フォロー" fileAttachedOnly: "ファイル付きのみ" impressum: "運営者情報" +impressumUrl: "運営者情報URL" impressumDescription: "ドイツなどの一部の国と地域では表示が義務付けられています(Impressum)。" privacyPolicy: "プライバシーポリシー" +privacyPolicyUrl: "プライバシーポリシーURL" +tosAndPrivacyPolicy: "利用規約・プライバシーポリシー" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index e196cc67f3da..74266b310da4 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -30,22 +30,15 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.agree }} - - - - - {{ i18n.ts.termsOfService }} - - {{ i18n.ts.agree }} - - - - - - - {{ i18n.ts.privacyPolicy }} - - {{ i18n.ts.agree }} + + + + + + {{ i18n.ts.agree }} @@ -79,16 +72,15 @@ import MkInfo from '@/components/MkInfo.vue'; import * as os from '@/os.js'; const availableServerRules = instance.serverRules.length > 0; -const availableTos = instance.tosUrl != null; -const availablePrivacyPolicy = instance.privacyPolicyUrl != null; +const availableTos = instance.tosUrl != null && instance.tosUrl !== ''; +const availablePrivacyPolicy = instance.privacyPolicyUrl != null && instance.privacyPolicyUrl !== ''; const agreeServerRules = ref(false); -const agreeTos = ref(false); -const agreePrivacyPolicy = ref(false); +const agreeTosAndPrivacyPolicy = ref(false); const agreeNote = ref(false); const agreed = computed(() => { - return (!availableServerRules || agreeServerRules.value) && (!availableTos || agreeTos.value) && (!availablePrivacyPolicy || agreePrivacyPolicy.value) && agreeNote.value; + return (!availableServerRules || agreeServerRules.value) && ((!availableTos && !availablePrivacyPolicy) || agreeTosAndPrivacyPolicy.value) && agreeNote.value; }); const emit = defineEmits<{ @@ -96,6 +88,18 @@ const emit = defineEmits<{ (ev: 'done'): void; }>(); +const tosPrivacyPolicyLabel = computed(() => { + if (availableTos && availablePrivacyPolicy) { + return i18n.ts.tosAndPrivacyPolicy; + } else if (availableTos) { + return i18n.ts.termsOfService; + } else if (availablePrivacyPolicy) { + return i18n.ts.privacyPolicy; + } else { + return ""; + } +}); + async function updateAgreeServerRules(v: boolean) { if (v) { const confirm = await os.confirm({ @@ -110,31 +114,20 @@ async function updateAgreeServerRules(v: boolean) { } } -async function updateAgreeTos(v: boolean) { +async function updateAgreeTosAndPrivacyPolicy(v: boolean) { if (v) { - const confirm = await os.confirm({ - type: 'question', - title: i18n.ts.doYouAgree, - text: i18n.t('iHaveReadXCarefullyAndAgree', { x: i18n.ts.termsOfService }), - }); - if (confirm.canceled) return; - agreeTos.value = true; - } else { - agreeTos.value = false; - } -} -async function updateAgreePrivacyPolicy(v: boolean) { - if (v) { const confirm = await os.confirm({ type: 'question', title: i18n.ts.doYouAgree, - text: i18n.t('iHaveReadXCarefullyAndAgree', { x: i18n.ts.privacyPolicy }), + text: i18n.t('iHaveReadXCarefullyAndAgree', { + x: tosPrivacyPolicyLabel.value, + }), }); if (confirm.canceled) return; - agreePrivacyPolicy.value = true; + agreeTosAndPrivacyPolicy.value = true; } else { - agreePrivacyPolicy.value = false; + agreeTosAndPrivacyPolicy.value = false; } } diff --git a/packages/frontend/src/pages/admin/moderation.vue b/packages/frontend/src/pages/admin/moderation.vue index ce914fae8acd..8b160635f71f 100644 --- a/packages/frontend/src/pages/admin/moderation.vue +++ b/packages/frontend/src/pages/admin/moderation.vue @@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue index 60ea8bb9801c..559a2e8ba218 100644 --- a/packages/frontend/src/pages/admin/settings.vue +++ b/packages/frontend/src/pages/admin/settings.vue @@ -35,7 +35,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + From fe263dfbc57df7aa8f1e1f71a0c3ef2832e39378 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 30 Sep 2023 15:29:13 +0900 Subject: [PATCH 05/10] Update Changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6e69fd7e337..fc71ab8b9b1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,13 @@ --> - -## 2023.9.3 +## 2023.x.x (unreleased) ### General - Feat: プライバシーポリシー・運営者情報(Impressum)の指定が可能になりました - プライバシーポリシーはサーバー登録時に同意確認が入ります + +## 2023.9.3 +### General - Enhance: ノートの翻訳機能の利用可否をロールで設定可能に ### Client From 1b95b83901f58ba593d2d0eee61b6a106d9717da Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 30 Sep 2023 16:06:52 +0900 Subject: [PATCH 06/10] fix lint --- packages/frontend/src/components/MkSignupDialog.rules.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index 74266b310da4..76163ab68b05 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -116,7 +116,6 @@ async function updateAgreeServerRules(v: boolean) { async function updateAgreeTosAndPrivacyPolicy(v: boolean) { if (v) { - const confirm = await os.confirm({ type: 'question', title: i18n.ts.doYouAgree, From 0397d6d4915ec0708dc41e4fec75fa13480ca166 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 7 Oct 2023 11:09:21 +0900 Subject: [PATCH 07/10] fix --- packages/backend/migration/1696003580220-AddSomeUrls.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/migration/1696003580220-AddSomeUrls.js b/packages/backend/migration/1696003580220-AddSomeUrls.js index 803c4c23af64..683aa5eeed57 100644 --- a/packages/backend/migration/1696003580220-AddSomeUrls.js +++ b/packages/backend/migration/1696003580220-AddSomeUrls.js @@ -4,6 +4,8 @@ */ export class AddSomeUrls1696003580220 { + name = 'AddSomeUrls1696003580220' + async up(queryRunner) { await queryRunner.query(`ALTER TABLE "meta" ADD "impressumUrl" character varying(1024)`); await queryRunner.query(`ALTER TABLE "meta" ADD "privacyPolicyUrl" character varying(1024)`); From d6e78c7dad37349a52dc6ee41d73552c71a40ff7 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 7 Oct 2023 11:10:35 +0900 Subject: [PATCH 08/10] api extractor --- packages/misskey-js/etc/misskey-js.api.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 335d237ce928..fe913886c7b7 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -1381,10 +1381,6 @@ export type Endpoints = { req: TODO; res: TODO; }; - 'i/get-word-muted-notes-count': { - req: TODO; - res: TODO; - }; 'i/import-following': { req: TODO; res: TODO; @@ -2645,7 +2641,6 @@ export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; type Note = { id: ID; createdAt: DateString; - updatedAt?: DateString | null; text: string | null; cw: string | null; user: User; @@ -2983,9 +2978,9 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u // // src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts // src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts -// src/api.types.ts:631:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts +// src/api.types.ts:630:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts // src/entities.ts:107:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts -// src/entities.ts:597:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts +// src/entities.ts:596:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts // src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) From 0b061b186e811e448f089bf8e6fbc74bc9ee2591 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 7 Oct 2023 11:31:20 +0900 Subject: [PATCH 09/10] improve design --- packages/frontend/src/pages/about.vue | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 99bc1c003faf..ee4043f9a500 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -46,16 +46,18 @@ SPDX-License-Identifier: AGPL-3.0-only - - - -
      -
    1. -
    -
    {{ i18n.ts.impressum }} - {{ i18n.ts.termsOfService }} - {{ i18n.ts.privacyPolicy }} + From 37acd9af41fc603dd3a8e22a004cb7e704a542e3 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 7 Oct 2023 13:06:50 +0900 Subject: [PATCH 10/10] =?UTF-8?q?nodeinfo=E3=81=AB=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E3=83=90=E3=82=B7=E3=83=BC=E3=83=9D=E3=83=AA=E3=82=B7?= =?UTF-8?q?=E3=83=BC=E3=83=BB=E9=81=8B=E5=96=B6=E8=80=85=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 6 +++--- locales/ja-JP.yml | 6 +++--- packages/backend/src/server/NodeinfoServerService.ts | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index aa996e1f1a90..d90f8fa6f2ff 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1129,15 +1129,15 @@ export interface Locale { "notificationRecieveConfig": string; "mutualFollow": string; "fileAttachedOnly": string; + "showRepliesToOthersInTimeline": string; + "hideRepliesToOthersInTimeline": string; + "externalServices": string; "impressum": string; "impressumUrl": string; "impressumDescription": string; "privacyPolicy": string; "privacyPolicyUrl": string; "tosAndPrivacyPolicy": string; - "showRepliesToOthersInTimeline": string; - "hideRepliesToOthersInTimeline": string; - "externalServices": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 60422d135c76..c92d83436678 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1126,15 +1126,15 @@ edited: "編集済み" notificationRecieveConfig: "通知の受信設定" mutualFollow: "相互フォロー" fileAttachedOnly: "ファイル付きのみ" +showRepliesToOthersInTimeline: "TLに他の人への返信を含める" +hideRepliesToOthersInTimeline: "TLに他の人への返信を含めない" +externalServices: "外部サービス" impressum: "運営者情報" impressumUrl: "運営者情報URL" impressumDescription: "ドイツなどの一部の国と地域では表示が義務付けられています(Impressum)。" privacyPolicy: "プライバシーポリシー" privacyPolicyUrl: "プライバシーポリシーURL" tosAndPrivacyPolicy: "利用規約・プライバシーポリシー" -showRepliesToOthersInTimeline: "TLに他の人への返信を含める" -hideRepliesToOthersInTimeline: "TLに他の人への返信を含めない" -externalServices: "外部サービス" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/backend/src/server/NodeinfoServerService.ts b/packages/backend/src/server/NodeinfoServerService.ts index 79f130dabe4a..dd2b7882a221 100644 --- a/packages/backend/src/server/NodeinfoServerService.ts +++ b/packages/backend/src/server/NodeinfoServerService.ts @@ -102,6 +102,8 @@ export class NodeinfoServerService { }, langs: meta.langs, tosUrl: meta.termsOfServiceUrl, + privacyPolicyUrl: meta.privacyPolicyUrl, + impressumUrl: meta.impressumUrl, repositoryUrl: meta.repositoryUrl, feedbackUrl: meta.feedbackUrl, disableRegistration: meta.disableRegistration,