refactor(client): Create root.vue and select the ui in it (#9312)

This commit is contained in:
tamaina
2022-12-12 21:01:43 +09:00
committed by GitHub
parent 8211893210
commit 0294555e2b
2 changed files with 21 additions and 7 deletions

View File

@@ -38,6 +38,7 @@ 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}`);
@@ -158,13 +159,7 @@ import { getAccountFromId } from '@/scripts/get-account-from-id';
initializeSw();
});
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')),
);
const app = createApp(rootComponent);
if (_DEV_) {
app.config.performance = true;