summaryrefslogtreecommitdiff
path: root/src/client/init.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/init.ts')
-rw-r--r--src/client/init.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client/init.ts b/src/client/init.ts
index 4a08f09997..86991b69e3 100644
--- a/src/client/init.ts
+++ b/src/client/init.ts
@@ -4,14 +4,13 @@
import '@/style.scss';
-import { createApp } from 'vue';
+import { createApp, defineAsyncComponent } from 'vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
-import Root from './root.vue';
import widgets from './widgets';
import directives from './directives';
import components from '@/components';
-import { version, apiUrl } from '@/config';
+import { version, apiUrl, deckmode } from '@/config';
import { store } from './store';
import { router } from './router';
import { applyTheme } from '@/scripts/theme';
@@ -152,7 +151,12 @@ store.dispatch('instance/fetch').then(() => {
stream.init(store.state.i);
-const app = createApp(Root);
+const app = createApp(await (
+ window.location.search === '?zen' ? import('@/ui/zen.vue') :
+ !store.getters.isSignedIn ? import('@/ui/visitor.vue') :
+ deckmode ? import('@/ui/deck.vue') :
+ import('@/ui/default.vue')
+).then(x => x.default));
if (_DEV_) {
app.config.performance = true;