Feat: グローバルタイムラインの表示非表示を

This commit is contained in:
mattyatea 2023-10-19 02:17:16 +09:00
parent 4f6b0ccf6b
commit 1b558e7243
5 changed files with 11 additions and 3 deletions

1
locales/index.d.ts vendored
View File

@ -21,6 +21,7 @@ export interface Locale {
"cancel": string;
"noThankYou": string;
"enterUsername": string;
"showGlobalTimeline": string;
"renotedBy": string;
"noNotes": string;
"noNotifications": string;

View File

@ -18,6 +18,7 @@ gotIt: "わかった"
cancel: "キャンセル"
noThankYou: "やめておく"
enterUsername: "ユーザー名を入力"
showGlobalTimeline: "グローバルタイムラインを表示する"
renotedBy: "{user}がリノート"
noNotes: "ノートはありません"
noNotifications: "通知はありません"

View File

@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSwitch v-model="defaultWithReplies">{{ i18n.ts.withRepliesByDefaultForNewlyFollowed }}</MkSwitch>
<MkSwitch v-model="showMediaTimeline">{{ i18n.ts.showMediaTimeline}}<template #caption>{{ i18n.ts.showMediaTimelineInfo }} </template></MkSwitch>
<MkSwitch v-model="FeaturedOrNote">{{ i18n.ts.FeaturedOrNote}}<template #caption>{{ i18n.ts.FeaturedOrNoteInfo }} </template></MkSwitch>
<MkSwitch v-model="showGlobalTimeline">{{ i18n.ts.showGlobalTimeline }}</MkSwitch>
<MkFolder>
<template #label>{{ i18n.ts.pinnedList }}</template>
<!-- 複数ピン止め管理できるようにしたいけどめんどいので一旦ひとつのみ -->
@ -289,6 +289,7 @@ const enableGamingMode = computed(defaultStore.makeGetterSetter('gamingMode'));
const enableonlyAndWithSave = computed(defaultStore.makeGetterSetter('onlyAndWithSave'));
const enablehanntenn = computed(defaultStore.makeGetterSetter('enablehanntenn'));
const showMediaTimeline = computed(defaultStore.makeGetterSetter('showMediaTimeline'));
const showGlobalTimeline = computed(defaultStore.makeGetterSetter('showGlobalTimeline'));
const showVisibilityColor = computed(defaultStore.makeGetterSetter('showVisibilityColor'))
const FeaturedOrNote = computed(defaultStore.makeGetterSetter('FeaturedOrNote'))
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));
@ -355,6 +356,7 @@ watch([
showVisibilityColor,
enableonlyAndWithSave,
FeaturedOrNote,
showGlobalTimeline
], async () => {
await reloadAsk();
});

View File

@ -50,7 +50,7 @@ provide('shouldOmitHeaderTitle', true);
const XTutorial = defineAsyncComponent(() => import('./timeline.tutorial.vue'));
const isLocalTimelineAvailable = ($i == null && instance.policies.ltlAvailable) || ($i != null && $i.policies.ltlAvailable);
const isGlobalTimelineAvailable = ($i == null && instance.policies.gtlAvailable) || ($i != null && $i.policies.gtlAvailable);
const isGlobalTimelineAvailable = ($i == null && instance.policies.gtlAvailable && defaultStore.state.showGlobalTimeline) || ($i != null && $i.policies.gtlAvailable && defaultStore.state.showGlobalTimeline);
const keymap = {
't': focus,
};
@ -190,7 +190,7 @@ const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLis
title: i18n.ts._timelines.social,
icon: 'ti ti-rocket',
iconOnly: true,
}] : []), ...(isGlobalTimelineAvailable ? [{
}] : []), ...(isGlobalTimelineAvailable ? [{
key: 'global',
title: i18n.ts._timelines.global,
icon: 'ti ti-whirl',

View File

@ -396,6 +396,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: true,
},
showGlobalTimeline:{
where: 'device',
default: true,
},
showVisibilityColor:{
where: 'device',
default: false,