Many fixes n stuff
This commit is contained in:
@ -1,22 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-list highlight inset-separator sparse no-border>
|
||||
<q-list-header>Quoi de neuf</q-list-header>
|
||||
<q-item-label header>Quoi de neuf</q-item-label>
|
||||
<q-item mulitline
|
||||
link
|
||||
v-for="history in lastHistory"
|
||||
:key="history.timestamp"
|
||||
:to="`item/${history.ref}`"
|
||||
>
|
||||
<q-item-side :icon="history.image ? 'image' : 'chat'" />
|
||||
<q-item-main>
|
||||
<q-item-tile lines="3" label>{{ history.text }}</q-item-tile>
|
||||
<q-item-tile sublabel>
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="history.image ? 'image' : 'chat'"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label lines="3" label>{{ history.text }}</q-item-label>
|
||||
<q-item-label caption>
|
||||
<span class="text-secondary">{{history.user}}</span>
|
||||
, au sujet de <b>{{ history.item.name}}</b> #{{history.ref}}
|
||||
</q-item-tile>
|
||||
</q-item-main>
|
||||
<q-item-side right :stamp="timeAgo(history.timestamp)"/>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side top>
|
||||
<q-item-label caption>{{timeAgo(history.created)}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
@ -52,6 +57,7 @@ export default {
|
||||
return date.formatDate(timestamp, format)
|
||||
},
|
||||
timeAgo (timestamp) {
|
||||
console.log('timestamp', timestamp)
|
||||
let date1 = new Date(timestamp)
|
||||
let date2 = Date.now()
|
||||
let hoursDiff = date.getDateDiff(date2, date1, 'hours')
|
||||
|
||||
Reference in New Issue
Block a user