Feat/personal highscore #44

Merged
KevinMidboe merged 19 commits from feat/personal-highscore into master 2020-10-11 16:19:52 +00:00
Showing only changes of commit 584d497c6a - Show all commits

View File

@@ -22,7 +22,9 @@
<h4 class="el-spacing">Flasker vunnet:</h4>
<div v-for="win in winner.highscore">
<span class="date-won">{{ humanReadableDate(win.date) }} - {{ daysAgo(win.date) }} dager siden</span>
<router-link :to="winDateUrl(win.date)" class="days-ago">
{{ humanReadableDate(win.date) }} - {{ daysAgo(win.date) }} dager siden
</router-link>
<div class="won-wine">
<img :src="win.wine.image">
@@ -81,6 +83,10 @@ export default {
})
return colorOccurences
},
winDateUrl(date) {
const timestamp = new Date(date).getTime();
return `/history/${timestamp}`
},
humanReadableDate: humanReadableDate,
daysAgo: daysAgo
},