Skip to content

Commit 4e4b118

Browse files
committed
optimized msgboxes
1 parent d442a28 commit 4e4b118

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

main.js

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,10 @@ app.on('ready', () => {
364364
let isNotified = store.has("windows-7-notification");
365365
if (isNotified == false) {
366366
dialog.showMessageBox(win, {
367-
title: i18n.__('windows-7-notification'),
367+
title: " wnr",
368+
message: i18n.__('windows-7-notification'),
368369
type: "warning",
369-
message: i18n.__('windows-7-notification-msg'),
370+
detail: i18n.__('windows-7-notification-msg'),
370371
}).then(function () {
371372
store.set("windows-7-notification", 1);
372373
});
@@ -910,7 +911,7 @@ function leanCloudSolution() {
910911
pushNotificationLink = link;
911912
store.set(id, true);
912913
dialog.showMessageBox(win, {
913-
title: "wnr",
914+
title: " wnr",
914915
type: "warning",
915916
message: title,
916917
detail: content,
@@ -1099,10 +1100,10 @@ ipcMain.on('warning-giver-workend', function () {
10991100
setTimeout(function () {
11001101
if (process.platform != "darwin" || (process.platform == "darwin" && restTimeFocused))
11011102
dialog.showMessageBox(win, {
1102-
title: "wnr",
1103+
title: " wnr",
11031104
message: (store.has("personalization-notification.work-time-end") ?
11041105
store.get("personalization-notification.work-time-end") : i18n.__('work-time-end')),
1105-
type: "warning",
1106+
type: "info",
11061107
detail: (store.has("personalization-notification.work-time-end-msg") ?
11071108
store.get("personalization-notification.work-time-end-msg") : i18n.__('work-time-end-msg'))
11081109
+ " " + (hasMultiDisplays ? "\r" + i18n.__('has-multi-displays') : ""),
@@ -1120,10 +1121,10 @@ ipcMain.on('warning-giver-workend', function () {
11201121
win.maximizable = false;
11211122
});
11221123
else dialog.showMessageBox({
1123-
title: "wnr",
1124+
title: " wnr",
11241125
message: (store.has("personalization-notification.work-time-end") ?
11251126
store.get("personalization-notification.work-time-end") : i18n.__('work-time-end')),
1126-
type: "warning",
1127+
type: "info",
11271128
detail: (store.has("personalization-notification.work-time-end-msg") ?
11281129
store.get("personalization-notification.work-time-end-msg") : i18n.__('work-time-end-msg'))
11291130
+ " " + (hasMultiDisplays ? "\r" + i18n.__('has-multi-displays') : ""),
@@ -1217,10 +1218,10 @@ ipcMain.on('warning-giver-restend', function () {
12171218
setTimeout(function () {
12181219
if (process.platform != "darwin" || (process.platform == "darwin" && workTimeFocused))
12191220
dialog.showMessageBox(win, {
1220-
title: "wnr",
1221+
title: " wnr",
12211222
message: (store.has("personalization-notification.rest-time-end") ?
12221223
store.get("personalization-notification.rest-time-end") : i18n.__('rest-time-end')),
1223-
type: "warning",
1224+
type: "info",
12241225
detail: (store.has("personalization-notification.rest-time-end-msg") ?
12251226
store.get("personalization-notification.rest-time-end-msg") : i18n.__('rest-time-end-msg'))
12261227
+ " " + (hasMultiDisplays ? "\r" + i18n.__('has-multi-displays') : ""),
@@ -1238,10 +1239,10 @@ ipcMain.on('warning-giver-restend', function () {
12381239
win.maximizable = false;
12391240
})
12401241
else dialog.showMessageBox({
1241-
title: "wnr",
1242+
title: " wnr",
12421243
message: (store.has("personalization-notification.rest-time-end") ?
12431244
store.get("personalization-notification.rest-time-end") : i18n.__('rest-time-end')),
1244-
type: "warning",
1245+
type: "info",
12451246
detail: (store.has("personalization-notification.rest-time-end-msg") ?
12461247
store.get("personalization-notification.rest-time-end-msg") : i18n.__('rest-time-end-msg'))
12471248
+ " " + (hasMultiDisplays ? "\r" + i18n.__('has-multi-displays') : ""),
@@ -1304,20 +1305,20 @@ ipcMain.on('warning-giver-all-task-end', function () {
13041305
} else
13051306
setTimeout(function () {
13061307
dialog.showMessageBox(win, {
1307-
title: "wnr",
1308+
title: " wnr",
13081309
message: (store.has("personalization-notification.all-task-end") ?
13091310
store.get("personalization-notification.all-task-end") : i18n.__('all-task-end')),
1310-
type: "warning",
1311+
type: "info",
13111312
detail: (store.has("personalization-notification.all-task-end-msg") ?
13121313
store.get("personalization-notification.all-task-end-msg") : i18n.__('all-task-end-msg')),
13131314
}).then(function (response) {
13141315
win.loadFile('index.html');//automatically back
13151316
setFullScreenMode(false);
13161317
if (!store.has("suggest-star")) {
13171318
dialog.showMessageBox(win, {
1318-
title: "wnr",
1319+
title: " wnr",
13191320
message: i18n.__('suggest-star'),
1320-
type: "warning",
1321+
type: "info",
13211322
detail: i18n.__('suggest-star-msg'),
13221323
checkboxLabel: i18n.__('suggest-star-chk'),
13231324
checkboxChecked: true
@@ -1354,7 +1355,7 @@ ipcMain.on('update-feedback', function (event, message) {
13541355
updateMessage += (updateIterator + 1).toString() + ". " + json.content[store.get('i18n')][updateIterator] + '\r';
13551356
}
13561357
dialog.showMessageBox((settingsWin != null) ? settingsWin : ((aboutWin != null) ? aboutWin : win), {
1357-
title: i18n.__('update'),
1358+
title: " wnr",
13581359
type: "warning",
13591360
message: i18n.__('update-msg'),
13601361
detail: i18n.__('update-content') + "\r" + updateMessage,
@@ -1382,15 +1383,15 @@ ipcMain.on('update-feedback', function (event, message) {
13821383
ipcMain.on('alert', function (event, message) {
13831384
if (settingsWin != null) {
13841385
dialog.showMessageBox(settingsWin, {
1385-
title: "wnr",
1386+
title: " wnr",
13861387
type: "info",
13871388
message: message
13881389
}).then(function () {
13891390
settingsWin.moveTop();
13901391
});
13911392
} else {
13921393
dialog.showMessageBox(win, {
1393-
title: "wnr",
1394+
title: " wnr",
13941395
type: "info",
13951396
message: message
13961397
})
@@ -1400,7 +1401,7 @@ ipcMain.on('alert', function (event, message) {
14001401
ipcMain.on('delete-all-data', function () {
14011402
if (settingsWin != null) {
14021403
dialog.showMessageBox(settingsWin, {
1403-
title: "wnr",
1404+
title: " wnr",
14041405
message: i18n.__('delete-all-data-dialog-box-title'),
14051406
type: "warning",
14061407
detail: i18n.__('delete-all-data-dialog-box-content'),
@@ -1421,7 +1422,7 @@ ipcMain.on('delete-all-data', function () {
14211422
function windowCloseChk() {
14221423
if ((process.env.NODE_ENV != "development") && win != null)
14231424
dialog.showMessageBox(win, {
1424-
title: "wnr",
1425+
title: " wnr",
14251426
message: i18n.__('window-close-dialog-box-title'),
14261427
type: "warning",
14271428
detail: i18n.__('window-close-dialog-box-content'),
@@ -1660,7 +1661,7 @@ ipcMain.on('locker-passcode', function (event, message) {
16601661
if (message == "empty") lockerMessage = i18n.__('locker-settings-empty-password');
16611662
if (settingsWin != null)
16621663
dialog.showMessageBox(settingsWin, {
1663-
title: "wnr",
1664+
title: " wnr",
16641665
message: i18n.__('locker-settings'),
16651666
type: "warning",
16661667
detail: lockerMessage

0 commit comments

Comments
 (0)