diff --git a/packages/client/src/pages/settings/deck.vue b/packages/client/src/pages/settings/deck.vue index 96cb22bca..c62928eeb 100644 --- a/packages/client/src/pages/settings/deck.vue +++ b/packages/client/src/pages/settings/deck.vue @@ -31,16 +31,6 @@ const alwaysShowMainColumn = computed(deckStore.makeGetterSetter('alwaysShowMain const columnAlign = computed(deckStore.makeGetterSetter('columnAlign')); const profile = computed(deckStore.makeGetterSetter('profile')); -watch(navWindow, async () => { - const { canceled } = await os.confirm({ - type: 'info', - text: i18n.ts.reloadToApplySetting, - }); - if (canceled) return; - - unisonReload(); -}); - async function setProfile() { const { canceled, result: name } = await os.inputText({ title: i18n.ts._deck.profile, diff --git a/packages/client/src/ui/deck.vue b/packages/client/src/ui/deck.vue index 53e76ea14..7cdc96cce 100644 --- a/packages/client/src/ui/deck.vue +++ b/packages/client/src/ui/deck.vue @@ -79,12 +79,14 @@ import { i18n } from '@/i18n'; import { mainRouter } from '@/router'; const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue')); -if (deckStore.state.navWindow) { - mainRouter.navHook = (path) => { +mainRouter.navHook = (path): boolean => { + const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main'); + if (deckStore.state.navWindow || noMainColumn) { os.pageWindow(path); return true; - }; -} + } + return false; +}; const isMobile = ref(window.innerWidth <= 500); window.addEventListener('resize', () => { diff --git a/packages/client/src/ui/deck/deck-store.ts b/packages/client/src/ui/deck/deck-store.ts index 8d876a4cd..3ec53ad55 100644 --- a/packages/client/src/ui/deck/deck-store.ts +++ b/packages/client/src/ui/deck/deck-store.ts @@ -13,7 +13,7 @@ type ColumnWidget = { export type Column = { id: string; - type: string; + type: 'main' | 'widgets' | 'notifications' | 'tl' | 'antenna' | 'list' | 'mentions' | 'direct'; name: string | null; width: number; widgets?: ColumnWidget[];