プライバシーポリシー・利用規約の同意をまとめる
This commit is contained in:
parent
764d3b2fd0
commit
384afaa1b5
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1127,8 +1127,11 @@ notificationRecieveConfig: "通知の受信設定"
|
|||
mutualFollow: "相互フォロー"
|
||||
fileAttachedOnly: "ファイル付きのみ"
|
||||
impressum: "運営者情報"
|
||||
impressumUrl: "運営者情報URL"
|
||||
impressumDescription: "ドイツなどの一部の国と地域では表示が義務付けられています(Impressum)。"
|
||||
privacyPolicy: "プライバシーポリシー"
|
||||
privacyPolicyUrl: "プライバシーポリシーURL"
|
||||
tosAndPrivacyPolicy: "利用規約・プライバシーポリシー"
|
||||
|
||||
_announcement:
|
||||
forExistingUsers: "既存ユーザーのみ"
|
||||
|
|
|
|||
|
|
@ -30,22 +30,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSwitch :modelValue="agreeServerRules" style="margin-top: 16px;" @update:modelValue="updateAgreeServerRules">{{ i18n.ts.agree }}</MkSwitch>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="availableTos" :defaultOpen="true">
|
||||
<template #label>{{ i18n.ts.termsOfService }}</template>
|
||||
<template #suffix><i v-if="agreeTos" class="ti ti-check" style="color: var(--success)"></i></template>
|
||||
<MkFolder v-if="availableTos || availablePrivacyPolicy" :defaultOpen="true">
|
||||
<template #label>{{ tosPrivacyPolicyLabel }}</template>
|
||||
<template #suffix><i v-if="agreeTosAndPrivacyPolicy" class="ti ti-check" style="color: var(--success)"></i></template>
|
||||
<div class="_gaps_s">
|
||||
<div v-if="availableTos"><a :href="instance.tosUrl" class="_link" target="_blank">{{ i18n.ts.termsOfService }} <i class="ti ti-external-link"></i></a></div>
|
||||
<div v-if="availablePrivacyPolicy"><a :href="instance.privacyPolicyUrl" class="_link" target="_blank">{{ i18n.ts.privacyPolicy }} <i class="ti ti-external-link"></i></a></div>
|
||||
</div>
|
||||
|
||||
<a :href="instance.tosUrl" class="_link" target="_blank">{{ i18n.ts.termsOfService }} <i class="ti ti-external-link"></i></a>
|
||||
|
||||
<MkSwitch :modelValue="agreeTos" style="margin-top: 16px;" @update:modelValue="updateAgreeTos">{{ i18n.ts.agree }}</MkSwitch>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder v-if="availablePrivacyPolicy" :defaultOpen="true">
|
||||
<template #label>{{ i18n.ts.privacyPolicy }}</template>
|
||||
<template #suffix><i v-if="agreePrivacyPolicy" class="ti ti-check" style="color: var(--success)"></i></template>
|
||||
|
||||
<a :href="instance.privacyPolicyUrl" class="_link" target="_blank">{{ i18n.ts.privacyPolicy }} <i class="ti ti-external-link"></i></a>
|
||||
|
||||
<MkSwitch :modelValue="agreePrivacyPolicy" style="margin-top: 16px;" @update:modelValue="updateAgreePrivacyPolicy">{{ i18n.ts.agree }}</MkSwitch>
|
||||
<MkSwitch :modelValue="agreeTosAndPrivacyPolicy" style="margin-top: 16px;" @update:modelValue="updateAgreeTosAndPrivacyPolicy">{{ i18n.ts.agree }}</MkSwitch>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder :defaultOpen="true">
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<MkInput v-model="privacyPolicyUrl">
|
||||
<template #prefix><i class="ti ti-link"></i></template>
|
||||
<template #label>{{ i18n.ts.privacyPolicy }}</template>
|
||||
<template #label>{{ i18n.ts.privacyPolicyUrl }}</template>
|
||||
</MkInput>
|
||||
|
||||
<MkTextarea v-model="preservedUsernames">
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</FormSplit>
|
||||
|
||||
<MkInput v-model="impressumUrl">
|
||||
<template #label>{{ i18n.ts.impressum }}</template>
|
||||
<template #label>{{ i18n.ts.impressumUrl }}</template>
|
||||
<template #prefix><i class="ti ti-link"></i></template>
|
||||
<template #caption>{{ i18n.ts.impressumDescription }}</template>
|
||||
</MkInput>
|
||||
|
|
|
|||
Loading…
Reference in New Issue