From 56910e27fbad352f3cb8324a167aaf1446cea7c2 Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 12 Dec 2022 12:39:00 +0000 Subject: [PATCH] Revert "refactor(client): Create root.vue and select the ui in it (#9312)" This reverts commit 0294555e2b7899ddd5440de485ba629b4b3fffb5. --- packages/client/src/init.ts | 9 +++++++-- packages/client/src/root.vue | 19 ------------------- 2 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 packages/client/src/root.vue diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index f7a043bcf4..f9e08d79b1 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -38,7 +38,6 @@ import { reloadChannel } from '@/scripts/unison-reload'; import { reactionPicker } from '@/scripts/reaction-picker'; import { getUrlWithoutLoginId } from '@/scripts/login-id'; import { getAccountFromId } from '@/scripts/get-account-from-id'; -import rootComponent from '@/root.vue'; (async () => { console.info(`Misskey v${version}`); @@ -159,7 +158,13 @@ import rootComponent from '@/root.vue'; initializeSw(); }); - const app = createApp(rootComponent); + const app = createApp( + window.location.search === '?zen' ? defineAsyncComponent(() => import('@/ui/zen.vue')) : + !$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) : + ui === 'deck' ? defineAsyncComponent(() => import('@/ui/deck.vue')) : + ui === 'classic' ? defineAsyncComponent(() => import('@/ui/classic.vue')) : + defineAsyncComponent(() => import('@/ui/universal.vue')), + ); if (_DEV_) { app.config.performance = true; diff --git a/packages/client/src/root.vue b/packages/client/src/root.vue deleted file mode 100644 index d0bc5ffe90..0000000000 --- a/packages/client/src/root.vue +++ /dev/null @@ -1,19 +0,0 @@ - - -