diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2020-10-25 01:21:41 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-25 01:21:41 +0900 |
| commit | 254cfaea284d12f188e28f56a0cec863e3177a49 (patch) | |
| tree | 5ba89f9316cf54724af75ee919ae7339edc5af0e /src/client/init.ts | |
| parent | Update dependencies :rocket: (diff) | |
| download | misskey-254cfaea284d12f188e28f56a0cec863e3177a49.tar.gz misskey-254cfaea284d12f188e28f56a0cec863e3177a49.tar.bz2 misskey-254cfaea284d12f188e28f56a0cec863e3177a49.zip | |
自前ルーティング (#6759)
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
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; |