增加修改时区后需要重启的提示

This commit is contained in:
fangxiang 2022-10-10 11:05:02 +08:00
parent 3ad57603aa
commit 3e9e13f6fd
3 changed files with 46 additions and 0 deletions

View File

@ -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({

View File

@ -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",
};

View File

@ -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": "修改音量",