From 53c7077d1d78b535ab04a55ec5c508c1bab83034 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 20 Feb 2021 11:15:08 +0900 Subject: [PATCH] =?UTF-8?q?ChatUI=E3=81=A7=E9=81=B8=E6=8A=9E=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=82=BF=E3=82=A4=E3=83=A0=E3=83=A9=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=92=E8=A8=98=E6=86=B6=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/ui/chat/index.vue | 4 +++- src/client/ui/chat/store.ts | 4 ++++ src/client/ui/chat/widgets.vue | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/client/ui/chat/index.vue b/src/client/ui/chat/index.vue index 44f47447a..1d455927a 100644 --- a/src/client/ui/chat/index.vue +++ b/src/client/ui/chat/index.vue @@ -150,6 +150,7 @@ import { router } from '@/router'; import { sidebarDef } from '@/sidebar'; import { search } from '@/scripts/search'; import copyToClipboard from '@/scripts/copy-to-clipboard'; +import { store } from './store'; export default defineComponent({ components: { @@ -189,7 +190,7 @@ export default defineComponent({ data() { return { - tl: 'home', + tl: store.state.tl, lists: null, antennas: null, followedChannels: null, @@ -236,6 +237,7 @@ export default defineComponent({ this.currentChannel = channel; }); } + store.set('tl', this.tl); }, { immediate: true }); }, diff --git a/src/client/ui/chat/store.ts b/src/client/ui/chat/store.ts index a869debd6..389d56afb 100644 --- a/src/client/ui/chat/store.ts +++ b/src/client/ui/chat/store.ts @@ -10,4 +10,8 @@ export const store = markRaw(new Storage('chatUi', { data: Record; }[] }, + tl: { + where: 'deviceAccount', + default: 'home' + }, })); diff --git a/src/client/ui/chat/widgets.vue b/src/client/ui/chat/widgets.vue index 6becaa22e..6b12f9dac 100644 --- a/src/client/ui/chat/widgets.vue +++ b/src/client/ui/chat/widgets.vue @@ -10,7 +10,7 @@