Skip to content
Snippets Groups Projects
Verified Commit 7808d14a authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Human date component

parent d0a9873a
Branches
Tags
No related merge requests found
<template>
<time :datetime="date" :title="date | moment">{{ date | ago }}</time>
</template>
<script>
export default {
props: ['date']
}
</script>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="content"> <div class="content">
<a class="author">{{ user.username }}</a> <a class="author">{{ user.username }}</a>
<div class="metadata"> <div class="metadata">
<div class="date">{{ date | ago }}</div> <div class="date"><human-date :date="date"></human-date></div>
</div> </div>
<div class="text" v-html="comment"></div> <div class="text" v-html="comment"></div>
</div> </div>
......
import Vue from 'vue'
import HumanDate from '@/components/common/HumanDate'
Vue.component('human-date', HumanDate)
export default {}
...@@ -14,6 +14,7 @@ import store from './store' ...@@ -14,6 +14,7 @@ import store from './store'
import config from './config' import config from './config'
import { sync } from 'vuex-router-sync' import { sync } from 'vuex-router-sync'
import filters from '@/filters' // eslint-disable-line import filters from '@/filters' // eslint-disable-line
import globals from '@/components/globals' // eslint-disable-line
sync(store, router) sync(store, router)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment