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

Human date component

parent d0a9873a
No related branches found
No related tags found
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 @@
<div class="content">
<a class="author">{{ user.username }}</a>
<div class="metadata">
<div class="date">{{ date | ago }}</div>
<div class="date"><human-date :date="date"></human-date></div>
</div>
<div class="text" v-html="comment"></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'
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment