add url protocol &

add web client on/off by api server
This commit is contained in:
ljw
2024-10-14 10:34:40 +08:00
parent 182f383d70
commit 3cc460ac8b
11 changed files with 88 additions and 23 deletions
+10
View File
@@ -2,6 +2,7 @@ import { defineStore, acceptHMRUpdate } from 'pinia'
import logo from '@/assets/logo.png'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'
import { appConfig } from '@/api/rustdesk'
export const useAppStore = defineStore({
id: 'App',
@@ -12,6 +13,9 @@ export const useAppStore = defineStore({
logo,
lang: localStorage.getItem('lang') || 'zh-CN',
locale: localStorage.getItem('lang') === 'en' ? en : zhCn,
appConfig: {
web_client: 1,
},
},
}),
@@ -27,6 +31,12 @@ export const useAppStore = defineStore({
changeLang () {
this.setLang(this.setting.lang === 'zh-CN' ? 'en' : 'zh-CN')
},
getAppConfig () {
console.log('getAppConfig')
appConfig().then(res => {
this.setting.appConfig = res.data
})
},
},
})