diff --git a/locales/index.d.ts b/locales/index.d.ts
index 3e0b2e61bc..9f8a616e69 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 392bfe870b..c840e2f426 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 e196cc67f3..74266b310d 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 }}
-
+
+ {{ tosPrivacyPolicyLabel }}
+
+
- {{ i18n.ts.termsOfService }}
-
- {{ i18n.ts.agree }}
-
-
-
- {{ i18n.ts.privacyPolicy }}
-
-
- {{ 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 ce914fae8a..8b160635f7 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
- {{ i18n.ts.privacyPolicy }}
+ {{ i18n.ts.privacyPolicyUrl }}
diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue
index 60ea8bb980..559a2e8ba2 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
- {{ i18n.ts.impressum }}
+ {{ i18n.ts.impressumUrl }}
{{ i18n.ts.impressumDescription }}