From 28de4e9105c88bfaca52071e6fd387b65d471ac3 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Thu, 11 Apr 2024 19:55:57 +0900 Subject: [PATCH] chore: set icon for vmimi relay tl --- packages/frontend/src/pages/timeline.vue | 10 +++++----- packages/frontend/src/store.ts | 2 +- packages/frontend/src/ui/deck/tl-column.vue | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 49da8fa82d2c..f2decacfd7b2 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -67,7 +67,7 @@ const rootEl = shallowRef(); const queue = ref(0); const srcWhenNotSignin = ref<'local' | 'global'>(isLocalTimelineAvailable ? 'local' : 'global'); -const src = computed<'home' | 'local' | 'social' | 'global' | `list:${string}`>({ +const src = computed<'home' | 'local' | 'social' | 'global' | 'vmimi-relay' | `list:${string}`>({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin.value), set: (x) => saveSrc(x), }); @@ -199,7 +199,7 @@ async function chooseChannel(ev: MouseEvent): Promise { os.popupMenu(items, ev.currentTarget ?? ev.target); } -function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global' | `list:${string}`): void { +function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global' | 'vmimi-relay' | `list:${string}`): void { const out = deepMerge({ src: newSrc }, defaultStore.state.tl); if (newSrc.startsWith('userList:')) { @@ -307,8 +307,8 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList iconOnly: true, }, { key: 'vmimi-relay', - title: i18n.ts._timelines.relay, - icon: 'ti ti-whirl', // TODO: update icon + title: i18n.ts._timelines.vmimiRelay, + icon: 'ti ti-circles-relation', iconOnly: true, }] : []), { icon: 'ti ti-list', @@ -344,7 +344,7 @@ const headerTabsWhenNotLogin = computed(() => [ definePageMetadata(() => ({ title: i18n.ts.timeline, - icon: src.value === 'local' ? 'ti ti-planet' : src.value === 'social' ? 'ti ti-universe' : src.value === 'global' ? 'ti ti-whirl' : 'ti ti-home', + icon: src.value === 'local' ? 'ti ti-planet' : src.value === 'social' ? 'ti ti-universe' : src.value === 'global' ? 'ti ti-whirl' : src.value === 'vmimi-relay' ? 'ti ti-circles-relation' : 'ti ti-home', })); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index dfc4169a54bc..516fc296a18a 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -184,7 +184,7 @@ export const defaultStore = markRaw(new Storage('base', { tl: { where: 'deviceAccount', default: { - src: 'home' as 'home' | 'local' | 'social' | 'global' | `list:${string}`, + src: 'home' as 'home' | 'local' | 'social' | 'global' | 'vmimi-relay' | `list:${string}`, userList: null as Misskey.entities.UserList | null, filter: { withReplies: true, diff --git a/packages/frontend/src/ui/deck/tl-column.vue b/packages/frontend/src/ui/deck/tl-column.vue index 1de558cd76d7..05653d094fba 100644 --- a/packages/frontend/src/ui/deck/tl-column.vue +++ b/packages/frontend/src/ui/deck/tl-column.vue @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + {{ column.name }} @@ -107,7 +107,7 @@ async function setType() { return; } updateColumn(props.column.id, { - tl: src, + tl: src ?? undefined, }); }