Skip to content

Commit 018d02f

Browse files
committed
bugs fixed & optimized
1 parent 2212db3 commit 018d02f

File tree

7 files changed

+181
-314
lines changed

7 files changed

+181
-314
lines changed

locales/en.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"s": "s",
9090
"times": "loops",
9191
"welcomer1": "Welcome",
92-
"welcomer2": "When you're in the zone, taking a break is the last thing on your mind. However, you may end up with some serious health issues down the line, and you may not be as productive as you would if you followed a strict work/break schedule. wnr is a simple, Electron-based application that was designed to help you remember when breaks are needed. It allows you to configure work/rest intervals that are then enforced, which will have many positive health effects in the long run. (From Softpedia)",
92+
"welcomer2": "wnr is a simple app that can help you remember when breaks are needed.",
9393
"welcomer3": "Take a tour",
9494
"welcomer4": "Skip the tour",
9595
"welcomer5": "Open settings first",
@@ -99,7 +99,7 @@
9999
"loadingtip3": "this link",
100100
"loadingtip4": "to see the offline guide. (might be out of date)",
101101
"settingstip": "Some tips about wnr settings",
102-
"settingstipmsg": "Welcome to settings! When you change one field, the setting will automatially be set. Some settings needs a restart.",
102+
"settingstipmsg": "The setting will automatically be saved. Some settings needs a restart.",
103103
"alarmtip": "Long time no see... ",
104104
"alarmtipmsg": "Open wnr and have a healthier schedule! ",
105105
"allsum1": "all together",
@@ -121,5 +121,7 @@
121121
"default2": "tasks",
122122
"edit": "Edit",
123123
"isalarmtipon": "Tip for not using wnr: ",
124-
"isalarmtipontip": "If it is enabled, wnr will send tips for you if you aren't really using wnr. "
124+
"isalarmtipontip": "If it is enabled, wnr will send tips for you if you aren't really using wnr. ",
125+
"isonemintipon": "Tip for only 1 min left: ",
126+
"isonemintipontip": "If it is enabled, wnr will send you a tip that your time is running out in 1 min. "
125127
}

locales/zh.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"s": "",
9090
"times": "",
9191
"welcomer1": "欢迎使用wnr",
92-
"welcomer2": "wnr是一款时间管理程序。人们常常遇到这样的情况:一直在聚精会神工作,既觉得做了太久已经很累了,又觉得“把这个做完再休息如何”,便一直没有休息,实质上影响了效率。而wnr就是一款为了解决这个问题而出现的软件",
92+
"welcomer2": "wnr是一款时间管理程序,能帮助您调节工作与休息",
9393
"welcomer3": "熟悉一下wnr",
9494
"welcomer4": "直接进入wnr",
9595
"welcomer5": "先调整下设置",
@@ -99,7 +99,7 @@
9999
"loadingtip3": "此链接",
100100
"loadingtip4": "加载本地帮助手册。(本地帮助手册可能已经过时。)",
101101
"settingstip": "你似乎是第一次打开设置",
102-
"settingstipmsg": "很好,你已经迈出了第一步。wnr的设置组件非常强大,可以丰富和方便你的wnr体验。所有设置都会自动生效,部分组件在被设置后会自动重启程序以应用设置,望知悉。",
102+
"settingstipmsg": "所有设置都会自动生效,部分组件在被设置后会自动重启程序以应用设置,望知悉。",
103103
"alarmtip": "你已经很久没有开始一个新计划了。",
104104
"alarmtipmsg": "打开wnr,开始一个新计划吧!",
105105
"allsum1": "共计",
@@ -121,5 +121,7 @@
121121
"default2": "任务",
122122
"edit": "编辑预设",
123123
"isalarmtipon": "是否要让wnr发出使用提醒:",
124-
"isalarmtipontip": "如果此项被选中,则wnr会在您一直不使用的时候提示您使用wnr,提高效率。"
124+
"isalarmtipontip": "如果此项被选中,则wnr会在您一直不使用的时候提示您使用wnr,提高效率。",
125+
"isonemintipon": "是否要让wnr在时间仅剩下一分钟时发出提醒:",
126+
"isonemintipontip": "如果此项被选中,则wnr会在时间仅剩下一分钟时发出提醒,提示您进行暂时收尾工作。"
125127
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wnr",
3-
"version": "1.5.2",
3+
"version": "1.5.3",
44
"description": "It's a timer app with strong expansibility for computers. The name is an abbr of \"Work and Rest\".",
55
"main": "main.js",
66
"scripts": {
@@ -30,7 +30,7 @@
3030
"winreg": "1.2.4"
3131
},
3232
"devDependencies": {
33-
"electron": "5.0.5",
34-
"electron-builder": "20.44.4"
33+
"electron": "5.0.7",
34+
"electron-builder": "21.1.1"
3535
}
3636
}

settings.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@
128128
<script>document.write(i18n.__('isalarmtipontip'));</script>
129129
</span>
130130
</div>
131+
<div class="align-content-center form-text">
132+
<label>
133+
<script>document.write(i18n.__('isonemintipon'));</script></label>
134+
<input id="onemintip-set" type="checkbox" onchange="onemintipset()" />
135+
<br /><span class="text-muted small">
136+
<script>document.write(i18n.__('isonemintipontip'));</script>
137+
</span>
138+
</div>
131139
<br />
132140
<p class="lead"><i class="fa fa-ellipsis-h fa-fw" aria-hidden="true"></i>
133141
<script>document.write(i18n.__('otherthings'));</script>
@@ -272,6 +280,12 @@
272280
if (document.getElementById("alarmtip-set").checked == true) store.set("alarmtip", true);
273281
else store.set("alarmtip", false);
274282
}
283+
if (store.get("onemintip") != false) document.getElementById("onemintip-set").checked = true;
284+
else document.getElementById("onemintip-set").checked = false;
285+
function onemintipset() {
286+
if (document.getElementById("onemintip-set").checked == true) store.set("onemintip", true);
287+
else store.set("onemintip", false);
288+
}
275289
$("#hotkey1-set").val(store.get("hotkey1").toUpperCase());
276290
function hotkey1set() {
277291
if ($("#hotkey1-set").val() != null && $("#hotkey1-set").val()) {

style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ li {
154154
border-width: 1.5px;
155155
}
156156

157+
.dropdown-item:focus {
158+
color: #f5f5f5;
159+
}
160+
157161
#dropdownMenuButton {
158162
color: #999999;
159163
}

timer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@
215215
minutes = parseInt((seconds - hours * 3600) / 60);
216216
seconds = seconds - hours * 3600 - minutes * 60;
217217
$("#now-timing").text(hours + h + minutes + min + seconds + s);
218-
if (minutes == 0 && morethan1) {
219-
ipc.send("1min");
218+
if (minutes == 0 && morethan1 && hours == 0) {
219+
if (store.get("onemintip") != false) ipc.send("1min");
220220
morethan1 = 0;
221221
}
222222
} else {

0 commit comments

Comments
 (0)