Use moment

This commit is contained in:
Jiiks 2018-11-26 09:55:59 +02:00
parent 4b8a905d2a
commit 83a4e0a114
1 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,7 @@
<div class="bd-remoteCardInfoBox bd-flex bd-flexGrow bd-flexCol">
<div class="bd-remoteCardInfo">{{item.installs}} Installs</div>
<div class="bd-remoteCardInfo">{{item.activeUsers}} Active Users</div>
<div class="bd-remoteCardInfo">Updated: Some time ago</div>
<div class="bd-remoteCardInfo">Updated {{fromNow()}}</div>
</div>
</div>
</div>
@ -36,6 +36,7 @@
</template>
<script>
import { Reflection } from 'modules';
export default {
props: ['item'],
data() {
@ -44,6 +45,10 @@
methods: {
resolveThumb() {
return `${this.item.repository.rawUri}/${this.item.files.previews[0].thumb}`;
},
fromNow() {
const { Moment } = Reflection.modules;
return Moment(this.item.updated).fromNow();
}
}
}