配置页保存功能效果优化。

pull/334/head
王良 2024-08-22 13:55:43 +08:00
parent ce74d0b3a6
commit f656551f06
1 changed files with 12 additions and 9 deletions

View File

@ -155,15 +155,18 @@ export default {
this.$api.ipc.openPath(dir + '/logs/')
},
async applyAfter () {
//
if (this.config.app.theme !== this.themeBackup || this.config.app.remoteConfig.url !== this.urlBackup || this.config.app.remoteConfig.personalUrl !== this.personalUrlBackup) {
if (this.config.app.remoteConfig.url !== this.urlBackup || this.config.app.remoteConfig.personalUrl !== this.personalUrlBackup) {
await this.$api.config.downloadRemoteConfig()
await this.reloadConfigAndRestart()
setTimeout(window.location.reload, 1000)
} else {
window.location.reload()
}
let reloadLazy = 10
//
if (this.config.app.remoteConfig.url !== this.urlBackup || this.config.app.remoteConfig.personalUrl !== this.personalUrlBackup) {
await this.$api.config.downloadRemoteConfig()
await this.reloadConfigAndRestart()
reloadLazy = 300
}
//
if (this.config.app.theme !== this.themeBackup) {
setTimeout(() => window.location.reload(), reloadLazy)
}
},
async openExternal (url) {