Skip to content

Commit 412f0e4

Browse files
committed
optimized + celebrate for 2020
1 parent 869eed9 commit 412f0e4

File tree

13 files changed

+311
-400
lines changed

13 files changed

+311
-400
lines changed

.vscode/tasks.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
"type": "shell",
2121
"command": "yarn",
2222
"group": "none"
23+
},
24+
{
25+
"label": "autoclean",
26+
"type": "shell",
27+
"command": "yarn autoclean --force",
28+
"group": "none"
2329
}
2430
]
2531
}

.yarnclean

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# test directories
2+
__tests__
3+
test
4+
tests
5+
powered-test
6+
7+
# asset directories
8+
docs
9+
doc
10+
website
11+
images
12+
assets
13+
14+
# examples
15+
example
16+
examples
17+
18+
# code coverage directories
19+
coverage
20+
.nyc_output
21+
22+
# build scripts
23+
Makefile
24+
Gulpfile.js
25+
Gruntfile.js
26+
27+
# configs
28+
appveyor.yml
29+
circle.yml
30+
codeship-services.yml
31+
codeship-steps.yml
32+
wercker.yml
33+
.tern-project
34+
.gitattributes
35+
.editorconfig
36+
.*ignore
37+
.eslintrc
38+
.jshintrc
39+
.flowconfig
40+
.documentup.json
41+
.yarn-metadata.json
42+
.travis.yml
43+
44+
# misc
45+
*.md

about.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
$('#issues').attr('title', i18n.__('issues'));
5252
</script>
5353
</p>
54+
<p class="extreme-small text-muted">
55+
&copy; 2019-2020 <a href="https://r-q.name/">Roderick Qiu.</a>
56+
</p>
57+
<p class="extreme-small">&nbsp;</p>
5458
<p class="extreme-small">
5559
<a class="rest"
5660
href="javascript:require('electron').shell.openExternal('https://wnr.scris.top/acknoledgements.html')">Acknoledgements</a>

docs/bangzhu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h2 class="h4">2、其他</h2>
8383
<footer class="footer mx-auto py-4 text-center m">
8484
<div class="container">
8585
<span class="text-muted">
86-
&copy; 2019 <a href="https://roderickqiu.scris.top/">Roderick Qiu.</a>
86+
&copy; 2019-2020 <a href="https://r-q.name/">Roderick Qiu.</a>
8787
</span>
8888
</div>
8989
</footer>

docs/help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h2 class="h4">2. Other things</h2>
8484
<div class="container">
8585
<span class="small text-muted">The name is a abbr of <i>"Work & Rest"</i>.</span><br />
8686
<span class="text-muted">
87-
&copy; 2019 <a href="https://roderickqiu.scris.top/">Roderick Qiu.</a>
87+
&copy; 2019-2020 <a href="https://r-q.name/">Roderick Qiu.</a>
8888
</span>
8989
</div>
9090
</footer>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h1 class="display-4"><span class="work">w</span><span class="text-black-50">n</
4141
<div class="container">
4242
<span class="small text-muted">The name is an abbr of <i>"Work & Rest"</i>.</span><br />
4343
<span class="text-muted">
44-
&copy; 2019 <a href="https://roderickqiu.scris.top/">Roderick Qiu.</a>
44+
&copy; 2019-2020 <a href="https://r-q.name/">Roderick Qiu.</a>
4545
</span>
4646
</div>
4747
</footer>

docs/zh.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h1 class="display-4"><span class="work">w</span><span class="text-black-50">n</
4141
<footer class="footer mx-auto py-4" id="footer">
4242
<div class="container">
4343
<span class="text-muted">
44-
&copy; 2019 <a href="https://roderickqiu.scris.top/">Roderick Qiu.</a>
44+
&copy; 2019-2020 <a href="https://r-q.name/">Roderick Qiu.</a>
4545
</span>
4646
</div>
4747
</footer>

main.js

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ function createWindow() {
2424
width: 364,
2525
height: 360,
2626
frame: false,
27+
backgroundColor: "#FEFEFE",
2728
resizable: false,
2829
maximizable: false,
2930
show: false,
3031
hasShadow: true,
31-
webPreferences: { nodeIntegration: true },
32+
webPreferences: { nodeIntegration: true, webgl: false },
3233
titleBarStyle: "hiddenInset",
3334
title: "wnr",
3435
icon: "./res/icons/wnrIcon.png"
@@ -69,9 +70,11 @@ function alarmSet() {
6970
wait: true // Wait with callback, until user action is taken against notification
7071
}
7172
);
72-
if (win != null) if (!win.isVisible()) win.show();
73+
notifier.on('click', function (notifierObject, options, event) {
74+
if (win != null) if (!win.isVisible()) win.show();
75+
});
7376
}
74-
}, 1200000)//不断提示使用wnr
77+
}, 600000)//不断提示使用wnr
7578
}
7679
}
7780

@@ -488,7 +491,18 @@ ipcMain.on('minimizer', function () {
488491
function about() {
489492
if (app.isReady()) {
490493
if (win != null) {
491-
aboutWin = new BrowserWindow({ parent: win, width: 256, height: 233, resizable: false, frame: false, show: false, center: true, titleBarStyle: "hidden", webPreferences: { nodeIntegration: true } });
494+
aboutWin = new BrowserWindow({
495+
parent: win,
496+
width: 279,
497+
height: 256,
498+
backgroundColor: "#FEFEFE",
499+
resizable: false,
500+
frame: false,
501+
show: false,
502+
center: true,
503+
titleBarStyle: "hidden",
504+
webPreferences: { nodeIntegration: true }
505+
});
492506
aboutWin.loadFile("about.html");
493507
if (store.get("top") == true) aboutWin.setAlwaysOnTop(true);
494508
aboutWin.once('ready-to-show', () => {
@@ -505,7 +519,18 @@ ipcMain.on('about', about);
505519
function settings() {
506520
if (app.isReady()) {
507521
if (win != null) {
508-
settingsWin = new BrowserWindow({ parent: win, width: 729, height: 486, resizable: false, frame: false, show: false, center: true, webPreferences: { nodeIntegration: true }, titleBarStyle: "hidden" });
522+
settingsWin = new BrowserWindow({
523+
parent: win,
524+
width: 729,
525+
height: 486,
526+
backgroundColor: "#FEFEFE",
527+
resizable: false,
528+
frame: false,
529+
show: false,
530+
center: true,
531+
webPreferences: { nodeIntegration: true },
532+
titleBarStyle: "hidden"
533+
});
509534
settingsWin.loadFile("settings.html");
510535
if (store.get("top") == true) settingsWin.setAlwaysOnTop(true);
511536
settingsWin.once('ready-to-show', () => {
@@ -535,7 +560,18 @@ ipcMain.on('settings', settings);
535560
function tourguide() {
536561
if (app.isReady()) {
537562
if (win != null) {
538-
tourWin = new BrowserWindow({ parent: win, width: 729, height: 600, resizable: false, frame: false, show: false, center: true, titleBarStyle: "hidden", webPreferences: { nodeIntegration: true } });
563+
tourWin = new BrowserWindow({
564+
parent: win,
565+
width: 729,
566+
height: 600,
567+
backgroundColor: "#FEFEFE",
568+
resizable: false,
569+
frame: false,
570+
show: false,
571+
center: true,
572+
titleBarStyle: "hidden",
573+
webPreferences: { nodeIntegration: true }
574+
});
539575
tourWin.loadFile("tourguide.html");
540576
if (store.get("top") == true) tourWin.setAlwaysOnTop(true);
541577
tourWin.once('ready-to-show', () => {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wnr",
3-
"version": "1.6.1",
3+
"version": "1.6.2",
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": "6.1.4",
33+
"electron": "7.1.7",
3434
"electron-builder": "22.1.0"
3535
}
3636
}

res/builder/linux.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ const config = {
99
"target": [
1010
"dir"
1111
],
12-
"icon": "res/icons/wnrIcon.png"
12+
"icon": "res/icons/wnrIcon.png",
13+
"files": [
14+
"**/*",
15+
//! to exclude
16+
"!res/preview/",
17+
"!res/icons/*Mac*",
18+
"!res/icons/*Win*",
19+
"!res/icons/*.psd",
20+
"!node_modules/node-notifier/vendor/snoreToast/*"
21+
]
1322
}
1423
}
1524

res/builder/mac.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ const config = {
1010
"dir"
1111
],
1212
"icon": "res/icons/iconMac.icns",
13-
"darkModeSupport": true
13+
"darkModeSupport": true,
14+
"files": [
15+
"**/*",
16+
//! to exclude
17+
"!res/preview/",
18+
"!res/icons/*Win*",
19+
"!res/icons/*.psd",
20+
"!node_modules/node-notifier/vendor/snoreToast/*"
21+
]
1422
}
1523
}
1624

res/builder/win.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ const config = {
99
"target": [
1010
"dir"
1111
],
12-
"icon": "res/icons/iconWin.ico"
12+
"icon": "res/icons/iconWin.ico",
13+
"files": [
14+
"**/*",
15+
//! to exclude
16+
"!res/preview/",
17+
"!res/icons/*Mac*",
18+
"!res/icons/*.psd"
19+
]
1320
}
1421
}
1522

0 commit comments

Comments
 (0)