|
|
@@ -23,7 +23,7 @@ export const useAppStore = defineStore({
|
|
23
|
23
|
id: 'App',
|
|
24
|
24
|
state: () => ({
|
|
25
|
25
|
setting: {
|
|
26
|
|
- title: 'Rustdesk-Api-Admin',
|
|
|
26
|
+ title: 'Rustdesk API Admin',
|
|
27
|
27
|
hello: '',
|
|
28
|
28
|
sideIsCollapse: false,
|
|
29
|
29
|
logo,
|
|
|
@@ -55,17 +55,21 @@ export const useAppStore = defineStore({
|
|
55
|
55
|
},
|
|
56
|
56
|
getAppConfig () {
|
|
57
|
57
|
console.log('getAppConfig')
|
|
58
|
|
- app().then(res => {
|
|
|
58
|
+ return app().then(res => {
|
|
59
|
59
|
this.setting.appConfig = res.data
|
|
60
|
60
|
})
|
|
61
|
61
|
},
|
|
62
|
62
|
getAdminConfig () {
|
|
63
|
63
|
console.log('getAdminConfig')
|
|
64
|
|
- admin().then(res => {
|
|
65
|
|
- this.setting.title = res.data.title
|
|
|
64
|
+ return admin().then(res => {
|
|
|
65
|
+ this.replaceAdminTitle(res.data.title)
|
|
66
|
66
|
this.setting.hello = res.data.hello
|
|
67
|
67
|
})
|
|
68
|
68
|
},
|
|
|
69
|
+ replaceAdminTitle(newTitle){
|
|
|
70
|
+ document.title = document.title.replace(`- ${this.setting.title}`, `- ${newTitle}`)
|
|
|
71
|
+ this.setting.title = newTitle
|
|
|
72
|
+ },
|
|
69
|
73
|
},
|
|
70
|
74
|
})
|
|
71
|
75
|
|