You've already forked dev-sidecar
mirror of
https://github.com/docmirror/dev-sidecar.git
synced 2025-11-26 14:10:40 +08:00
feature: 启用/禁用 “远程配置” 时,自动加载配置并重启代理服务和系统代理。
This commit is contained in:
@@ -100,9 +100,17 @@ export default {
|
||||
this.$api.autoStart.enabled(this.config.app.autoStart.enabled)
|
||||
this.saveConfig()
|
||||
},
|
||||
onRemoteConfigEnabledChange () {
|
||||
async onRemoteConfigEnabledChange () {
|
||||
this.saveConfig()
|
||||
this.$message.info('请重启加速服务')
|
||||
if (this.config.app.remoteConfig.enabled === true) {
|
||||
await this.$api.config.startAutoDownloadRemoteConfig()
|
||||
} else {
|
||||
this.$api.config.reload()
|
||||
}
|
||||
if (this.status.server.enabled || this.status.proxy.enabled) {
|
||||
await this.$api.proxy.restart()
|
||||
this.$api.server.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user