mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
fix(style): css fix, today if-statement added
This commit is contained in:
@@ -241,7 +241,7 @@
|
||||
>
|
||||
<div
|
||||
v-b-tooltip.hover.bottom="$t('dueDate')"
|
||||
class="svg-icon calendar"
|
||||
class="svg-icon calendar my-auto"
|
||||
v-html="icons.calendar"
|
||||
></div>
|
||||
<span>{{ $t('due') }} {{ formatDueDate() }}</span>
|
||||
@@ -899,8 +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';
|
||||
@@ -1130,6 +1129,9 @@ export default {
|
||||
return this.calculateTimeTillDue().asDays() < 0;
|
||||
},
|
||||
formatDueDate () {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user