summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-02-20 11:15:08 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-02-20 11:15:08 +0900
commit53c7077d1d78b535ab04a55ec5c508c1bab83034 (patch)
tree4a9011dea19bbd627f0c9689874d30ef34ef9451 /src/client
parent:art: (diff)
downloadmisskey-53c7077d1d78b535ab04a55ec5c508c1bab83034.tar.gz
misskey-53c7077d1d78b535ab04a55ec5c508c1bab83034.tar.bz2
misskey-53c7077d1d78b535ab04a55ec5c508c1bab83034.zip
ChatUIで選択したタイムラインを記憶するように
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ui/chat/index.vue4
-rw-r--r--src/client/ui/chat/store.ts4
-rw-r--r--src/client/ui/chat/widgets.vue3
3 files changed, 9 insertions, 2 deletions
diff --git a/src/client/ui/chat/index.vue b/src/client/ui/chat/index.vue
index 44f47447a7..1d455927a0 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 a869debd61..389d56afb6 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<string, any>;
}[]
},
+ tl: {
+ where: 'deviceAccount',
+ default: 'home'
+ },
}));
diff --git a/src/client/ui/chat/widgets.vue b/src/client/ui/chat/widgets.vue
index 6becaa22e3..6b12f9dac9 100644
--- a/src/client/ui/chat/widgets.vue
+++ b/src/client/ui/chat/widgets.vue
@@ -10,7 +10,7 @@
<script lang="ts">
import { defineComponent, defineAsyncComponent } from 'vue';
import XWidgets from '@/components/widgets.vue';
-import { store } from './store.ts';
+import { store } from './store';
export default defineComponent({
components: {
@@ -34,6 +34,7 @@ export default defineComponent({
},
updateWidget({ id, data }) {
+ // TODO: throttleしたい
store.set('widgets', store.state.widgets.map(w => w.id === id ? {
...w,
data: data