diff --git a/locales/en-US.yml b/locales/en-US.yml index ddd73e32e8..9a089b6f6e 100755 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -385,6 +385,9 @@ disconnectService: "Disconnect" enableLocalTimeline: "Enable local timeline" enableGlobalTimeline: "Enable global timeline" 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" enableRegistration: "Enable new user registration" invite: "Invite" diff --git a/locales/index.d.ts b/locales/index.d.ts index a690c12fc5..c818e927d8 100755 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1558,6 +1558,18 @@ export interface Locale extends ILocale { * これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。 */ "disablingTimelinesInfo": string; + /** + * ローカルタイムラインを非表示にする + */ + "hideLocalTimeLine": string; + /** + * ソーシャルタイムラインを非表示にする + */ + "hideSocialTimeLine": string; + /** + * グローバルタイムラインを非表示にする + */ + "hideGlobalTimeLine": string; /** * 登録 */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d08e9df1d2..732a98371a 100755 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -393,6 +393,10 @@ disconnectService: "切断する" enableLocalTimeline: "ローカルタイムラインを有効にする" enableGlobalTimeline: "グローバルタイムラインを有効にする" disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。" +hideLocalTimeLine: "ローカルタイムラインを非表示にする" +hideSocialTimeLine: "ソーシャルタイムラインを非表示にする" +hideGlobalTimeLine: "グローバルタイムラインを非表示にする" +hideBubbleTimeLine: "バブルタイムラインを非表示にする" registration: "登録" enableRegistration: "誰でも新規登録できるようにする" invite: "招待" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 70b2af5f7b..703d5071ea 100755 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -4,668 +4,685 @@ SPDX-License-Identifier: AGPL-3.0-only --> + - + const useCustomSearchEngine = computed(() => !Object.keys(searchEngineMap).includes(searchEngine.value)); + diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index 83076b01a2..b5abd37dc0 100755 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -118,6 +118,11 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [ 'sound_noteMy', 'sound_notification', 'mutedReactions', + 'hideLocalTimeLine', + 'hideSocialTimeLine', + 'hideGlobalTimeLine', + 'hideBubbleTimeLine', + 'masterVolume', ]; const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [ 'lightTheme', diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 60974da971..e480ce1ea0 100755 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -327,7 +327,7 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList iconOnly: true, })), { icon: 'ph-user-check ph-bold ph-lg', - title: i18n.ts.following, + title: i18n.ts.followingfeed, iconOnly: true, onClick: () => router.push('/following-feed'), }, { diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 28fb552b4c..fe86bb1613 100755 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -584,6 +584,23 @@ export const defaultStore = markRaw(new Storage('base', { 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: { where: 'device', default: 0.3, diff --git a/packages/frontend/src/timelines.ts b/packages/frontend/src/timelines.ts index 5080ef4b96..75d4a1d128 100755 --- a/packages/frontend/src/timelines.ts +++ b/packages/frontend/src/timelines.ts @@ -5,6 +5,7 @@ import { $i } from '@/account.js'; import { instance } from '@/instance.js'; +import { defaultStore } from '@/store.js'; export const basicTimelineTypes = [ 'home', @@ -40,13 +41,13 @@ export function isAvailableBasicTimeline(timeline: BasicTimelineType | undefined case 'home': return $i != null; 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': - return $i != null && $i.policies.ltlAvailable; + return $i != null && $i.policies.ltlAvailable && !defaultStore.makeGetterSetter('hideSocialTimeLine').get(); 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': - 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: return false; }