mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-03-19 00:18:34 +01:00
Fix set card size index on mount
This commit is contained in:
parent
e54535f465
commit
8c9fb0d45e
@ -102,6 +102,8 @@ export default {
|
|||||||
this.width = Math.max(0, this.width - this.rowPaddingX * 2)
|
this.width = Math.max(0, this.width - this.rowPaddingX * 2)
|
||||||
var booksPerRow = Math.floor(this.width / this.bookWidth)
|
var booksPerRow = Math.floor(this.width / this.bookWidth)
|
||||||
this.booksPerRow = booksPerRow
|
this.booksPerRow = booksPerRow
|
||||||
|
console.warn('this.selectedSizeIndex', this.selectedSizeIndex, 'Book Cover Size', this.bookCoverWidth)
|
||||||
|
console.warn('Books Per Row', this.booksPerRow, 'Width', this.width, 'Book Width', this.bookWidth)
|
||||||
},
|
},
|
||||||
getAudiobookCard(id) {
|
getAudiobookCard(id) {
|
||||||
if (this.$refs[`audiobookCard-${id}`] && this.$refs[`audiobookCard-${id}`].length) {
|
if (this.$refs[`audiobookCard-${id}`] && this.$refs[`audiobookCard-${id}`].length) {
|
||||||
@ -110,7 +112,9 @@ export default {
|
|||||||
return null
|
return null
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
this.selectedSizeIndex = this.$store.getters['user/getUserSetting']('bookshelfCoverSize')
|
var bookshelfCoverSize = this.$store.getters['user/getUserSetting']('bookshelfCoverSize')
|
||||||
|
var sizeIndex = this.availableSizes.findIndex((s) => s === bookshelfCoverSize)
|
||||||
|
if (!isNaN(sizeIndex)) this.selectedSizeIndex = sizeIndex
|
||||||
this.calculateBookshelf()
|
this.calculateBookshelf()
|
||||||
},
|
},
|
||||||
resize() {
|
resize() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf-client",
|
"name": "audiobookshelf-client",
|
||||||
"version": "0.9.82-beta",
|
"version": "0.9.83-beta",
|
||||||
"description": "Audiobook manager and player",
|
"description": "Audiobook manager and player",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf",
|
"name": "audiobookshelf",
|
||||||
"version": "0.9.82-beta",
|
"version": "0.9.83-beta",
|
||||||
"description": "Self-hosted audiobook server for managing and playing audiobooks.",
|
"description": "Self-hosted audiobook server for managing and playing audiobooks.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
Reference in New Issue
Block a user