Skip to content

Commit c08a793

Browse files
syuiloDA-TENSHI
authored andcommitted
enhance(frontend): tweak settings page
1 parent 4063386 commit c08a793

File tree

3 files changed

+77
-80
lines changed

3 files changed

+77
-80
lines changed

packages/frontend/src/pages/settings/preferences.vue

+42
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,45 @@ SPDX-License-Identifier: AGPL-3.0-only
6767
</div>
6868
</FormSection>
6969

70+
<FormSection>
71+
<div class="_gaps_m">
72+
<SearchMarker :keywords="['remember', 'keep', 'note', 'visibility']">
73+
<MkPreferenceContainer k="rememberNoteVisibility">
74+
<MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()">
75+
<template #label><SearchLabel>{{ i18n.ts.rememberNoteVisibility }}</SearchLabel></template>
76+
</MkSwitch>
77+
</MkPreferenceContainer>
78+
</SearchMarker>
79+
80+
<SearchMarker :keywords="['default', 'note', 'visibility']">
81+
<MkDisableSection :disabled="rememberNoteVisibility">
82+
<MkFolder>
83+
<template #label><SearchLabel>{{ i18n.ts.defaultNoteVisibility }}</SearchLabel></template>
84+
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
85+
<template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
86+
<template v-else-if="defaultNoteVisibility === 'followers'" #suffix>{{ i18n.ts._visibility.followers }}</template>
87+
<template v-else-if="defaultNoteVisibility === 'specified'" #suffix>{{ i18n.ts._visibility.specified }}</template>
88+
89+
<div class="_gaps_m">
90+
<MkPreferenceContainer k="defaultNoteVisibility">
91+
<MkSelect v-model="defaultNoteVisibility">
92+
<option value="public">{{ i18n.ts._visibility.public }}</option>
93+
<option value="home">{{ i18n.ts._visibility.home }}</option>
94+
<option value="followers">{{ i18n.ts._visibility.followers }}</option>
95+
<option value="specified">{{ i18n.ts._visibility.specified }}</option>
96+
</MkSelect>
97+
</MkPreferenceContainer>
98+
99+
<MkPreferenceContainer k="defaultNoteLocalOnly">
100+
<MkSwitch v-model="defaultNoteLocalOnly">{{ i18n.ts._visibility.disableFederation }}</MkSwitch>
101+
</MkPreferenceContainer>
102+
</div>
103+
</MkFolder>
104+
</MkDisableSection>
105+
</SearchMarker>
106+
</div>
107+
</FormSection>
108+
70109
<SearchMarker :keywords="['note']">
71110
<FormSection>
72111
<template #label><SearchLabel>{{ i18n.ts.note }}</SearchLabel></template>
@@ -371,6 +410,9 @@ const alwaysConfirmFollow = prefer.model('alwaysConfirmFollow');
371410
const confirmWhenRevealingSensitiveMedia = prefer.model('confirmWhenRevealingSensitiveMedia');
372411
const confirmOnReact = prefer.model('confirmOnReact');
373412
const contextMenu = prefer.model('contextMenu');
413+
const defaultNoteVisibility = prefer.model('defaultNoteVisibility');
414+
const defaultNoteLocalOnly = prefer.model('defaultNoteLocalOnly');
415+
const rememberNoteVisibility = prefer.model('rememberNoteVisibility');
374416

375417
watch(lang, () => {
376418
miLocalStorage.setItem('lang', lang.value as string);

packages/frontend/src/pages/settings/privacy.vue

-45
Original file line numberDiff line numberDiff line change
@@ -168,45 +168,6 @@ SPDX-License-Identifier: AGPL-3.0-only
168168
</div>
169169
</FormSection>
170170
</SearchMarker>
171-
172-
<FormSection>
173-
<div class="_gaps_m">
174-
<SearchMarker :keywords="['remember', 'keep', 'note', 'visibility']">
175-
<MkPreferenceContainer k="rememberNoteVisibility">
176-
<MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()">
177-
<template #label><SearchLabel>{{ i18n.ts.rememberNoteVisibility }}</SearchLabel></template>
178-
</MkSwitch>
179-
</MkPreferenceContainer>
180-
</SearchMarker>
181-
182-
<SearchMarker :keywords="['default', 'note', 'visibility']">
183-
<MkDisableSection :disabled="rememberNoteVisibility">
184-
<MkFolder>
185-
<template #label><SearchLabel>{{ i18n.ts.defaultNoteVisibility }}</SearchLabel></template>
186-
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
187-
<template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
188-
<template v-else-if="defaultNoteVisibility === 'followers'" #suffix>{{ i18n.ts._visibility.followers }}</template>
189-
<template v-else-if="defaultNoteVisibility === 'specified'" #suffix>{{ i18n.ts._visibility.specified }}</template>
190-
191-
<div class="_gaps_m">
192-
<MkPreferenceContainer k="defaultNoteVisibility">
193-
<MkSelect v-model="defaultNoteVisibility">
194-
<option value="public">{{ i18n.ts._visibility.public }}</option>
195-
<option value="home">{{ i18n.ts._visibility.home }}</option>
196-
<option value="followers">{{ i18n.ts._visibility.followers }}</option>
197-
<option value="specified">{{ i18n.ts._visibility.specified }}</option>
198-
</MkSelect>
199-
</MkPreferenceContainer>
200-
201-
<MkPreferenceContainer k="defaultNoteLocalOnly">
202-
<MkSwitch v-model="defaultNoteLocalOnly">{{ i18n.ts._visibility.disableFederation }}</MkSwitch>
203-
</MkPreferenceContainer>
204-
</div>
205-
</MkFolder>
206-
</MkDisableSection>
207-
</SearchMarker>
208-
</div>
209-
</FormSection>
210171
</div>
211172
</SearchMarker>
212173
</template>
@@ -227,8 +188,6 @@ import { formatDateTimeString } from '@/scripts/format-time-string.js';
227188
import MkInput from '@/components/MkInput.vue';
228189
import * as os from '@/os.js';
229190
import MkDisableSection from '@/components/MkDisableSection.vue';
230-
import { prefer } from '@/preferences.js';
231-
import MkPreferenceContainer from '@/components/MkPreferenceContainer.vue';
232191

233192
const $i = signinRequired();
234193

@@ -245,10 +204,6 @@ const publicReactions = ref($i.publicReactions);
245204
const followingVisibility = ref($i.followingVisibility);
246205
const followersVisibility = ref($i.followersVisibility);
247206

248-
const defaultNoteVisibility = prefer.model('defaultNoteVisibility');
249-
const defaultNoteLocalOnly = prefer.model('defaultNoteLocalOnly');
250-
const rememberNoteVisibility = prefer.model('rememberNoteVisibility');
251-
252207
const makeNotesFollowersOnlyBefore_type = computed(() => {
253208
if (makeNotesFollowersOnlyBefore.value == null) {
254209
return null;

packages/frontend/src/scripts/autogen/settings-search-index.ts

+35-35
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,6 @@ export const searchIndexes: SearchIndexItem[] = [
261261
label: i18n.ts.lockdown,
262262
keywords: ['lockdown'],
263263
},
264-
{
265-
id: '37QLEyrtk',
266-
label: i18n.ts.rememberNoteVisibility,
267-
keywords: ['remember', 'keep', 'note', 'visibility'],
268-
},
269-
{
270-
id: '1u5HZuujV',
271-
label: i18n.ts.defaultNoteVisibility,
272-
keywords: ['default', 'note', 'visibility'],
273-
},
274264
],
275265
label: i18n.ts.privacy,
276266
keywords: ['privacy'],
@@ -311,35 +301,45 @@ export const searchIndexes: SearchIndexItem[] = [
311301
keywords: ['mfm', 'enable', 'show', 'advanced', 'picker', 'form', 'function', 'fn'],
312302
},
313303
{
314-
id: 'puIqj1a8b',
304+
id: '1yhown1Xc',
305+
label: i18n.ts.rememberNoteVisibility,
306+
keywords: ['remember', 'keep', 'note', 'visibility'],
307+
},
308+
{
309+
id: 'wUeAI5QBV',
310+
label: i18n.ts.defaultNoteVisibility,
311+
keywords: ['default', 'note', 'visibility'],
312+
},
313+
{
314+
id: '6kMj4HVOg',
315315
children: [
316316
{
317-
id: '1x3JNXj8N',
317+
id: 'DQIcvf64G',
318318
label: i18n.ts.collapseRenotes,
319319
keywords: ['renote', i18n.ts.collapseRenotesDescription],
320320
},
321321
{
322-
id: 'c98gbF9c6',
322+
id: 'igFN7RIUa',
323323
label: i18n.ts.showNoteActionsOnlyHover,
324324
keywords: ['hover', 'show', 'footer', 'action'],
325325
},
326326
{
327-
id: '4LxdiOMNh',
327+
id: '9uxocbLO0',
328328
label: i18n.ts.showClipButtonInNoteFooter,
329329
keywords: ['footer', 'action', 'clip', 'show'],
330330
},
331331
{
332-
id: '9gTCaLkIf',
332+
id: 'eaT1O1Fao',
333333
label: i18n.ts.enableAdvancedMfm,
334334
keywords: ['mfm', 'enable', 'show', 'advanced'],
335335
},
336336
{
337-
id: '6kMj4HVOg',
337+
id: 'omxZk3eET',
338338
label: i18n.ts.showReactionsCount,
339339
keywords: ['reaction', 'count', 'show'],
340340
},
341341
{
342-
id: 'dPersnkzh',
342+
id: 'epvi2Nv2G',
343343
label: i18n.ts.loadRawImages,
344344
keywords: ['image', 'photo', 'picture', 'media', 'thumbnail', 'quality', 'raw', 'attachment'],
345345
},
@@ -348,10 +348,10 @@ export const searchIndexes: SearchIndexItem[] = [
348348
keywords: ['note'],
349349
},
350350
{
351-
id: '5XhS6ukl8',
351+
id: 'jb3HUeyrx',
352352
children: [
353353
{
354-
id: '3GcWIaZf8',
354+
id: 'ykifk3NHS',
355355
label: i18n.ts.useGroupedNotifications,
356356
keywords: ['group'],
357357
},
@@ -360,60 +360,60 @@ export const searchIndexes: SearchIndexItem[] = [
360360
keywords: ['notification'],
361361
},
362362
{
363-
id: 'dSGDnj2PA',
363+
id: 'abEAdSpYY',
364364
children: [
365365
{
366-
id: '1LHOhDKGW',
366+
id: 'lBbtAg0Hm',
367367
label: i18n.ts.openImageInNewTab,
368368
keywords: ['image', 'photo', 'picture', 'media', 'thumbnail', 'new', 'tab'],
369369
},
370370
{
371-
id: 'DSzwvTp7i',
371+
id: 'E9whefUtX',
372372
label: i18n.ts.useReactionPickerForContextMenu,
373373
keywords: ['reaction', 'picker', 'contextmenu', 'open'],
374374
},
375375
{
376-
id: '5QTUzrpT3',
376+
id: 'iQaBbJBva',
377377
label: i18n.ts.enableInfiniteScroll,
378378
keywords: ['load', 'auto', 'more'],
379379
},
380380
{
381-
id: '7Uf8ksn3q',
381+
id: 'hgEVGgJa1',
382382
label: i18n.ts.disableStreamingTimeline,
383383
keywords: ['disable', 'streaming', 'timeline'],
384384
},
385385
{
386-
id: 'whKYKvaQB',
386+
id: 'yxehrHZ6x',
387387
label: i18n.ts.alwaysConfirmFollow,
388388
keywords: ['follow', 'confirm', 'always'],
389389
},
390390
{
391-
id: 'nf4kcPeYw',
391+
id: 'DdoFLaSG8',
392392
label: i18n.ts.confirmWhenRevealingSensitiveMedia,
393393
keywords: ['sensitive', 'nsfw', 'media', 'image', 'photo', 'picture', 'attachment', 'confirm'],
394394
},
395395
{
396-
id: 'rRisK1YYQ',
396+
id: 'uIMCIK7kG',
397397
label: i18n.ts.confirmOnReact,
398398
keywords: ['reaction', 'confirm'],
399399
},
400400
{
401-
id: '6AH0lnjf1',
401+
id: 'zvM13vl26',
402402
label: i18n.ts.keepCw,
403403
keywords: ['remember', 'keep', 'note', 'cw'],
404404
},
405405
{
406-
id: 'uHcTVSGDv',
406+
id: 'm75VEWI3S',
407407
label: i18n.ts.whenServerDisconnected,
408408
keywords: ['server', 'disconnect', 'reconnect', 'reload', 'streaming'],
409409
},
410410
{
411-
id: 'fzPca1Gk9',
411+
id: 'bLO9vCyKW',
412412
label: i18n.ts.numberOfPageCache,
413413
keywords: ['cache', 'page'],
414414
},
415415
{
416-
id: 'mNU5IBln7',
416+
id: 'iQ7Er89l5',
417417
label: i18n.ts.dataSaver,
418418
keywords: ['datasaver'],
419419
},
@@ -422,20 +422,20 @@ export const searchIndexes: SearchIndexItem[] = [
422422
keywords: ['behavior'],
423423
},
424424
{
425-
id: 'C3psHYdZn',
425+
id: 'C2WYcVM1d',
426426
children: [
427427
{
428-
id: 'iCEiAg4Wg',
428+
id: 'Cu7ErCM7C',
429429
label: i18n.ts.forceShowAds,
430430
keywords: ['ad', 'show'],
431431
},
432432
{
433-
id: 'qj9eChQ5B',
433+
id: 'BBxwy4F6E',
434434
label: i18n.ts.hemisphere,
435435
keywords: [],
436436
},
437437
{
438-
id: 'uItIge5hw',
438+
id: '9YdUwDC8d',
439439
label: i18n.ts.additionalEmojiDictionary,
440440
keywords: ['emoji', 'dictionary', 'additional', 'extra'],
441441
},

0 commit comments

Comments
 (0)