fix: Fix timezone modification reboot exception (#9432)

Refs #9422
This commit is contained in:
ssongliu 2025-07-07 12:05:50 +08:00 committed by GitHub
parent e2b6ea5253
commit 2bee68dd40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View file

@ -120,7 +120,7 @@ func (u *DeviceService) Update(key, value string) error {
if err := ntp.UpdateSystemTimeZone(value); err != nil {
return err
}
go common.RestartService(true, true, false)
go common.RestartService(global.IsMaster, true, false)
case "DNS":
if err := updateDNS(strings.Split(value, ",")); err != nil {
return err

View file

@ -100,9 +100,14 @@ const onSave = async (formEl: FormInstance | undefined) => {
.then(async () => {
loading.value = false;
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
globalStore.isLogin = false;
let href = window.location.href;
window.open(href, '_self');
if (globalStore.currentNode === 'local') {
globalStore.isLogin = false;
let href = window.location.href;
window.open(href, '_self');
} else {
globalStore.currentNode = 'local';
location.reload();
}
})
.catch(() => {
loading.value = false;