diff --git a/front/src/components/common/HumanDate.vue b/front/src/components/common/HumanDate.vue new file mode 100644 index 000000000..ff6ff5c71 --- /dev/null +++ b/front/src/components/common/HumanDate.vue @@ -0,0 +1,8 @@ + + diff --git a/front/src/components/discussion/Comment.vue b/front/src/components/discussion/Comment.vue index c10d13bc0..a3c5176ec 100644 --- a/front/src/components/discussion/Comment.vue +++ b/front/src/components/discussion/Comment.vue @@ -3,7 +3,7 @@
{{ user.username }}
-
{{ date | ago }}
+
diff --git a/front/src/components/globals.js b/front/src/components/globals.js new file mode 100644 index 000000000..40315bc47 --- /dev/null +++ b/front/src/components/globals.js @@ -0,0 +1,7 @@ +import Vue from 'vue' + +import HumanDate from '@/components/common/HumanDate' + +Vue.component('human-date', HumanDate) + +export default {} diff --git a/front/src/main.js b/front/src/main.js index 33e998ded..2e351310a 100644 --- a/front/src/main.js +++ b/front/src/main.js @@ -14,6 +14,7 @@ import store from './store' import config from './config' import { sync } from 'vuex-router-sync' import filters from '@/filters' // eslint-disable-line +import globals from '@/components/globals' // eslint-disable-line sync(store, router)