Update:Collections page show total duration #303

This commit is contained in:
advplyr 2022-08-04 18:23:09 -05:00
parent 9082b76707
commit 92a31c246c
2 changed files with 26 additions and 3 deletions

View file

@ -8,7 +8,7 @@
</div>
<div class="flex-grow" />
<p v-if="totalDuration">{{ totalDurationPretty }}</p>
<p v-if="totalDuration" class="text-sm text-gray-200">{{ totalDurationPretty }}</p>
</div>
<template v-for="book in booksCopy">
<tables-collection-book-table-row :key="book.id" :book="book" :collection-id="collectionId" class="item collection-book-item" @edit="editBook" />
@ -41,12 +41,12 @@ export default {
totalDuration() {
var _total = 0
this.books.forEach((book) => {
_total += book.duration
_total += book.media.duration
})
return _total
},
totalDurationPretty() {
return this.$elapsedPretty(this.totalDuration)
return this.$elapsedPrettyExtended(this.totalDuration)
}
},
methods: {