diff --git a/src/components/SystemSettingDialog.vue b/src/components/SystemSettingDialog.vue index 6bc4809..8407925 100644 --- a/src/components/SystemSettingDialog.vue +++ b/src/components/SystemSettingDialog.vue @@ -1322,6 +1322,7 @@ export default defineComponent({ } }; + let backup_timezine = time_zone_options.value[0]; const refresh_other = () => { const config = GlobalData.getInstance()?.applicationConfig; if (config) { @@ -1346,6 +1347,7 @@ export default defineComponent({ } catch (e) { time_zone.value = time_zone_options.value[0]; } + backup_timezine = time_zone.value; const timeStamp = Date.now(); current_date.value = date.formatDate(timeStamp, "YYYY-MM-DD"); @@ -1578,6 +1580,44 @@ export default defineComponent({ }); }); } catch {} + } else if (backup_timezine != time_zone.value) { + try { + $q.dialog({ + title: $t.t("Confirm"), + message: + $t.t( + "the time zone takes effect only after it is restarted. Restart the system" + ) + "?", + ok: { + label: $t.t("ok"), + noCaps: true, + flat: true, + }, + cancel: { + label: $t.t("cancel"), + noCaps: true, + flat: true, + }, + persistent: true, + }).onOk(async () => { + await GlobalData.getInstance() + .getCurrentClient() + ?.restartDevice(1000 * 3); + $q.notify({ + color: "positive", + icon: "done", + message: + $t.t("restart command send") + + $t.t("success") + + "!" + + $t.t("the system will reboot after the setup is complete") + + "!", + position: "top", + timeout: 2500, + }); + }); + backup_timezine = time_zone.value; + } catch {} } } catch {} $q.notify({ diff --git a/src/i18n/en-US/index.ts b/src/i18n/en-US/index.ts index 7956836..eae9803 100644 --- a/src/i18n/en-US/index.ts +++ b/src/i18n/en-US/index.ts @@ -364,4 +364,8 @@ export default { "please select multimedia rotation": "Please Select Multimedia Rotation", "mode is empty! please add mode first": "Mode Is Empty! Please Add Mode First", + "the sound card takes effect only after it is restarted. Restart the system": + "The Sound Card Takes Effect Inly After It Is Restarted. Restart The System", + "the time zone takes effect only after it is restarted. Restart the system": + "The Time Zone Takes Effect Inly After It Is Restarted. Restart The System", }; diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index c78d49b..697c15d 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -277,6 +277,8 @@ export default { "restart command send": "重启指令发送", "the sound card takes effect only after it is restarted. Restart the system": "声卡修改后重启才会生效,是否重启", + "the time zone takes effect only after it is restarted. Restart the system": + "时区修改后重启才会生效,是否重启", "please input mode index": "请输入模式索引(0自动生成)", "mode index": "模式索引", "edit volume": "修改音量",