From 2fe5699b8ffd0a5acfbd5abcee3237f2f4e6d286 Mon Sep 17 00:00:00 2001 From: floatingghost Date: Wed, 3 Aug 2022 14:07:18 +0000 Subject: [PATCH] only include direction on timestamps when required (#108) Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/108 --- src/components/notification/notification.vue | 1 + src/components/status/status.vue | 1 + src/components/timeago/timeago.vue | 19 +++++++++++++------ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index cc12bace..72e31a0c 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -151,6 +151,7 @@ > diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 6c80e293..aef375fa 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -187,6 +187,7 @@ > diff --git a/src/components/timeago/timeago.vue b/src/components/timeago/timeago.vue index d03d9596..e042a30a 100644 --- a/src/components/timeago/timeago.vue +++ b/src/components/timeago/timeago.vue @@ -4,11 +4,18 @@ :title="localeDateString" :class="{ warning: relativeTime.direction === 'time.in_future' }" > - {{ - relativeTime.direction === '' ? - $tc(relativeTime.key, relativeTime.num, [relativeTime.num]) : - $t(relativeTime.direction, [$tc(relativeTime.key, relativeTime.num, [relativeTime.num])]) - }} + + @@ -18,7 +25,7 @@ import localeService from 'src/services/locale/locale.service.js' export default { name: 'Timeago', - props: ['time', 'autoUpdate', 'longFormat', 'nowThreshold'], + props: ['time', 'autoUpdate', 'longFormat', 'nowThreshold', 'withDirection'], data () { return { relativeTime: { key: 'time.now', num: 0 },