From c768e1d13b6a090c06ddc63f6f66e7f4ae6eb425 Mon Sep 17 00:00:00 2001 From: m1m1sha <18262227804@163.com> Date: Tue, 7 May 2024 23:01:23 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E4=BD=9C=E7=94=A8=E5=9F=9F=E4=B8=AD=E5=BC=82=E6=AD=A5=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easytier-gui/src/main.ts | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/easytier-gui/src/main.ts b/easytier-gui/src/main.ts index 04c23e2..d16bd00 100644 --- a/easytier-gui/src/main.ts +++ b/easytier-gui/src/main.ts @@ -26,18 +26,22 @@ if (import.meta.env.PROD) { }) } -const app = createApp(App) +async function main() { + await loadLanguageAsync(localStorage.getItem('lang') || 'en') -const router = createRouter({ - history: createWebHistory(), - extendRoutes: routes => setupLayouts(routes), -}) + const app = createApp(App) -app.use(router) -app.use(createPinia()) -app.use(i18n, { useScope: 'global' }) -loadLanguageAsync(localStorage.getItem('lang') || 'en') + const router = createRouter({ + history: createWebHistory(), + extendRoutes: routes => setupLayouts(routes), + }) -app.use(PrimeVue) -app.use(ToastService) -app.mount('#app') + app.use(router) + app.use(createPinia()) + app.use(i18n, { useScope: 'global' }) + app.use(PrimeVue) + app.use(ToastService) + app.mount('#app') +} + +main()