summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-09 14:18:50 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-09 14:18:50 +0900
commitbdb74539d42fb7c9f414b8106385baee3e3308bf (patch)
treed0d0db81afa99ca4b5b6d9efd314eeadd896fb65
parentrefactor (diff)
downloadmisskey-bdb74539d42fb7c9f414b8106385baee3e3308bf.tar.gz
misskey-bdb74539d42fb7c9f414b8106385baee3e3308bf.tar.bz2
misskey-bdb74539d42fb7c9f414b8106385baee3e3308bf.zip
enhance(frontend): tweak settings page
-rw-r--r--packages/frontend/src/pages/settings/preferences.vue42
-rw-r--r--packages/frontend/src/pages/settings/privacy.vue45
-rw-r--r--packages/frontend/src/scripts/autogen/settings-search-index.ts70
3 files changed, 77 insertions, 80 deletions
diff --git a/packages/frontend/src/pages/settings/preferences.vue b/packages/frontend/src/pages/settings/preferences.vue
index 2df621eaa6..a1aa0e77ec 100644
--- a/packages/frontend/src/pages/settings/preferences.vue
+++ b/packages/frontend/src/pages/settings/preferences.vue
@@ -67,6 +67,45 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</FormSection>
+ <FormSection>
+ <div class="_gaps_m">
+ <SearchMarker :keywords="['remember', 'keep', 'note', 'visibility']">
+ <MkPreferenceContainer k="rememberNoteVisibility">
+ <MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()">
+ <template #label><SearchLabel>{{ i18n.ts.rememberNoteVisibility }}</SearchLabel></template>
+ </MkSwitch>
+ </MkPreferenceContainer>
+ </SearchMarker>
+
+ <SearchMarker :keywords="['default', 'note', 'visibility']">
+ <MkDisableSection :disabled="rememberNoteVisibility">
+ <MkFolder>
+ <template #label><SearchLabel>{{ i18n.ts.defaultNoteVisibility }}</SearchLabel></template>
+ <template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
+ <template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
+ <template v-else-if="defaultNoteVisibility === 'followers'" #suffix>{{ i18n.ts._visibility.followers }}</template>
+ <template v-else-if="defaultNoteVisibility === 'specified'" #suffix>{{ i18n.ts._visibility.specified }}</template>
+
+ <div class="_gaps_m">
+ <MkPreferenceContainer k="defaultNoteVisibility">
+ <MkSelect v-model="defaultNoteVisibility">
+ <option value="public">{{ i18n.ts._visibility.public }}</option>
+ <option value="home">{{ i18n.ts._visibility.home }}</option>
+ <option value="followers">{{ i18n.ts._visibility.followers }}</option>
+ <option value="specified">{{ i18n.ts._visibility.specified }}</option>
+ </MkSelect>
+ </MkPreferenceContainer>
+
+ <MkPreferenceContainer k="defaultNoteLocalOnly">
+ <MkSwitch v-model="defaultNoteLocalOnly">{{ i18n.ts._visibility.disableFederation }}</MkSwitch>
+ </MkPreferenceContainer>
+ </div>
+ </MkFolder>
+ </MkDisableSection>
+ </SearchMarker>
+ </div>
+ </FormSection>
+
<SearchMarker :keywords="['note']">
<FormSection>
<template #label><SearchLabel>{{ i18n.ts.note }}</SearchLabel></template>
@@ -371,6 +410,9 @@ const alwaysConfirmFollow = prefer.model('alwaysConfirmFollow');
const confirmWhenRevealingSensitiveMedia = prefer.model('confirmWhenRevealingSensitiveMedia');
const confirmOnReact = prefer.model('confirmOnReact');
const contextMenu = prefer.model('contextMenu');
+const defaultNoteVisibility = prefer.model('defaultNoteVisibility');
+const defaultNoteLocalOnly = prefer.model('defaultNoteLocalOnly');
+const rememberNoteVisibility = prefer.model('rememberNoteVisibility');
watch(lang, () => {
miLocalStorage.setItem('lang', lang.value as string);
diff --git a/packages/frontend/src/pages/settings/privacy.vue b/packages/frontend/src/pages/settings/privacy.vue
index 792b4147da..0149241337 100644
--- a/packages/frontend/src/pages/settings/privacy.vue
+++ b/packages/frontend/src/pages/settings/privacy.vue
@@ -168,45 +168,6 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</FormSection>
</SearchMarker>
-
- <FormSection>
- <div class="_gaps_m">
- <SearchMarker :keywords="['remember', 'keep', 'note', 'visibility']">
- <MkPreferenceContainer k="rememberNoteVisibility">
- <MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()">
- <template #label><SearchLabel>{{ i18n.ts.rememberNoteVisibility }}</SearchLabel></template>
- </MkSwitch>
- </MkPreferenceContainer>
- </SearchMarker>
-
- <SearchMarker :keywords="['default', 'note', 'visibility']">
- <MkDisableSection :disabled="rememberNoteVisibility">
- <MkFolder>
- <template #label><SearchLabel>{{ i18n.ts.defaultNoteVisibility }}</SearchLabel></template>
- <template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
- <template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
- <template v-else-if="defaultNoteVisibility === 'followers'" #suffix>{{ i18n.ts._visibility.followers }}</template>
- <template v-else-if="defaultNoteVisibility === 'specified'" #suffix>{{ i18n.ts._visibility.specified }}</template>
-
- <div class="_gaps_m">
- <MkPreferenceContainer k="defaultNoteVisibility">
- <MkSelect v-model="defaultNoteVisibility">
- <option value="public">{{ i18n.ts._visibility.public }}</option>
- <option value="home">{{ i18n.ts._visibility.home }}</option>
- <option value="followers">{{ i18n.ts._visibility.followers }}</option>
- <option value="specified">{{ i18n.ts._visibility.specified }}</option>
- </MkSelect>
- </MkPreferenceContainer>
-
- <MkPreferenceContainer k="defaultNoteLocalOnly">
- <MkSwitch v-model="defaultNoteLocalOnly">{{ i18n.ts._visibility.disableFederation }}</MkSwitch>
- </MkPreferenceContainer>
- </div>
- </MkFolder>
- </MkDisableSection>
- </SearchMarker>
- </div>
- </FormSection>
</div>
</SearchMarker>
</template>
@@ -227,8 +188,6 @@ import { formatDateTimeString } from '@/scripts/format-time-string.js';
import MkInput from '@/components/MkInput.vue';
import * as os from '@/os.js';
import MkDisableSection from '@/components/MkDisableSection.vue';
-import { prefer } from '@/preferences.js';
-import MkPreferenceContainer from '@/components/MkPreferenceContainer.vue';
const $i = signinRequired();
@@ -245,10 +204,6 @@ const publicReactions = ref($i.publicReactions);
const followingVisibility = ref($i.followingVisibility);
const followersVisibility = ref($i.followersVisibility);
-const defaultNoteVisibility = prefer.model('defaultNoteVisibility');
-const defaultNoteLocalOnly = prefer.model('defaultNoteLocalOnly');
-const rememberNoteVisibility = prefer.model('rememberNoteVisibility');
-
const makeNotesFollowersOnlyBefore_type = computed(() => {
if (makeNotesFollowersOnlyBefore.value == null) {
return null;
diff --git a/packages/frontend/src/scripts/autogen/settings-search-index.ts b/packages/frontend/src/scripts/autogen/settings-search-index.ts
index 983bc07d38..8e2a896b17 100644
--- a/packages/frontend/src/scripts/autogen/settings-search-index.ts
+++ b/packages/frontend/src/scripts/autogen/settings-search-index.ts
@@ -261,16 +261,6 @@ export const searchIndexes: SearchIndexItem[] = [
label: i18n.ts.lockdown,
keywords: ['lockdown'],
},
- {
- id: '37QLEyrtk',
- label: i18n.ts.rememberNoteVisibility,
- keywords: ['remember', 'keep', 'note', 'visibility'],
- },
- {
- id: '1u5HZuujV',
- label: i18n.ts.defaultNoteVisibility,
- keywords: ['default', 'note', 'visibility'],
- },
],
label: i18n.ts.privacy,
keywords: ['privacy'],
@@ -311,35 +301,45 @@ export const searchIndexes: SearchIndexItem[] = [
keywords: ['mfm', 'enable', 'show', 'advanced', 'picker', 'form', 'function', 'fn'],
},
{
- id: 'puIqj1a8b',
+ id: '1yhown1Xc',
+ label: i18n.ts.rememberNoteVisibility,
+ keywords: ['remember', 'keep', 'note', 'visibility'],
+ },
+ {
+ id: 'wUeAI5QBV',
+ label: i18n.ts.defaultNoteVisibility,
+ keywords: ['default', 'note', 'visibility'],
+ },
+ {
+ id: '6kMj4HVOg',
children: [
{
- id: '1x3JNXj8N',
+ id: 'DQIcvf64G',
label: i18n.ts.collapseRenotes,
keywords: ['renote', i18n.ts.collapseRenotesDescription],
},
{
- id: 'c98gbF9c6',
+ id: 'igFN7RIUa',
label: i18n.ts.showNoteActionsOnlyHover,
keywords: ['hover', 'show', 'footer', 'action'],
},
{
- id: '4LxdiOMNh',
+ id: '9uxocbLO0',
label: i18n.ts.showClipButtonInNoteFooter,
keywords: ['footer', 'action', 'clip', 'show'],
},
{
- id: '9gTCaLkIf',
+ id: 'eaT1O1Fao',
label: i18n.ts.enableAdvancedMfm,
keywords: ['mfm', 'enable', 'show', 'advanced'],
},
{
- id: '6kMj4HVOg',
+ id: 'omxZk3eET',
label: i18n.ts.showReactionsCount,
keywords: ['reaction', 'count', 'show'],
},
{
- id: 'dPersnkzh',
+ id: 'epvi2Nv2G',
label: i18n.ts.loadRawImages,
keywords: ['image', 'photo', 'picture', 'media', 'thumbnail', 'quality', 'raw', 'attachment'],
},
@@ -348,10 +348,10 @@ export const searchIndexes: SearchIndexItem[] = [
keywords: ['note'],
},
{
- id: '5XhS6ukl8',
+ id: 'jb3HUeyrx',
children: [
{
- id: '3GcWIaZf8',
+ id: 'ykifk3NHS',
label: i18n.ts.useGroupedNotifications,
keywords: ['group'],
},
@@ -360,60 +360,60 @@ export const searchIndexes: SearchIndexItem[] = [
keywords: ['notification'],
},
{
- id: 'dSGDnj2PA',
+ id: 'abEAdSpYY',
children: [
{
- id: '1LHOhDKGW',
+ id: 'lBbtAg0Hm',
label: i18n.ts.openImageInNewTab,
keywords: ['image', 'photo', 'picture', 'media', 'thumbnail', 'new', 'tab'],
},
{
- id: 'DSzwvTp7i',
+ id: 'E9whefUtX',
label: i18n.ts.useReactionPickerForContextMenu,
keywords: ['reaction', 'picker', 'contextmenu', 'open'],
},
{
- id: '5QTUzrpT3',
+ id: 'iQaBbJBva',
label: i18n.ts.enableInfiniteScroll,
keywords: ['load', 'auto', 'more'],
},
{
- id: '7Uf8ksn3q',
+ id: 'hgEVGgJa1',
label: i18n.ts.disableStreamingTimeline,
keywords: ['disable', 'streaming', 'timeline'],
},
{
- id: 'whKYKvaQB',
+ id: 'yxehrHZ6x',
label: i18n.ts.alwaysConfirmFollow,
keywords: ['follow', 'confirm', 'always'],
},
{
- id: 'nf4kcPeYw',
+ id: 'DdoFLaSG8',
label: i18n.ts.confirmWhenRevealingSensitiveMedia,
keywords: ['sensitive', 'nsfw', 'media', 'image', 'photo', 'picture', 'attachment', 'confirm'],
},
{
- id: 'rRisK1YYQ',
+ id: 'uIMCIK7kG',
label: i18n.ts.confirmOnReact,
keywords: ['reaction', 'confirm'],
},
{
- id: '6AH0lnjf1',
+ id: 'zvM13vl26',
label: i18n.ts.keepCw,
keywords: ['remember', 'keep', 'note', 'cw'],
},
{
- id: 'uHcTVSGDv',
+ id: 'm75VEWI3S',
label: i18n.ts.whenServerDisconnected,
keywords: ['server', 'disconnect', 'reconnect', 'reload', 'streaming'],
},
{
- id: 'fzPca1Gk9',
+ id: 'bLO9vCyKW',
label: i18n.ts.numberOfPageCache,
keywords: ['cache', 'page'],
},
{
- id: 'mNU5IBln7',
+ id: 'iQ7Er89l5',
label: i18n.ts.dataSaver,
keywords: ['datasaver'],
},
@@ -422,20 +422,20 @@ export const searchIndexes: SearchIndexItem[] = [
keywords: ['behavior'],
},
{
- id: 'C3psHYdZn',
+ id: 'C2WYcVM1d',
children: [
{
- id: 'iCEiAg4Wg',
+ id: 'Cu7ErCM7C',
label: i18n.ts.forceShowAds,
keywords: ['ad', 'show'],
},
{
- id: 'qj9eChQ5B',
+ id: 'BBxwy4F6E',
label: i18n.ts.hemisphere,
keywords: [],
},
{
- id: 'uItIge5hw',
+ id: '9YdUwDC8d',
label: i18n.ts.additionalEmojiDictionary,
keywords: ['emoji', 'dictionary', 'additional', 'extra'],
},