New data model fix collections page & table

This commit is contained in:
advplyr 2022-03-20 16:16:39 -05:00
parent 27f1bd90f9
commit 122f2a2556
3 changed files with 12 additions and 22 deletions

View file

@ -6,7 +6,7 @@
<p class="font-mono text-sm">{{ books.length }}</p>
</div>
<div class="flex-grow" />
<p v-if="totalDuration">{{ totalDurationPretty }}</p>
<!-- <p v-if="totalDuration">{{ totalDurationPretty }}</p> -->
</div>
<draggable v-model="booksCopy" v-bind="dragOptions" class="list-group" handle=".drag-handle" draggable=".item" tag="div" @start="drag = true" @end="drag = false" @update="draggableUpdate">
<transition-group type="transition" :name="!drag ? 'collection-book' : null">
@ -56,16 +56,6 @@ export default {
},
bookCoverAspectRatio() {
return this.coverAspectRatio === this.$constants.BookCoverAspectRatio.SQUARE ? 1 : 1.6
},
totalDuration() {
var _total = 0
this.books.forEach((book) => {
_total += book.duration
})
return _total
},
totalDurationPretty() {
return this.$elapsedPretty(this.totalDuration)
}
},
methods: {