From 7808d14a49884f55fbeb3fd2d16eed9a34760ad7 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Thu, 22 Feb 2018 23:34:52 +0100 Subject: [PATCH] Human date component --- front/src/components/common/HumanDate.vue | 8 ++++++++ front/src/components/discussion/Comment.vue | 2 +- front/src/components/globals.js | 7 +++++++ front/src/main.js | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 front/src/components/common/HumanDate.vue create mode 100644 front/src/components/globals.js 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 }}
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)