mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 06:37:16 +02:00
Update:Authors page increase size to fill width with 2 per row #1026
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<div id="bookshelf" class="w-full h-full p-4 overflow-y-auto">
|
<div id="bookshelf" class="w-full h-full p-4 overflow-y-auto">
|
||||||
<div class="flex flex-wrap justify-center">
|
<div class="flex flex-wrap justify-center">
|
||||||
<template v-for="author in authors">
|
<template v-for="author in authors">
|
||||||
<cards-author-card :key="author.id" :author="author" :width="96" :height="120" class="p-2" />
|
<cards-author-card :key="author.id" :author="author" :width="cardWidth" :height="cardHeight" class="p-2" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -16,16 +16,21 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
authors: [],
|
authors: [],
|
||||||
loadedLibraryId: null
|
loadedLibraryId: null,
|
||||||
|
cardWidth: 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentLibraryId() {
|
currentLibraryId() {
|
||||||
return this.$store.state.libraries.currentLibraryId
|
return this.$store.state.libraries.currentLibraryId
|
||||||
|
},
|
||||||
|
cardHeight() {
|
||||||
|
return this.cardWidth * 1.25
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async init() {
|
async init() {
|
||||||
|
this.cardWidth = (window.innerWidth - 64) / 2
|
||||||
if (!this.currentLibraryId) {
|
if (!this.currentLibraryId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user