fix: do not lazy-load GlobalEventListeners (#1515)

This commit is contained in:
Phan An 2022-10-07 16:33:50 +02:00 committed by GitHub
parent 59c493bae4
commit 8612d55351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,10 +2,10 @@
<Overlay/>
<DialogBox ref="dialog"/>
<MessageToaster ref="toaster"/>
<GlobalEventListeners/>
<div id="main" v-if="authenticated" @dragover="onDragOver" @drop="onDrop" @dragend="onDragEnd">
<Hotkeys/>
<GlobalEventListeners/>
<AppHeader/>
<MainWrapper/>
<AppFooter/>
@ -39,8 +39,10 @@ import Overlay from '@/components/ui/Overlay.vue'
// that is necessary to properly initialize the playService and equalizer.
import AppFooter from '@/components/layout/app-footer/index.vue'
// GlobalEventListener must NOT be lazy-loaded, so that it can handle LOG_OUT event properly.
import GlobalEventListeners from '@/components/utils/GlobalEventListeners.vue'
const AppHeader = defineAsyncComponent(() => import('@/components/layout/AppHeader.vue'))
const GlobalEventListeners = defineAsyncComponent(() => import('@/components/utils/GlobalEventListeners.vue'))
const Hotkeys = defineAsyncComponent(() => import('@/components/utils/HotkeyListener.vue'))
const LoginForm = defineAsyncComponent(() => import('@/components/auth/LoginForm.vue'))
const MainWrapper = defineAsyncComponent(() => import('@/components/layout/main-wrapper/index.vue'))