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
|
<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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user