diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-10-25 01:23:41 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-10-25 01:23:41 +0900 |
| commit | 7bd2a6ad611ffa4e4a0c96e49dec93350e0616db (patch) | |
| tree | 1a3ad6ba33e7bfd6fd884052f61805dc4d3aa365 /src/client/init.ts | |
| parent | regedit (diff) | |
| parent | 自前ルーティング (#6759) (diff) | |
| download | sharkey-7bd2a6ad611ffa4e4a0c96e49dec93350e0616db.tar.gz sharkey-7bd2a6ad611ffa4e4a0c96e49dec93350e0616db.tar.bz2 sharkey-7bd2a6ad611ffa4e4a0c96e49dec93350e0616db.zip | |
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/client/init.ts')
| -rw-r--r-- | src/client/init.ts | 12 |
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; |