From 9614f74bf842c9522c877f0592a1e0de0ca51140 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Sat, 16 Nov 2024 20:24:31 +0900
Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/frontend/src/pages/settings/privacy.vue | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
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
{{ i18n.ts.lockdown }}{{ i18n.ts.beta }}
-
+
{{ i18n.ts._accountSettings.requireSigninToViewContents }}
{{ i18n.ts._accountSettings.requireSigninToViewContentsDescription1 }}
@@ -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,