Merge branch 'due-dates-in-todos' into release

This commit is contained in:
SabreCat
2023-05-25 14:42:46 -05:00
2 changed files with 10 additions and 104 deletions
+10 -10
View File
@@ -241,10 +241,10 @@
>
<div
v-b-tooltip.hover.bottom="$t('dueDate')"
class="svg-icon calendar"
class="svg-icon calendar my-auto"
v-html="icons.calendar"
></div>
<span>{{ formatDueDate() }}</span>
<span>{{ $t('due') }} {{ formatDueDate() }}</span>
</div>
<div class="icons-right d-flex justify-content-end">
<div
@@ -701,7 +701,7 @@
.icons {
margin-top: 4px;
color: $gray-300;
color: $gray-100;
font-style: normal;
&-right {
@@ -760,7 +760,7 @@
}
.due-overdue {
color: $red-50;
color: $maroon-10;
}
.calendar.svg-icon {
@@ -899,7 +899,7 @@
}
</style>
<!-- eslint-enable max-len -->
<!-- eslint-disable-next-line vue/component-tags-order -->
<script>
import moment from 'moment';
import { v4 as uuid } from 'uuid';
@@ -1126,13 +1126,13 @@ export default {
return moment.duration(endOfDueDate.diff(endOfToday));
},
checkIfOverdue () {
return this.calculateTimeTillDue().asDays() <= 0;
return this.calculateTimeTillDue().asDays() < 0;
},
formatDueDate () {
const timeTillDue = this.calculateTimeTillDue();
const dueIn = timeTillDue.asDays() === 0 ? this.$t('today') : timeTillDue.humanize(true);
return this.task.date && this.$t('dueIn', { dueIn });
if (moment().isSame(this.task.date, 'day')) {
return this.$t('today');
}
return moment(this.task.date).format(this.user.preferences.dateFormat.toUpperCase());
},
edit (e, task) {
if (this.isRunningYesterdailies) return;