翻訳追加とタイムライン非表示機能追加

This commit is contained in:
AmaseCocoa 2024-10-02 18:43:20 +09:00 committed by hijiki
parent 23f17f9360
commit f4bd99c423
8 changed files with 687 additions and 628 deletions

View File

@ -385,6 +385,9 @@ disconnectService: "Disconnect"
enableLocalTimeline: "Enable local timeline" enableLocalTimeline: "Enable local timeline"
enableGlobalTimeline: "Enable global timeline" enableGlobalTimeline: "Enable global timeline"
disablingTimelinesInfo: "Adminstrators and Moderators will always have access to all timelines, even if they are not enabled." disablingTimelinesInfo: "Adminstrators and Moderators will always have access to all timelines, even if they are not enabled."
hideLocalTimeLine: "Hide local timeline"
hideSocialTimeLine: "Hide social timeline"
hideGlobalTimeLine: "Hide global timeline"
registration: "Register" registration: "Register"
enableRegistration: "Enable new user registration" enableRegistration: "Enable new user registration"
invite: "Invite" invite: "Invite"

12
locales/index.d.ts vendored
View File

@ -1558,6 +1558,18 @@ export interface Locale extends ILocale {
* 便 * 便
*/ */
"disablingTimelinesInfo": string; "disablingTimelinesInfo": string;
/**
*
*/
"hideLocalTimeLine": string;
/**
*
*/
"hideSocialTimeLine": string;
/**
*
*/
"hideGlobalTimeLine": string;
/** /**
* *
*/ */

View File

@ -393,6 +393,10 @@ disconnectService: "切断する"
enableLocalTimeline: "ローカルタイムラインを有効にする" enableLocalTimeline: "ローカルタイムラインを有効にする"
enableGlobalTimeline: "グローバルタイムラインを有効にする" enableGlobalTimeline: "グローバルタイムラインを有効にする"
disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。" disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。"
hideLocalTimeLine: "ローカルタイムラインを非表示にする"
hideSocialTimeLine: "ソーシャルタイムラインを非表示にする"
hideGlobalTimeLine: "グローバルタイムラインを非表示にする"
hideBubbleTimeLine: "バブルタイムラインを非表示にする"
registration: "登録" registration: "登録"
enableRegistration: "誰でも新規登録できるようにする" enableRegistration: "誰でも新規登録できるようにする"
invite: "招待" invite: "招待"

View File

@ -340,6 +340,19 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
</FormSection> </FormSection>
<FormSection>
<template #label>{{ i18n.ts.timeline }}<span class="_beta">{{ i18n.ts.originalFeature }}</span></template>
<div class="_gaps">
<MkSwitch v-model="hideLocalTimeLine">{{ i18n.ts.hideLocalTimeLine }}</MkSwitch>
<MkSwitch v-model="hideSocialTimeLine">{{ i18n.ts.hideSocialTimeLine }}</MkSwitch>
<MkSwitch v-model="hideGlobalTimeLine">{{ i18n.ts.hideGlobalTimeLine }}</MkSwitch>
<MkSwitch v-model="hideBubbleTimeLine">{{ i18n.ts.hideBubbleTimeLine }}</MkSwitch>
</div>
</FormSection>
<FormSection> <FormSection>
<template #label>{{ i18n.ts.other }}</template> <template #label>{{ i18n.ts.other }}</template>
@ -470,6 +483,10 @@ const contextMenu = computed(defaultStore.makeGetterSetter('contextMenu'));
const searchEngine = computed(defaultStore.makeGetterSetter('searchEngine')); const searchEngine = computed(defaultStore.makeGetterSetter('searchEngine'));
const reactionChecksMuting = computed(defaultStore.makeGetterSetter('reactionChecksMuting')); const reactionChecksMuting = computed(defaultStore.makeGetterSetter('reactionChecksMuting'));
const warnExternalUrl = computed(defaultStore.makeGetterSetter('warnExternalUrl')); const warnExternalUrl = computed(defaultStore.makeGetterSetter('warnExternalUrl'));
const hideLocalTimeLine = computed(defaultStore.makeGetterSetter('hideLocalTimeLine'));
const hideGlobalTimeLine = computed(defaultStore.makeGetterSetter('hideGlobalTimeLine'));
const hideSocialTimeLine = computed(defaultStore.makeGetterSetter('hideSocialTimeLine'));
const hideBubbleTimeLine = computed(defaultStore.makeGetterSetter('hideBubbleTimeLine'));
watch(lang, () => { watch(lang, () => {
miLocalStorage.setItem('lang', lang.value as string); miLocalStorage.setItem('lang', lang.value as string);

View File

@ -118,6 +118,11 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
'sound_noteMy', 'sound_noteMy',
'sound_notification', 'sound_notification',
'mutedReactions', 'mutedReactions',
'hideLocalTimeLine',
'hideSocialTimeLine',
'hideGlobalTimeLine',
'hideBubbleTimeLine',
'masterVolume',
]; ];
const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [ const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [
'lightTheme', 'lightTheme',

View File

@ -327,7 +327,7 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
iconOnly: true, iconOnly: true,
})), { })), {
icon: 'ph-user-check ph-bold ph-lg', icon: 'ph-user-check ph-bold ph-lg',
title: i18n.ts.following, title: i18n.ts.followingfeed,
iconOnly: true, iconOnly: true,
onClick: () => router.push('/following-feed'), onClick: () => router.push('/following-feed'),
}, { }, {

View File

@ -584,6 +584,23 @@ export const defaultStore = markRaw(new Storage('base', {
default: 'app' as 'app' | 'appWithShift' | 'native', default: 'app' as 'app' | 'appWithShift' | 'native',
}, },
hideLocalTimeLine: {
where: 'device',
default: false,
},
hideSocialTimeLine: {
where: 'device',
default: false,
},
hideGlobalTimeLine: {
where: 'device',
default: false,
},
hideBubbleTimeLine:{
where: 'device',
default: false,
},
sound_masterVolume: { sound_masterVolume: {
where: 'device', where: 'device',
default: 0.3, default: 0.3,

View File

@ -5,6 +5,7 @@
import { $i } from '@/account.js'; import { $i } from '@/account.js';
import { instance } from '@/instance.js'; import { instance } from '@/instance.js';
import { defaultStore } from '@/store.js';
export const basicTimelineTypes = [ export const basicTimelineTypes = [
'home', 'home',
@ -40,13 +41,13 @@ export function isAvailableBasicTimeline(timeline: BasicTimelineType | undefined
case 'home': case 'home':
return $i != null; return $i != null;
case 'local': case 'local':
return ($i == null && instance.policies.ltlAvailable) || ($i != null && $i.policies.ltlAvailable); return ($i == null && instance.policies.ltlAvailable && !defaultStore.makeGetterSetter('hideLocalTimeLine').get()) || ($i != null && $i.policies.ltlAvailable && !defaultStore.makeGetterSetter('hideLocalTimeLine').get());
case 'social': case 'social':
return $i != null && $i.policies.ltlAvailable; return $i != null && $i.policies.ltlAvailable && !defaultStore.makeGetterSetter('hideSocialTimeLine').get();
case 'bubble': case 'bubble':
return ($i == null && instance.policies.btlAvailable) || ($i != null && $i.policies.btlAvailable); return ($i == null && instance.policies.btlAvailable && !defaultStore.makeGetterSetter('hideBubbleTimeLine').get()) || ($i != null && $i.policies.btlAvailable && !defaultStore.makeGetterSetter('hideBubbleTimeLine').get());
case 'global': case 'global':
return ($i == null && instance.policies.gtlAvailable) || ($i != null && $i.policies.gtlAvailable); return ($i == null && instance.policies.gtlAvailable && !defaultStore.makeGetterSetter('hideGlobalTimeLine').get()) || ($i != null && $i.policies.gtlAvailable && !defaultStore.makeGetterSetter('hideGlobalTimeLine').get());
default: default:
return false; return false;
} }