mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
fix(style): css fix, today if-statement added
This commit is contained in:
parent
60b180681e
commit
86b15cb580
1 changed files with 5 additions and 3 deletions
|
|
@ -241,7 +241,7 @@
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-b-tooltip.hover.bottom="$t('dueDate')"
|
v-b-tooltip.hover.bottom="$t('dueDate')"
|
||||||
class="svg-icon calendar"
|
class="svg-icon calendar my-auto"
|
||||||
v-html="icons.calendar"
|
v-html="icons.calendar"
|
||||||
></div>
|
></div>
|
||||||
<span>{{ $t('due') }} {{ formatDueDate() }}</span>
|
<span>{{ $t('due') }} {{ formatDueDate() }}</span>
|
||||||
|
|
@ -899,8 +899,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<!-- eslint-enable max-len -->
|
<!-- eslint-enable max-len -->
|
||||||
|
<!-- eslint-disable-next-line vue/component-tags-order -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
|
|
@ -1130,6 +1129,9 @@ export default {
|
||||||
return this.calculateTimeTillDue().asDays() < 0;
|
return this.calculateTimeTillDue().asDays() < 0;
|
||||||
},
|
},
|
||||||
formatDueDate () {
|
formatDueDate () {
|
||||||
|
if (moment().isSame(this.task.date, 'day')) {
|
||||||
|
return this.$t('today');
|
||||||
|
}
|
||||||
return moment(this.task.date).format(this.user.preferences.dateFormat.toUpperCase());
|
return moment(this.task.date).format(this.user.preferences.dateFormat.toUpperCase());
|
||||||
},
|
},
|
||||||
edit (e, task) {
|
edit (e, task) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue