Skip to content

Commit

Permalink
updated & optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
RoderickQiu committed Mar 9, 2019
1 parent 44da4e1 commit 67223d9
Show file tree
Hide file tree
Showing 28 changed files with 366 additions and 93 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ As a timer app, wnr is simple but useful.

- auto-start with system

- progress bar

- hi-dpi support

- multi-platform support

- multi-language support

- with strong expansibility

- modern design

## To-do List

Please go and see [GitHub Project](https://github.com/RoderickQiu/wnr/projects/1).
Please go and see the [GitHub Project](https://github.com/RoderickQiu/wnr/projects/1).

## Contact

Expand Down
71 changes: 71 additions & 0 deletions docs/bangzhu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<title>wnr</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
<link rel="shortcut icon" href="favicon.ico" />
</head>

<body class="mx-auto flex-column">
<script>
var JsSrc = (navigator.language || navigator.browserLanguage).toLowerCase();
if (JsSrc.indexOf('en') >= 0) {
window.location.href = "help.html";
}
</script>
<main role="main" class="flex-shrink-0 align-content-center">
<div class="container-fluid text-center">
<br /><br /><br />
<h1 class="font-weight-lighter">使用指南</h1>
<hr />
<div id="howtodoit">
<h2 class="h4">1、如何使用</h2>
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-6.png"
class="img-fluid" /><br />
打开wnr后,你就会看到这样的界面。<br />
先是一段工作时间,然后是一段休息时间。<br />
你可以设定循环的次数。<br />
还可以设定任务名称,以及添加备注。<br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-7.png"
class="img-fluid" /><br />
按下<kbd>Enter</kbd>键开始计时。快去工作吧!<br />
如果需要使用电脑,则你可以将wnr最小化或隐藏到托盘菜单。<br />
在特殊情况下,你可以暂停、跳过或是放弃计时。<br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-8.png"
class="img-fluid" /><br />
当时间结束时,我们会提醒你。<br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-9.png"
class="img-fluid" /><br />
然后就是下一段时间了。<br />
如果担心被电脑干扰,你可以开启全屏专心模式。
<br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-10.png"
class="img-fluid" /><br />
以上就是全部的基本使用技巧了,开始让wnr改变你吧!<br />
如果有需要更改一些设置,你可以在首页点击齿轮键更改设置。<br /><br />
<h2 class="h4">2、其他</h2>
如果你还有问题,或者你发现了wnr有bug,请创建一个<a href="https://github.com/RoderickQiu/wnr/issues/">issue</a>或者<a
href="mailto">给我发邮件</a>。谢谢!<br />
</div><br />
<p class="text-black-50">
<a href="index.html" title="Back">返回</a>&nbsp;|
<a href="https://github.com/RoderickQiu/wnr/releases" title="Download wnr now"
class="font-weight-bold">现在下载wnr</i></a>
</p>
</div>
</main>
<footer class="footer mx-auto py-4 text-center">
<div class="container">
<span class="text-muted">
&copy; 2019 <a href="https://roderickqiu.scris.top/">Roderick Qiu.</a>
</span>
</div>
</footer>
</body>

</html>
Binary file modified docs/favicon.ico
Binary file not shown.
33 changes: 24 additions & 9 deletions docs/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,51 @@
</head>

<body class="mx-auto flex-column">
<script>
var JsSrc = (navigator.language || navigator.browserLanguage).toLowerCase();
if (JsSrc.indexOf('zh') >= 0) {
window.location.href = "bangzhu.html";
}
</script>
<main role="main" class="flex-shrink-0 align-content-center">
<div class="container-fluid text-center">
<br /><br /><br />
<h1 class="font-weight-lighter">Help Page</h1>
<hr />
<div id="howtodoit">
<h2 class="h4">1. How to use it</h2>
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-1.png" class="img-fluid" /><br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-1.png"
class="img-fluid" /><br />
When you open wnr, it looks like that. Just enter the numbers, and a timer will be set.<br />
First, there will be a period of work time, and then a period of rest time. <br />
It will repeat for the time you entered in "loop for". <br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-2.png" class="img-fluid" /><br />
Title and notes are selective.<br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-2.png"
class="img-fluid" /><br />
As the key <kbd>Enter</kbd> is clicked, the timer starts. Now, go & do your work! <br />
You can hide the window to the system tray<br /> (The hotkey is <kbd>Ctrl+Shift+Alt+W</kbd>) if you are
going to do some computer-relative work. <br />
The timer can be paused or given up when you have to stop to do another thing. <br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-3.png" class="img-fluid" /><br />
The timer can be paused, skipped or given up when you have to stop to do another thing. <br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-3.png"
class="img-fluid" /><br />
When the time ends, a warning is given. <br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-4.png" class="img-fluid" /><br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-4.png"
class="img-fluid" /><br />
And another period of time starts. <br />
(You can have a rest time with wnr <b>full-screen</b> to prevent you from using you computer, too.) <br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-5.png" class="img-fluid" /><br />
(You can have a rest time with wnr <b>full-screen</b> to prevent you from using you computer, too.)
<br />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-5.png"
class="img-fluid" /><br />
Now, you've learnt to use wnr! Congratulations! <br /><br />
<h2 class="h4">2. Other things</h2>
If you still have problems or you find bugs, you can: <br />
create an <a href="https://github.com/RoderickQiu/wnr/issues/">issue</a> or drop me an email to <a href="mailto">[email protected]</a>.<br />
create an <a href="https://github.com/RoderickQiu/wnr/issues/">issue</a> or drop me an email to <a
href="mailto">[email protected]</a>.<br />
</div><br />
<p class="text-black-50">
<a href="index.html" title="Back">Back</a>&nbsp;|
<a href="https://github.com/RoderickQiu/wnr/releases" title="Download wnr now" class="font-weight-bold">Download
<a href="https://github.com/RoderickQiu/wnr/releases" title="Download wnr now"
class="font-weight-bold">Download
wnr now</i></a>
</p>
</div>
Expand Down
9 changes: 7 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
</head>

<body class="mx-auto flex-column">
<script>
var JsSrc = (navigator.language || navigator.browserLanguage).toLowerCase();
if (JsSrc.indexOf('zh') >= 0) {
window.location.href = "zh.html";
}
</script>
<main role="main" class="flex-shrink-0 align-content-center">
<div class="container-fluid text-center">
<h1 class="display-4">wnr</h1>
Expand All @@ -24,8 +30,7 @@ <h1 class="display-4">wnr</h1>
class="font-weight-bold">Download
wnr now</i></a>&nbsp;|
<a href="https://github.com/RoderickQiu/wnr/" title="View it on Github">View it on GitHub</a>&nbsp;|
<a href="help.html" title="Help">Help</a>&nbsp;|
<a href="preview.html" title="Preview wnr">Preview wnr</a>&nbsp;
<a href="help.html" title="Help">Help</a>
</p>
<br /><br /><br />
</div>
Expand Down
27 changes: 17 additions & 10 deletions docs/preview.html → docs/zh.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,33 @@
</head>

<body class="mx-auto flex-column">
<script>
var JsSrc = (navigator.language || navigator.browserLanguage).toLowerCase();
if (JsSrc.indexOf('en') >= 0) {
window.location.href = "index.html";
}
</script>
<main role="main" class="flex-shrink-0 align-content-center">
<div class="container-fluid text-center">
<h1 class="font-weight-lighter">Preview</h1>
<h1 class="display-4">wnr</h1>
<hr />
<img src="https://raw.githubusercontent.com/RoderickQiu/wnr/master/res/preview/preview-1.png" class="img-fluid" />
<div class="text-black-50">
That's wnr, modern and useful. <br />
I hope you can manage your time better by using this app.
</div><br />
<div class="lead">
wnr是一款时间管理程序。<br />
人们常常遇到这样的情况:一直在聚精会神工作,既觉得做了太久已经很累了,<br />
又觉得“把这个做完再休息如何”,便一直没有休息,实质上影响了效率。<br />
而wnr就是一款为了解决这个问题而出现的软件。<br /><br />
</div>
<p class="text-black-50">
<a href="index.html" title="Back">Back</a>&nbsp;|
<a href="https://github.com/RoderickQiu/wnr/releases" title="Download wnr now" class="font-weight-bold">Download
wnr now</i></a>
<a href="https://github.com/RoderickQiu/wnr/releases" title="Download wnr now"
class="font-weight-bold">现在下载</i></a>&nbsp;|
<a href="https://github.com/RoderickQiu/wnr/" title="View it on Github">查看GitHub项目</a>&nbsp;|
<a href="bangzhu.html" title="Help">帮助手册</a>
</p>
<br /><br /><br />
</div>
</main>
<footer class="footer mx-auto py-4" id="footer">
<div class="container">
<span class="small text-muted">The name is a abbr of <i>"Work & Rest"</i>.</span><br />
<span class="text-muted">
&copy; 2019 <a href="https://roderickqiu.scris.top/">Roderick Qiu.</a>
</span>
Expand Down
14 changes: 11 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
<!-- prevent people from pasting abnormal content -->
<script src="renderer.js"></script>
<script src="updater.js"></script>
<script>
if (!store.get('tour') || store.get('tour') == undefined) {
store.set('tour', 'true');
ipc.send("tourguide");
}
</script>
<script>
function about() {
ipc.send("about");
Expand All @@ -36,7 +42,7 @@
function keydown(e) {
var currKey = 0, e = e || event;
if (e.keyCode == 13) {
window.location.href = "timer.html?title=" + $("#title").val() + "&work-time=" + $("#work-time").val() + "&rest-time=" + $("#rest-time").val() + "&loop=" + $("#loop").val();
window.location.href = "timer.html?title=" + $("#title").val() + "&work-time=" + $("#work-time").val() + "&rest-time=" + $("#rest-time").val() + "&loop=" + $("#loop").val() + "&note=" + $("#note").val();
}
}
document.onkeydown = keydown;
Expand Down Expand Up @@ -64,7 +70,7 @@
</div>
<div id="set" class="justify-content-center">
<form action="timer.html" method="GET">
<input name="title" id="title" type="text" class="small" maxlength="14" /><br /><br />
<input name="title" id="title" type="text" class="small" maxlength="11" /><br /><br />
<input name="work-time" id="work-time" type="number"
onkeypress="return (/[0-9]/.test(String.fromCharCode(event.keyCode)))" style="ime-mode:Disabled"
class="work lead" autofocus required /><br /><br />
Expand All @@ -73,13 +79,15 @@
class="rest lead" required /><br /><br />
<input name="loop" id="loop" type="number"
onkeypress="return (/[0-9]/.test(String.fromCharCode(event.keyCode)))" style="ime-mode:Disabled"
class="small" required /><br /><!-- control that only numbers are OK -->
class="small" required /><br /><br /><!-- control that only numbers are OK -->
<input name="note" id="note" type="text" class="small" maxlength="22" />
</form>
<script>
$('#work-time').attr('placeholder', i18n.__('worktime'));
$('#title').attr('placeholder', i18n.__('title'));
$('#rest-time').attr('placeholder', i18n.__('resttime'));
$('#loop').attr('placeholder', i18n.__('loop'));
$('#note').attr('placeholder', i18n.__('note'));
$("input").mouseenter(function () {
$("#tip").css('opacity', '1');
});
Expand Down
19 changes: 16 additions & 3 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"updatechk": "Go to GitHub and download the new release",
"noupdate": "No update available.",
"noupdatemsg": "No update available. Thanks for using wnr!",
"webproblem": "Cannot connect to the server.",
"webproblemmsg": "Cannot check for update right now. Please try again later.",
"settings": "Settings",
"info": "About wnr",
"winhider": "Hide the window to system tray",
Expand All @@ -28,8 +30,10 @@
"worktime": "work for (minutes)",
"resttime": "then rest for (minutes)",
"loop": "loop for (times)",
"note": "notes",
"tip": "Press Enter to submit.",
"backindex": "Give up the timer & Back",
"backindex": "Give up the schedule & Back",
"skipper": "Skip current timer",
"notenough": "Some information wasn't given so we cannot start the timer.",
"toolong": "The time is too long. Please make your work time and your rest time less than a day.",
"back": "Back",
Expand Down Expand Up @@ -61,18 +65,27 @@
"alwaystip": "If it is enabled, then every time you start wnr, it will stay on the top of the screen.",
"restarttip": "Restart for wnr is required.",
"restartnow": "Restart Now",
"autorestarttip": "The software is going to restart.",
"autostart": "Start up with system: ",
"autotip": "If it is enabled, then every time your system starts, wnr starts.",
"fullscreenrest": "Fullscreen rest time: ",
"fullscreentip": "If it is enabled, when it's rest time, wnr will enter full-screen mode to prevent you from using computer.",
"autocheck": "Auto check for update: ",
"checktip": "If it is enabled, wnr will automatically check for update (every day).",
"otherthings": "Other Things",
"manuallycheck": "Manually check for update",
"manuallycheck": "Manually check for update!",
"checker1": "(Now ",
"checker2": ")",
"hotkeytip": "Open/Hide hotkey: ",
"hotkeyusage": "(Hide to the system tray)",
"hotkey2tip": "Start/Stop hotkey: ",
"hotkey2usage": "(Fast start/stop the timer. Only available when there is a timer working.)"
"hotkey2usage": "(Fast start/stop the timer. Only available when there is a timer working.)",
"deleteall": "Delete all settings.",
"h": "h ",
"min": "min ",
"s": "s",
"welcomer1": "Welcome",
"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)",
"welcomer3": "Take a tour & Open settings",
"welcomer4": "Skip the tour"
}
Loading

0 comments on commit 67223d9

Please sign in to comment.