关机增加对话框提醒,更改所有对话框的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", "name": "media_player_client",
"version": "1.4.19", "version": "1.4.20",
"description": "A Quasar Framework app", "description": "A Quasar Framework app",
"productName": "MediaPlayerClient", "productName": "MediaPlayerClient",
"author": "fangxiang <fangxiang@cloudview.work>", "author": "fangxiang <fangxiang@cloudview.work>",

View File

@ -208,7 +208,16 @@ export default defineComponent({
$q.dialog({ $q.dialog({
title: $t.t("Confirm"), title: $t.t("Confirm"),
message: $t.t("use this image to background image") + "?", 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, persistent: true,
}) })
.onOk(() => { .onOk(() => {

View File

@ -299,7 +299,16 @@ export default defineComponent({
$q.dialog({ $q.dialog({
title: $t.t("Error"), title: $t.t("Error"),
message: $t.t("get edge blending data failed") + "!", 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(() => { }).onDismiss(() => {
show_dialog.value = false; show_dialog.value = false;
}); });

View File

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

View File

@ -275,7 +275,16 @@ export default defineComponent({
"," + "," +
$t.t("are you sure about the update") + $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, persistent: true,
}).onOk(async () => { }).onOk(async () => {
try { try {

View File

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

View File

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

View File

@ -215,7 +215,16 @@ export default defineComponent({
$q.dialog({ $q.dialog({
title: $t.t("Confirm"), title: $t.t("Confirm"),
message: $t.t("use this file to upgrade") + "?", 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, persistent: true,
}) })
.onOk(() => { .onOk(() => {

View File

@ -334,7 +334,16 @@ export default defineComponent({
$t.t( $t.t(
"set the window rectangle beyond the desktop rectangle, the window rectangle will be clipped, are you sure to use this window rectangle" "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, persistent: true,
}) })
.onOk(() => resolve_data()) .onOk(() => resolve_data())

View File

@ -3,6 +3,7 @@
export default { export default {
" ": " ", " ": " ",
ok: "Ok",
title: "MediaPlayerWebAPP", title: "MediaPlayerWebAPP",
failed: " Failed", failed: " Failed",
success: " Successful", success: " Successful",
@ -300,4 +301,7 @@ export default {
"connect time out!": "Connect Time Out!", "connect time out!": "Connect Time Out!",
"login fail!": "Login Fail!", "login fail!": "Login Fail!",
"unset power on start": "UnSet Power On Start", "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 _-": "Host names can only be numbers and letters and _-":
"主机名只能由数字、字母和_-组成", "主机名只能由数字、字母和_-组成",
"Custom ISV": "优霸定制", "Custom ISV": "优霸定制",
"are you sure power off device": "确定关机吗",
}; };

View File

@ -649,7 +649,22 @@ export default defineComponent({
window.location.reload(); window.location.reload();
} }
}, },
async powerOff() { 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; let success = false;
try { try {
const response = await GlobalData.getInstance() const response = await GlobalData.getInstance()
@ -669,6 +684,7 @@ export default defineComponent({
position: "top", position: "top",
timeout: 1500, timeout: 1500,
}); });
});
}, },
async powerOn() { async powerOn() {
let success = false; let success = false;