mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +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) | ||||
|       var booksPerRow = Math.floor(this.width / this.bookWidth) | ||||
|       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) { | ||||
|       if (this.$refs[`audiobookCard-${id}`] && this.$refs[`audiobookCard-${id}`].length) { | ||||
| @ -110,7 +112,9 @@ export default { | ||||
|       return null | ||||
|     }, | ||||
|     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() | ||||
|     }, | ||||
|     resize() { | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "audiobookshelf-client", | ||||
|   "version": "0.9.82-beta", | ||||
|   "version": "0.9.83-beta", | ||||
|   "description": "Audiobook manager and player", | ||||
|   "main": "index.js", | ||||
|   "scripts": { | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "audiobookshelf", | ||||
|   "version": "0.9.82-beta", | ||||
|   "version": "0.9.83-beta", | ||||
|   "description": "Self-hosted audiobook server for managing and playing audiobooks.", | ||||
|   "main": "index.js", | ||||
|   "scripts": { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user