Skip to content

Commit f1b29dd

Browse files
committed
optimized
1 parent 6b450fb commit f1b29dd

File tree

6 files changed

+25
-15
lines changed

6 files changed

+25
-15
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
function keydown(e) {
5959
var currKey = 0, e = e || event;
6060
if (e.keyCode == 13) {
61-
if (document.getElementById("focus-work-set").checked && document.getElementById("focus-rest-set").checked && store.get("infinity"))
61+
if (document.getElementById("focus-work-set").checked && document.getElementById("focus-rest-set").checked)
6262
alert(i18n.__('all-focus-mode-warn'));
6363
else
6464
window.location.href = "timer.html?title=" + $("#title").val()
@@ -271,7 +271,7 @@
271271
if (store.get("infinity")) infinityMode();
272272
if (store.get("autostarttask") && store.get("just-launched") &&
273273
(!store.get("just-relaunched"))) {//auto-send the form is autostarttask is on
274-
if (item.focusWhenWorking && item.focusWhenResting && store.get("infinity"))
274+
if (item.focusWhenWorking && item.focusWhenResting)
275275
alert(i18n.__('all-focus-mode-warn'));
276276
else
277277
window.location.href =

locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,11 @@
167167
"without-permission-part-1": "Permission denied. This setting failed to execute.",
168168
"without-permission-part-2": "Please go to System Preferences -> Security & Privacy -> Privacy -> Automation and check the sections below the name of wnr.",
169169
"permission-ask": "If a dialog box is shown, allow it. Or else you'll fail to set auto start settings. ",
170-
"all-focus-mode-warn": "When infinity mode is on, you cannot set both periods to focus.",
170+
"all-focus-mode-warn": "You cannot set both periods to focus.",
171171
"copy": "Copy",
172172
"paste": "Paste",
173173
"select-all": "Select All",
174+
"cut": "Cut",
174175
"should-sent": "Data sending setting: ",
175176
"should-sent-msg-part-1": "We will collect some non-privacy information anonymously, such as which country you came from. Your settings and usage logs won't be uploaded. You have the right to secede, though we sincerely want to have some basic data to improve our service quality. Your data won't be identified and will be stored anonymously, and will never be shown for commercial use. ",
176177
"should-sent-msg-part-2": "If it is needed, you can refer to our analysis service provider's",

locales/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,11 @@
167167
"without-permission-part-1": "没有权限,可能无法设置开机自启。",
168168
"without-permission-part-2": "请前往系统偏好设置->安全性和隐私->自动化,找到wnr并勾选附属的权限,否则无法设置。",
169169
"permission-ask": "如果弹出一个权限申请框,请允许,否则无法设置开机自启。",
170-
"all-focus-mode-warn": "不允许在无限模式下,把工作和休息时都设置为专心模式",
170+
"all-focus-mode-warn": "不允许把工作和休息时都设置为专心模式",
171171
"copy": "复制",
172172
"paste": "粘贴",
173173
"select-all": "全选",
174+
"cut": "剪切",
174175
"should-sent": "使用数据发送设置:",
175176
"should-sent-msg-part-1": "我们会匿名采集打开wnr的次数、你来自什么国家等不重要的非隐私数据;你的使用记录、设置等不会被上传。你有权拒绝上传数据,虽然我们希望获得数据以改进服务。数据不会用于商业目的公开,并将会被匿名保存。",
176177
"should-sent-msg-part-2": "如果需要,你可以查看我们的服务提供商的",

locales/zh-TW.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,11 @@
167167
"without-permission-part-1": "沒有權限,可能無法設置開機自啓。",
168168
"without-permission-part-2": "請前往系統偏好設置->安全性和隱私->自動化,找到wnr並勾選附屬的權限,否則無法設置。",
169169
"permission-ask": "如果彈出一個權限申請框,請允許,否則無法設置開機自啓。",
170-
"all-focus-mode-warn": "不允許在無限模式下,把工作和休息時都設置爲專心模式",
170+
"all-focus-mode-warn": "不允許把工作和休息時都設置爲專心模式",
171171
"copy": "複制",
172172
"paste": "粘貼",
173173
"select-all": "全選",
174+
"cut": "剪切",
174175
"should-sent": "使用數據發送設置:",
175176
"should-sent-msg-part-1": "我們會匿名采集打開wnr的次數、你來自什麽國家等不重要的非隱私數據;你的使用記錄、設置等不會被上傳。你有權拒絕上傳數據,雖然我們希望獲得數據以改進服務。數據不會用于商業目的公開,並將會被匿名保存。",
176177
"should-sent-msg-part-2": "如果需要,你可以查看我們的服務提供商的",

main.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,14 @@ function macOSFullscreenSolution(isFullScreen) {
519519
var template = [{
520520
label: 'wnr',
521521
submenu: [{
522+
label: i18n.__('about'),
523+
enabled: !isTimerWin,
524+
click: function () {
525+
about();
526+
}
527+
}, {
528+
type: 'separator'
529+
}, {
522530
label: i18n.__('quit'),
523531
accelerator: 'CmdOrCtrl+Q',
524532
enabled: !store.get('islocked'),
@@ -537,6 +545,9 @@ function macOSFullscreenSolution(isFullScreen) {
537545
}, {
538546
label: i18n.__('select-all'),
539547
role: "selectAll"
548+
}, {
549+
label: i18n.__('cut'),
550+
role: "cut"
540551
}]
541552
}, {
542553
label: i18n.__('operations'),
@@ -558,12 +569,6 @@ function macOSFullscreenSolution(isFullScreen) {
558569
click: function () {
559570
tourguide();
560571
}
561-
}, {
562-
label: i18n.__('about'),
563-
enabled: !isTimerWin,
564-
click: function () {
565-
about();
566-
}
567572
}, {
568573
type: 'separator'
569574
}, {
@@ -582,6 +587,11 @@ function macOSFullscreenSolution(isFullScreen) {
582587
var template = [{
583588
label: 'wnr',
584589
submenu: [{
590+
label: i18n.__('about'),
591+
enabled: false
592+
}, {
593+
type: 'separator'
594+
}, {
585595
label: i18n.__('quit'),
586596
enabled: false
587597
}]
@@ -596,9 +606,6 @@ function macOSFullscreenSolution(isFullScreen) {
596606
}, {
597607
label: i18n.__('tourguide'),
598608
enabled: false
599-
}, {
600-
label: i18n.__('about'),
601-
enabled: false
602609
}, {
603610
type: 'separator'
604611
}, {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wnr",
3-
"version": "1.12.3",
3+
"version": "1.13.0",
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": {

0 commit comments

Comments
 (0)