From 66ad902c4fdf19fd3bd0c72590df68002db81cc9 Mon Sep 17 00:00:00 2001 From: "Ms. VX" Date: Tue, 23 Apr 2024 01:44:09 +0200 Subject: [PATCH 1/4] add mdi-clock-alert icon --- src/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.js b/src/main.js index f4e9138..b1577cb 100644 --- a/src/main.js +++ b/src/main.js @@ -22,6 +22,7 @@ import { mdiChevronRight, mdiChevronUp, mdiClock, + mdiClockAlert, mdiClockOutline, mdiClose, mdiCog, @@ -59,6 +60,7 @@ Vue.prototype.$icons = { mdiChevronRight, mdiChevronUp, mdiClock, + mdiClockAlert, mdiClockOutline, mdiClose, mdiCog, From 34a3b30086f693f23a6249ce6b0eef4d554c61ba Mon Sep 17 00:00:00 2001 From: "Ms. VX" Date: Tue, 23 Apr 2024 01:45:09 +0200 Subject: [PATCH 2/4] add a deadline date to tasks --- src/components/TaskCard.vue | 25 +++++++++++++++++++++++++ src/views/Tasks.vue | 8 ++++++++ 2 files changed, 33 insertions(+) diff --git a/src/components/TaskCard.vue b/src/components/TaskCard.vue index 5253b5d..ac3bb17 100644 --- a/src/components/TaskCard.vue +++ b/src/components/TaskCard.vue @@ -29,6 +29,18 @@ > {{ category.label }} + + {{ $icons.mdiClockAlert }} + {{ task.deadline }} + + mdi-domain + {{ $icons.mdiDelete }} Delete @@ -124,6 +141,14 @@ export default { }, components: {SubtaskList}, computed: { + isLate () { + if (this.task.deadline && + this.task.deadline < new Date().toISOString() && + !this.isDone) { + return true + } + return false + }, category () { if (!this.task.category) { return diff --git a/src/views/Tasks.vue b/src/views/Tasks.vue index 41f3683..2671097 100644 --- a/src/views/Tasks.vue +++ b/src/views/Tasks.vue @@ -114,6 +114,11 @@ @keydown.enter="submitTask(idx)" label="Category" > + @@ -198,6 +203,7 @@ export default { tasks: [], newTaskText: '', newTaskCategory: null, + newTaskDeadLine: null, trackEvent, clearDoneDialog: false, } @@ -234,6 +240,7 @@ export default { text: this.newTaskText, list: idx, category: this.newTaskCategory, + deadline: this.newTaskDeadline, subtasks: [], } let result = await this.$store.state.db.put(task) @@ -241,6 +248,7 @@ export default { this.tasks.push(task) this.newTaskText = null this.newTaskCategory = null + this.newTaskDeadline = null trackEvent(this.$store, "task.created") await this.$store.dispatch('forceSync', {updateLastSync: false}) }, From 94e5b4751122f62a0b870999f66f3c5f9850fe6d Mon Sep 17 00:00:00 2001 From: "Ms. VX" Date: Fri, 26 Apr 2024 23:45:53 +0200 Subject: [PATCH 3/4] change how tasks deadlines are displayed --- src/components/TaskCard.vue | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/TaskCard.vue b/src/components/TaskCard.vue index ac3bb17..a7af24a 100644 --- a/src/components/TaskCard.vue +++ b/src/components/TaskCard.vue @@ -1,5 +1,15 @@