Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/components/TaskBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
:title="t('tasks', 'Task has a note')"
@click="openAppSidebarTab($event, 'app-sidebar-tab-notes')"
@dblclick.stop="openAppSidebarTab($event, 'app-sidebar-tab-notes', true)" />
<div v-if="task.start || task.due || task.completed" :class="{'date--overdue': overdue(task.startMoment || task.dueMoment) && !task.completed}" class="date">
<div v-if="task.due || task.completed" :class="{'date--overdue': overdue(task.dueMoment) && !task.completed}" class="date">
<span class="date__short" :class="{ 'date__short--completed': task.completed }">{{ dueDateShort }}</span>
<span class="date__long" :class="{ 'date__long--date-only': task.allDay && !task.completed, 'date__long--completed': task.completed }">{{ dueDateLong }}</span>
</div>
Expand Down Expand Up @@ -289,10 +289,9 @@ export default {
}),

dueDateShort() {
const taskDate = this.task.startMoment.isValid() ? this.task.startMoment : this.task.dueMoment
if (!this.task.completed) {
return taskDate.isValid()
? taskDate.calendar(null, {
return this.task.dueMoment.isValid()
? this.task.dueMoment.calendar(null, {
// TRANSLATORS This is a string for moment.js. The square brackets escape the string from moment.js. Please translate the string and keep the brackets.
lastDay: t('tasks', '[Yesterday]'),
// TRANSLATORS This is a string for moment.js. The square brackets escape the string from moment.js. Please translate the string and keep the brackets.
Expand Down Expand Up @@ -328,10 +327,9 @@ export default {
if (this.task.allDay) {
return this.dueDateShort
}
const taskDate = this.task.startMoment.isValid() ? this.task.startMoment : this.task.dueMoment
if (!this.task.completed) {
return taskDate.isValid()
? taskDate.calendar(null, {
return this.task.dueMoment.isValid()
? this.task.dueMoment.calendar(null, {
// TRANSLATORS This is a string for moment.js. The square brackets escape the string from moment.js. Please translate the string and keep the brackets.
lastDay: t('tasks', '[Yesterday at] LT'),
// TRANSLATORS This is a string for moment.js. The square brackets escape the string from moment.js. Please translate the string and keep the brackets.
Expand Down
Loading