关机增加对话框提醒,更改所有对话框的ok和cancel按钮为首字母大写

This commit is contained in:
fangxiang 2022-07-20 15:37:13 +08:00
parent fe76f29989
commit 51b8f27717
12 changed files with 162 additions and 32 deletions

View File

@ -1,6 +1,6 @@
{
"name": "media_player_client",
"version": "1.4.19",
"version": "1.4.20",
"description": "A Quasar Framework app",
"productName": "MediaPlayerClient",
"author": "fangxiang <fangxiang@cloudview.work>",

View File

@ -208,7 +208,16 @@ export default defineComponent({
$q.dialog({
title: $t.t("Confirm"),
message: $t.t("use this image to background image") + "?",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
})
.onOk(() => {

View File

@ -299,7 +299,16 @@ export default defineComponent({
$q.dialog({
title: $t.t("Error"),
message: $t.t("get edge blending data failed") + "!",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
}).onDismiss(() => {
show_dialog.value = false;
});

View File

@ -908,7 +908,16 @@ export default defineComponent({
isValid: (val: string) => !!val && val.trim().length > 0,
type: "text",
},
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
}).onOk(async (data: string) => {
if (url) {
@ -994,7 +1003,16 @@ export default defineComponent({
isValid: (val: string) => !!val && val.trim().length > 0,
type: "text",
},
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
}).onOk(async (data: string) => {
if (data == file.name) {
@ -1252,7 +1270,16 @@ export default defineComponent({
) +
"!" +
"</span>",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
}).onOk(async () => {
let success = false;

View File

@ -275,7 +275,16 @@ export default defineComponent({
"," +
$t.t("are you sure about the update") +
"?",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
}).onOk(async () => {
try {

View File

@ -167,7 +167,16 @@ export default defineComponent({
$q.dialog({
title: $t.t("Confirm"),
message: $t.t("use this file to recovery data") + "?",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
})
.onOk(() => {
@ -195,7 +204,16 @@ export default defineComponent({
"?" +
"</p>",
html: true,
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
})
.onOk(() => {

View File

@ -1486,7 +1486,16 @@ export default defineComponent({
"\n" +
$t.t("the screen output may be abnormal") +
"!",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
}).onOk(_apply_graphics);
} else {
@ -1528,7 +1537,16 @@ export default defineComponent({
$t.t(
"the sound card takes effect only after it is restarted. Restart the system"
) + "?",
cancel: true,
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()
@ -1857,6 +1875,7 @@ export default defineComponent({
persistent: true,
ok: {
label: $t.t("i have known"),
noCaps: true,
flat: true,
},
});

View File

@ -215,7 +215,16 @@ export default defineComponent({
$q.dialog({
title: $t.t("Confirm"),
message: $t.t("use this file to upgrade") + "?",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
})
.onOk(() => {

View File

@ -334,7 +334,16 @@ export default defineComponent({
$t.t(
"set the window rectangle beyond the desktop rectangle, the window rectangle will be clipped, are you sure to use this window rectangle"
) + "?",
cancel: true,
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
})
.onOk(() => resolve_data())

View File

@ -3,6 +3,7 @@
export default {
" ": " ",
ok: "Ok",
title: "MediaPlayerWebAPP",
failed: " Failed",
success: " Successful",
@ -300,4 +301,7 @@ export default {
"connect time out!": "Connect Time Out!",
"login fail!": "Login Fail!",
"unset power on start": "UnSet Power On Start",
"cancel upload file": "Cancel Upload File",
"are you sure power off device": "Are You Sure Power Off Device",
"input folder name": "Input Folder Name",
};

View File

@ -596,4 +596,5 @@ export default {
"Host names can only be numbers and letters and _-":
"主机名只能由数字、字母和_-组成",
"Custom ISV": "优霸定制",
"are you sure power off device": "确定关机吗",
};

View File

@ -649,25 +649,41 @@ export default defineComponent({
window.location.reload();
}
},
async powerOff() {
let success = false;
try {
const response = await GlobalData.getInstance()
.getCurrentClient()
?.deviceStandByMode();
if (response) {
success = response?.success ?? false;
}
} catch {}
$q.notify({
color: success ? "positive" : "negative",
icon: success ? "done" : "warning",
message:
$t.t("send power off command") +
(success ? $t.t("success") : $t.t("fail")) +
"!",
position: "top",
timeout: 1500,
powerOff() {
$q.dialog({
title: $t.t("power off"),
message: $t.t("are you sure power off device") + "?",
ok: {
label: $t.t("ok"),
noCaps: true,
flat: true,
},
cancel: {
label: $t.t("cancel"),
noCaps: true,
flat: true,
},
persistent: true,
}).onOk(async () => {
let success = false;
try {
const response = await GlobalData.getInstance()
.getCurrentClient()
?.deviceStandByMode();
if (response) {
success = response?.success ?? false;
}
} catch {}
$q.notify({
color: success ? "positive" : "negative",
icon: success ? "done" : "warning",
message:
$t.t("send power off command") +
(success ? $t.t("success") : $t.t("fail")) +
"!",
position: "top",
timeout: 1500,
});
});
},
async powerOn() {