diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-11-16 20:24:31 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-11-16 20:24:31 +0900 |
| commit | 9614f74bf842c9522c877f0592a1e0de0ca51140 (patch) | |
| tree | a665d40d923a266197fa4bbb09f1c0d28fce17b5 /packages/frontend | |
| parent | fix(backend): fallback sharedInbox to null in ApPersonService (#14970) (diff) | |
| download | misskey-9614f74bf842c9522c877f0592a1e0de0ca51140.tar.gz misskey-9614f74bf842c9522c877f0592a1e0de0ca51140.tar.bz2 misskey-9614f74bf842c9522c877f0592a1e0de0ca51140.zip | |
🎨
Diffstat (limited to 'packages/frontend')
| -rw-r--r-- | packages/frontend/src/pages/settings/privacy.vue | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/frontend/src/pages/settings/privacy.vue b/packages/frontend/src/pages/settings/privacy.vue index da3d36b31a..40d9be0f60 100644 --- a/packages/frontend/src/pages/settings/privacy.vue +++ b/packages/frontend/src/pages/settings/privacy.vue @@ -48,7 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only <template #label>{{ i18n.ts.lockdown }}<span class="_beta">{{ i18n.ts.beta }}</span></template> <div class="_gaps_m"> - <MkSwitch v-model="requireSigninToViewContents" @update:modelValue="save()"> + <MkSwitch :modelValue="requireSigninToViewContents" @update:modelValue="update_requireSigninToViewContents"> {{ i18n.ts._accountSettings.requireSigninToViewContents }} <template #caption> <div>{{ i18n.ts._accountSettings.requireSigninToViewContentsDescription1 }}</div> @@ -172,6 +172,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js'; import FormSlot from '@/components/form/slot.vue'; import { formatDateTimeString } from '@/scripts/format-time-string.js'; import MkInput from '@/components/MkInput.vue'; +import * as os from '@/os.js'; const $i = signinRequired(); @@ -217,6 +218,19 @@ watch([makeNotesFollowersOnlyBefore, makeNotesHiddenBefore], () => { save(); }); +async function update_requireSigninToViewContents(value: boolean) { + if (value) { + const { canceled } = await os.confirm({ + type: 'warning', + text: i18n.ts.acknowledgeNotesAndEnable, + }); + if (canceled) return; + } + + requireSigninToViewContents.value = value; + save(); +} + function save() { misskeyApi('i/update', { isLocked: !!isLocked.value, |