aboutsummaryrefslogtreecommitdiff
path: root/src/components/timeago/timeago.vue
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2019-07-07 19:12:33 +0000
committerShpuld Shpludson <shp@cock.li>2019-07-07 19:12:33 +0000
commit54b0f9013388b24769c587abbf7ca76849ce9570 (patch)
tree2b1ff13b76993b88a384ae8d001e599493ab154c /src/components/timeago/timeago.vue
parent171673113fd353666ae9b593abec8f64ec9ea6ef (diff)
parent020c6d1bcfaf67ccb9ecdab13a39a1ddea868bb6 (diff)
Merge branch 'eslint-fix' into 'develop'
Fix shitton warning eslint gives See merge request pleroma/pleroma-fe!871
Diffstat (limited to 'src/components/timeago/timeago.vue')
-rw-r--r--src/components/timeago/timeago.vue19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/components/timeago/timeago.vue b/src/components/timeago/timeago.vue
index 3f185a2d..6df0524d 100644
--- a/src/components/timeago/timeago.vue
+++ b/src/components/timeago/timeago.vue
@@ -1,5 +1,8 @@
<template>
- <time :datetime="time" :title="localeDateString">
+ <time
+ :datetime="time"
+ :title="localeDateString"
+ >
{{ $t(relativeTime.key, [relativeTime.num]) }}
</time>
</template>
@@ -16,12 +19,6 @@ export default {
interval: null
}
},
- created () {
- this.refreshRelativeTimeObject()
- },
- destroyed () {
- clearTimeout(this.interval)
- },
computed: {
localeDateString () {
return typeof this.time === 'string'
@@ -29,6 +26,12 @@ export default {
: this.time.toLocaleString()
}
},
+ created () {
+ this.refreshRelativeTimeObject()
+ },
+ destroyed () {
+ clearTimeout(this.interval)
+ },
methods: {
refreshRelativeTimeObject () {
const nowThreshold = typeof this.nowThreshold === 'number' ? this.nowThreshold : 1
@@ -45,4 +48,4 @@ export default {
}
}
}
-</script> \ No newline at end of file
+</script>