add url protocol &
add web client on/off by api server
This commit is contained in:
@@ -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
|
||||
})
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user