Skip to content

Commit

Permalink
bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
RoderickQiu committed Jul 22, 2020
1 parent 2bf0796 commit 82f0faa
Show file tree
Hide file tree
Showing 14 changed files with 338 additions and 276 deletions.
7 changes: 6 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,10 @@
"statistics": "Statistics",
"statistics-work-time": "Working time",
"statistics-rest-time": "Resting time",
"statistics-time-sum": "All together"
"statistics-time-sum": "All together",
"today": "Today",
"yesterday": "Yesterday",
"this-week": "This Week",
"this-year": "This Year",
"all-time": "All Time"
}
7 changes: 6 additions & 1 deletion locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,10 @@
"statistics": "使用统计",
"statistics-work-time": "工作时间",
"statistics-rest-time": "休息时间",
"statistics-time-sum": "时间总计"
"statistics-time-sum": "时间总计",
"today": "今天",
"yesterday": "昨天",
"this-week": "本周",
"this-year": "本年",
"all-time": "全部时间"
}
535 changes: 270 additions & 265 deletions locales/zh-TW.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,12 @@ function traySolution(isFullScreen) {
click: function () {
locker();
}
}, {
enabled: !isTimerWin,
label: i18n.__('statistics'),
click: function () {
if (win != null) win.loadFile('statistics.html');
}
}, {
enabled: (!store.get('islocked')) && (!isTimerWin),
label: i18n.__('settings'),
Expand Down Expand Up @@ -736,6 +742,12 @@ function macOSFullscreenSolution(isFullScreen) {
}, {
label: i18n.__('operations'),
submenu: [{
enabled: !isTimerWin,
label: i18n.__('statistics'),
click: function () {
if (win != null) win.loadFile('statistics.html');
}
}, {
enabled: (!store.get('islocked')) && (!isTimerWin),
label: i18n.__('settings'),
click: function () {
Expand Down
3 changes: 3 additions & 0 deletions res/builder/output/linux.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions res/builder/output/mac.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions res/builder/output/node-minify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions res/builder/output/nsis-ia32.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions res/builder/output/nsis.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
3 changes: 3 additions & 0 deletions res/builder/output/portable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions res/builder/output/win-zip.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions statistics.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<script src="supporter.js"></script><!-- support wnr running -->

<div class="d-flex mx-auto justify-content-center align-items-center text-dark" id="main">
<div id="logo-bar">
<div id="statistics-back">
<a href="javascript:backer()" class="rest"><i class="iconfont icon-angle-left" id="back-index"></i></a>
</div>
<div id="controller">
Expand All @@ -45,19 +45,24 @@
<a href="javascript:call('window-close-chk')" class="small rest should-lock"><i class="iconfont icon-close"
id="exit"></i></a>
<script>
$('#back-index').attr('title', i18n.__('back-index'));
$('#back-index').attr('title', i18n.__('back'));
$('#window-hide').attr('title', i18n.__('window-hide'));
$('#window-minimize').attr('title', i18n.__('window-minimize'));
$('#exit').attr('title', i18n.__('exit'));
if (process.platform == "darwin") $("#controller").css("display", "none");
</script>
</div>
<div id="top-bar">
<a id="today" href="javascript:switchMode('today')">今天</a> | <a id="yesterday"
href="javascript:switchMode('yesterday')">昨天</a> | <a id="this-week"
href="javascript:switchMode('this-week')">本周</a> | <a id="this-year"
href="javascript:switchMode('this-year')">本年</a>
| <a id="all-time" href="javascript:switchMode('all-time')">全部时间</a>
<div id="top-bar" class="extreme-small">
<a id="today" href="javascript:switchMode('today')">
<script>document.write(i18n.__('today'));</script></a> | <a id="yesterday"
href="javascript:switchMode('yesterday')">
<script>document.write(i18n.__('yesterday'));</script></a> | <a id="this-week"
href="javascript:switchMode('this-week')">
<script>document.write(i18n.__('this-week'));</script></a> | <a id="this-year"
href="javascript:switchMode('this-year')">
<script>document.write(i18n.__('this-year'));</script></a>
| <a id="all-time" href="javascript:switchMode('all-time')">
<script>document.write(i18n.__('all-time'));</script></a>
<hr />
</div>
<div id="statistics-no-chart">
Expand Down
13 changes: 12 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -718,5 +718,16 @@ li input[type="checkbox"]::after {
}

#statistics-graph {
height: 200px;
height: 180px;
}

#statistics-back{
position: absolute;
bottom: 2px;
left: 8px;
display: inline-block;
background-clip: padding-box;
-webkit-app-region: no-drag;
/* let it clickable */
-webkit-user-select: none;
}

0 comments on commit 82f0faa

Please sign in to comment.