diff --git a/packages/client/src/pages/settings/statusbars.statusbar.vue b/packages/client/src/pages/settings/statusbars.statusbar.vue index ad2fa557a3..6b03ad46e6 100644 --- a/packages/client/src/pages/settings/statusbars.statusbar.vue +++ b/packages/client/src/pages/settings/statusbars.statusbar.vue @@ -7,7 +7,7 @@ - + @@ -15,14 +15,23 @@ + + + + + + + + +
- save Delete
@@ -109,6 +117,8 @@ watch(() => statusbar.type, () => { } }); +watch(statusbar, save); + async function save() { const i = defaultStore.state.statusbars.findIndex(x => x.id === props._id); const statusbars = JSON.parse(JSON.stringify(defaultStore.state.statusbars)); diff --git a/packages/client/src/pages/settings/statusbars.vue b/packages/client/src/pages/settings/statusbars.vue index 18de11975f..bcfff1652f 100644 --- a/packages/client/src/pages/settings/statusbars.vue +++ b/packages/client/src/pages/settings/statusbars.vue @@ -6,14 +6,6 @@ add - - - - - - - - @@ -30,7 +22,6 @@ import { unisonReload } from '@/scripts/unison-reload'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; -const statusbarSize = computed(defaultStore.makeGetterSetter('statusbarSize')); const statusbars = defaultStore.reactiveState.statusbars; let userLists = $ref(); @@ -46,6 +37,7 @@ async function add() { id: uuid(), type: null, black: false, + size: 'medium', props: {}, }); } diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index cde907017d..7ddab18f07 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -94,13 +94,11 @@ export const defaultStore = markRaw(new Storage('base', { name: string; id: string; type: string; + size: 'verySmall' | 'small' | 'medium' | 'large' | 'veryLarge'; + black: boolean; props: Record; }[], }, - statusbarSize: { - where: 'deviceAccount', - default: 'medium', - }, widgets: { where: 'deviceAccount', default: [] as { diff --git a/packages/client/src/ui/_common_/statusbar-user-list.vue b/packages/client/src/ui/_common_/statusbar-user-list.vue index 2757e9118d..12533d05f6 100644 --- a/packages/client/src/ui/_common_/statusbar-user-list.vue +++ b/packages/client/src/ui/_common_/statusbar-user-list.vue @@ -52,6 +52,8 @@ const tick = () => { }); }; +watch(() => props.userListId, tick); + useInterval(tick, Math.max(5000, props.refreshIntervalSec * 1000), { immediate: true, afterMounted: true, diff --git a/packages/client/src/ui/_common_/statusbars.vue b/packages/client/src/ui/_common_/statusbars.vue index c18771c54f..c448b09563 100644 --- a/packages/client/src/ui/_common_/statusbars.vue +++ b/packages/client/src/ui/_common_/statusbars.vue @@ -1,14 +1,14 @@