Fixed midnight reset
This commit is contained in:
@@ -121,7 +121,7 @@ export default {
|
|||||||
|
|
||||||
.categories {
|
.categories {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 0 32px;
|
margin: 0 64px 0 32px;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
|
||||||
.category {
|
.category {
|
||||||
@@ -157,8 +157,8 @@ export default {
|
|||||||
|
|
||||||
.settings {
|
.settings {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 8px;
|
bottom: 16px;
|
||||||
right: 8px;
|
right: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ export default {
|
|||||||
beforeMount() {
|
beforeMount() {
|
||||||
const lastMidnight = new Date();
|
const lastMidnight = new Date();
|
||||||
lastMidnight.setHours(0, 0, 0, 0);
|
lastMidnight.setHours(0, 0, 0, 0);
|
||||||
if (this.midnightReset && this.lastReset < lastMidnight) {
|
const lastReset = new Date(this.lastReset);
|
||||||
|
if (this.midnightReset && lastReset < lastMidnight) {
|
||||||
this.resetTasks();
|
this.resetTasks();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="task-list">
|
<div class="task-list">
|
||||||
<input
|
<div>
|
||||||
class="add-task"
|
<input
|
||||||
v-model=newTask
|
class="add-task"
|
||||||
placeholder="Add new task"
|
v-model=newTask
|
||||||
@keypress.enter="addTask"
|
placeholder="Add new task"
|
||||||
/>
|
@keypress.enter="addTask"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
<Task
|
<Task
|
||||||
v-for="task in filteredTasks"
|
v-for="task in filteredTasks"
|
||||||
:key="task.startedAt"
|
:key="task.startedAt"
|
||||||
|
|||||||
Reference in New Issue
Block a user