diff --git a/src/static/app/package.json b/src/static/app/package.json index 95e90eb8..deb7bb9f 100644 --- a/src/static/app/package.json +++ b/src/static/app/package.json @@ -1,6 +1,6 @@ { "name": "app", - "version": "4.3", + "version": "4.3.0", "private": true, "type": "module", "module": "es2022", @@ -8,7 +8,7 @@ "dev": "vite", "build": "vite build --emptyOutDir", "buildcommitpush": "./build.sh", - "build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && /opt/homebrew/bin/npm run \"electron dist\"", + "build electron": "vite build --emptyOutDir && vite build --mode electron && cd ../../../../WGDashboard-Desktop && /opt/homebrew/bin/npm run \"electron dist\"", "preview": "vite preview" }, "dependencies": { diff --git a/src/static/app/src/App.vue b/src/static/app/src/App.vue index 13711b0f..9bc02a73 100644 --- a/src/static/app/src/App.vue +++ b/src/static/app/src/App.vue @@ -9,6 +9,15 @@ store.initCrossServerConfiguration(); if (window.IS_WGDASHBOARD_DESKTOP){ store.IsElectronApp = true; store.CrossServerConfiguration.Enable = true; + if (store.ActiveServerConfiguration){ + fetchGet("/api/locale", {}, (res) => { + store.Locale = res.data + }) + } +}else{ + fetchGet("/api/locale", {}, (res) => { + store.Locale = res.data + }) } watch(store.CrossServerConfiguration, () => { store.syncCrossServerConfiguration() @@ -16,9 +25,7 @@ watch(store.CrossServerConfiguration, () => { deep: true }); const route = useRoute() -fetchGet("/api/locale", {}, (res) => { - store.Locale = res.data -}) +