Skip to content

Commit

Permalink
update to 1.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RoderickQiu committed Aug 26, 2021
1 parent ed48766 commit 2cea763
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"loop": "循环几次?",
"note": "还有什么想记的吗?",
"tip": "输入各个项目,然后按 Enter 键开始计时",
"back-index": "放弃当前时间计划并返回首页",
"back-index": "结束当前计时返回首页",
"skipper": "提前跳过当前的时间",
"not-enough": "请合法输入工作时间、休息时间和循环次数。暂时不支持 5 秒以下的时间。",
"too-long": "长度超过一天的计划暂时不能添加。",
Expand Down
2 changes: 1 addition & 1 deletion locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"loop": "循環幾次?",
"note": "還有什麼想記的嗎?",
"tip": "輸入各個項目,然後按 Enter 鍵開始計時",
"back-index": "放棄當前時間計劃並返回首頁",
"back-index": "結束當前計時返回首頁",
"skipper": "提前跳過當前的時間",
"not-enough": "請合法輸入工作時間、休息時間和循環次數。暫時不支持 5 秒以下的時間。",
"too-long": "長度超過一天的計劃暫時不能添加。",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wnr",
"version": "1.23.1",
"version": "1.23.2",
"description": "Work and rest, with wnr now!",
"main": "main.js",
"scripts": {
Expand Down
15 changes: 11 additions & 4 deletions statistics.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,15 @@ <h1 class="text-muted">
let thisWeekWorkTimeSum = 0, thisWeekRestTimeSum = 0, thisWeekTimeSum = 0;
let weekDayYearMonDay;
let thisWeekWorkTimes = [0, 0, 0, 0, 0, 0, 0], thisWeekRestTimes = [0, 0, 0, 0, 0, 0, 0];
let thisWeekWorkTimesInHour = [0, 0, 0, 0, 0, 0, 0], thisWeekRestTimesInHour = [0, 0, 0, 0, 0, 0, 0];
for (let weekDay = 0; weekDay < 7; weekDay++) {
weekDayYearMonDay = thisWeekDate.getFullYear().toString() + months[thisWeekDate.getMonth()] + thisWeekDate.getDate().toString();
thisWeekWorkTimeSum += statistics.has(weekDayYearMonDay) ? statistics.get(weekDayYearMonDay).workTime : 0;
thisWeekWorkTimes[weekDay] = statistics.has(weekDayYearMonDay) ? statistics.get(weekDayYearMonDay).workTime : 0;
thisWeekWorkTimesInHour[weekDay] = Math.floor(thisWeekWorkTimes[weekDay] / 60);
thisWeekRestTimeSum += statistics.has(weekDayYearMonDay) ? statistics.get(weekDayYearMonDay).restTime : 0;
thisWeekRestTimes[weekDay] = statistics.has(weekDayYearMonDay) ? statistics.get(weekDayYearMonDay).restTime : 0;
thisWeekRestTimesInHour[weekDay] = Math.floor(thisWeekRestTimes[weekDay] / 60);
thisWeekTimeSum += statistics.has(weekDayYearMonDay) ? statistics.get(weekDayYearMonDay).sum : 0;

thisWeekDate.setDate(thisWeekDate.getDate() + 1);
Expand All @@ -193,10 +196,14 @@ <h1 class="text-muted">
let monthYearAndMon;//get info about this year
let thisYearWorkTimes = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
thisYearRestTimes = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let thisYearWorkTimesInHour = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
thisYearRestTimesInHour = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for (let monthVar = 0; monthVar < 12; monthVar++) {
monthYearAndMon = statistics.get("year") + months[monthVar];
thisYearWorkTimes[monthVar] = statistics.has(monthYearAndMon) ? statistics.get(monthYearAndMon).workTime : 0;
thisYearWorkTimesInHour[monthVar] = Math.floor(thisYearWorkTimes[monthVar] / 60);
thisYearRestTimes[monthVar] = statistics.has(monthYearAndMon) ? statistics.get(monthYearAndMon).restTime : 0;
thisYearRestTimesInHour[monthVar] = Math.floor(thisYearRestTimes[monthVar] / 60);
}

let allTimeWorkTimeSum = 0, allTimeRestTimeSum = 0, allTimeTimeSum = 0;//get info about all time
Expand Down Expand Up @@ -277,10 +284,10 @@ <h1 class="text-muted">
showGrid: false,
datasets: [{
fillColor: '#5490eacc',
data: thisWeekWorkTimes
data: thisWeekWorkTimesInHour
}, {
fillColor: '#ea5454cc',
data: thisWeekRestTimes
data: thisWeekRestTimesInHour
}]
}
new schart('graph', options);//statistics graph
Expand Down Expand Up @@ -313,10 +320,10 @@ <h1 class="text-muted">
showValue: false,
datasets: [{
fillColor: '#5490eacc',
data: thisYearWorkTimes
data: thisYearWorkTimesInHour
}, {
fillColor: '#ea5454cc',
data: thisYearRestTimes
data: thisYearRestTimesInHour
}]
}
new schart('graph', options);//statistics graph
Expand Down
18 changes: 7 additions & 11 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
{
"version": "1.23.1",
"version": "1.23.2",
"feature-introduction": false,
"content": {
"zh-CN": [
"增加了禁止取消计时、禁止跳过计时的设置项。",
"修复了使用 wnr 提醒有时不出现的问题、使用 MINI 模式意外崩溃的问题等。",
"【你可能已经注意到这个应用的更新频率比先前慢了,而一些长期处在Todo列表的的功能并未开发,这主要是因为作者正在准备升学考试并面临繁重的课业压力,请理解。】"
"修复了禁止取消、跳过计时功能造成的 BUG。",
"优化了标题提醒窗口、统计和 MINI 模式。"
],
"zh-TW": [
"增加了禁止取消計時、禁止跳過計時的設置項。",
"修復了使用 wnr 提醒有時不出現的問題、使用 MINI 模式意外崩潰的問題等。",
"『你可能已經注意到這個應用的更新頻率比先前慢了,而一些長期處在Todo列表的的功能並未開發,這主要是因爲作者正在準備升學考試並面臨繁重的課業壓力,請理解。』"
"修復了禁止取消、跳過計時功能造成的 BUG。",
"優化了標題提醒窗口、統計和 MINI 模式。"
],
"en": [
"Added the settings to ban cancelling and ban skipping.",
"Fixed the bug causing notification for starting timer fail to show and a bug related to mini mode that cause the app to crash.",
"PLEASE UNDERSTAND THAT I'VE BEEN EXTREMELY BUSY ON ACADEMIC LEARNING RECENTLY AND I SUPPOSE I WON'T BE VERY ACTIVE ON DEVELOPING BEFORE JUNE, 2022. AND THIS IS THE REASON WHY SOME FEATURES HAVEN'T BEEN IMPLEMENTED YET."

"Fixed some bugs related to the disable pause / back feature. ",
"Optimized external title window, statistics and mini mode. "
]
},
"introduce": {
Expand Down

0 comments on commit 2cea763

Please sign in to comment.