fix(webui): show recent books before series

This commit is contained in:
Gauthier Roebroeck 2021-05-27 09:52:14 +08:00
parent c3b352aca0
commit 7f49bfa05e

View file

@ -75,6 +75,21 @@
</template>
</horizontal-scroller>
<horizontal-scroller v-if="latestBooks.length !== 0" class="mb-4">
<template v-slot:prepend>
<div class="title">{{ $t('dashboard.recently_added_books') }}</div>
</template>
<template v-slot:content>
<item-browser :items="latestBooks"
nowrap
:edit-function="singleEditBook"
:selected.sync="selectedBooks"
:selectable="selectedSeries.length === 0"
:fixed-item-width="fixedCardWidth"
/>
</template>
</horizontal-scroller>
<horizontal-scroller v-if="newSeries.length !== 0" class="mb-4">
<template v-slot:prepend>
<div class="title">{{ $t('dashboard.recently_added_series') }}</div>
@ -104,21 +119,6 @@
/>
</template>
</horizontal-scroller>
<horizontal-scroller v-if="latestBooks.length !== 0" class="mb-4">
<template v-slot:prepend>
<div class="title">{{ $t('dashboard.recently_added_books') }}</div>
</template>
<template v-slot:content>
<item-browser :items="latestBooks"
nowrap
:edit-function="singleEditBook"
:selected.sync="selectedBooks"
:selectable="selectedSeries.length === 0"
:fixed-item-width="fixedCardWidth"
/>
</template>
</horizontal-scroller>
</v-container>
</div>
</template>
@ -227,11 +227,11 @@ export default Vue.extend({
this.library = this.getLibraryLazy(libraryId)
this.selectedSeries = []
this.selectedBooks = []
this.loadNewSeries(libraryId)
this.loadUpdatedSeries(libraryId)
this.loadLatestBooks(libraryId)
this.loadInProgressBooks(libraryId)
this.loadOnDeckBooks(libraryId)
this.loadLatestBooks(libraryId)
this.loadNewSeries(libraryId)
this.loadUpdatedSeries(libraryId)
},
replaceSeries(series: SeriesDto) {
let index = this.newSeries.findIndex(x => x.id === series.id)