Fix:LazyBookshelf default to square cover before server settings are loaded

This commit is contained in:
advplyr 2022-05-13 13:42:38 -05:00
parent 0fd9463c7c
commit 1ee544b842
2 changed files with 6 additions and 10 deletions

View file

@ -83,14 +83,11 @@ export default {
filterBy() {
return this.$store.getters['user/getUserSetting']('mobileFilterBy')
},
coverAspectRatio() {
return this.$store.getters['getServerSetting']('coverAspectRatio')
},
isCoverSquareAspectRatio() {
return this.coverAspectRatio === this.$constants.BookCoverAspectRatio.SQUARE
return this.bookCoverAspectRatio === 1
},
bookCoverAspectRatio() {
return this.isCoverSquareAspectRatio ? 1 : 1.6
return this.$store.getters['getBookCoverAspectRatio']
},
bookWidth() {
var coverSize = 100
@ -300,7 +297,6 @@ export default {
this.bookshelfHeight = clientHeight
this.bookshelfWidth = clientWidth
this.entitiesPerShelf = this.showBookshelfListView ? 1 : Math.floor((this.bookshelfWidth - 16) / this.totalEntityCardWidth)
this.shelvesPerPage = Math.ceil(this.bookshelfHeight / this.shelfHeight) + 2
this.bookshelfMarginLeft = (this.bookshelfWidth - this.entitiesPerShelf * this.totalEntityCardWidth) / 2