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

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: "招待"

File diff suppressed because it is too large Load Diff

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;
} }