2021-11-29 02:36:44 +01:00
|
|
|
<template>
|
|
|
|
<div id="bookshelf" class="w-full overflow-y-auto">
|
|
|
|
<template v-for="shelf in totalShelves">
|
2022-11-13 20:25:20 +01:00
|
|
|
<div :key="shelf" :id="`shelf-${shelf - 1}`" class="w-full px-4 sm:px-8 relative" :class="{ bookshelfRow: !isAlternativeBookshelfView }" :style="{ height: shelfHeight + 'px' }">
|
|
|
|
<div v-if="!isAlternativeBookshelfView" class="bookshelfDivider w-full absolute bottom-0 left-0 right-0 z-20" :class="`h-${shelfDividerHeightIndex}`" />
|
2021-11-29 02:36:44 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
2021-12-01 03:02:40 +01:00
|
|
|
|
2022-11-13 20:25:20 +01:00
|
|
|
<div v-if="initialized && !totalShelves && !hasFilter && entityName === 'books'" class="w-full flex flex-col items-center justify-center py-12">
|
2022-03-27 22:37:04 +02:00
|
|
|
<p class="text-center text-2xl font-book mb-4 py-4">{{ libraryName }} Library is empty!</p>
|
2022-05-04 02:16:16 +02:00
|
|
|
<div v-if="userIsAdminOrUp" class="flex">
|
2021-12-02 02:07:03 +01:00
|
|
|
<ui-btn to="/config" color="primary" class="w-52 mr-2">Configure Scanner</ui-btn>
|
2022-03-19 01:16:54 +01:00
|
|
|
<ui-btn color="success" class="w-52" @click="scan">Scan Library</ui-btn>
|
2021-12-02 02:07:03 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else-if="!totalShelves && initialized" class="w-full py-16">
|
2021-12-01 03:02:40 +01:00
|
|
|
<p class="text-xl text-center">{{ emptyMessage }}</p>
|
2022-04-21 15:30:44 +02:00
|
|
|
<!-- Clear filter only available on Library bookshelf -->
|
|
|
|
<div v-if="entityName === 'books'" class="flex justify-center mt-2">
|
2022-01-10 01:37:16 +01:00
|
|
|
<ui-btn v-if="hasFilter" color="primary" @click="clearFilter">Clear Filter</ui-btn>
|
|
|
|
</div>
|
2021-12-01 03:02:40 +01:00
|
|
|
</div>
|
2021-12-02 02:07:03 +01:00
|
|
|
|
|
|
|
<widgets-cover-size-widget class="fixed bottom-4 right-4 z-30" />
|
2021-11-29 02:36:44 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-12-01 03:02:40 +01:00
|
|
|
import bookshelfCardsHelpers from '@/mixins/bookshelfCardsHelpers'
|
2021-11-29 02:36:44 +01:00
|
|
|
|
|
|
|
export default {
|
2021-12-01 03:02:40 +01:00
|
|
|
props: {
|
2021-12-02 02:07:03 +01:00
|
|
|
page: String,
|
|
|
|
seriesId: String
|
2021-12-01 03:02:40 +01:00
|
|
|
},
|
|
|
|
mixins: [bookshelfCardsHelpers],
|
2021-11-29 02:36:44 +01:00
|
|
|
data() {
|
|
|
|
return {
|
2022-05-19 01:37:38 +02:00
|
|
|
routeFullPath: null,
|
2021-11-29 02:36:44 +01:00
|
|
|
initialized: false,
|
|
|
|
bookshelfHeight: 0,
|
|
|
|
bookshelfWidth: 0,
|
|
|
|
shelvesPerPage: 0,
|
2021-12-01 03:02:40 +01:00
|
|
|
entitiesPerShelf: 8,
|
2021-11-29 02:36:44 +01:00
|
|
|
currentPage: 0,
|
2021-12-01 03:02:40 +01:00
|
|
|
totalEntities: 0,
|
|
|
|
entities: [],
|
2021-11-29 02:36:44 +01:00
|
|
|
pagesLoaded: {},
|
2021-12-01 03:02:40 +01:00
|
|
|
entityIndexesMounted: [],
|
|
|
|
entityComponentRefs: {},
|
2021-12-02 02:07:03 +01:00
|
|
|
currentBookWidth: 0,
|
2021-11-29 02:36:44 +01:00
|
|
|
pageLoadQueue: [],
|
2021-12-01 03:02:40 +01:00
|
|
|
isFetchingEntities: false,
|
2021-11-29 02:36:44 +01:00
|
|
|
scrollTimeout: null,
|
2021-12-24 23:37:57 +01:00
|
|
|
booksPerFetch: 100,
|
2021-11-29 02:36:44 +01:00
|
|
|
totalShelves: 0,
|
2021-12-01 03:02:40 +01:00
|
|
|
bookshelfMarginLeft: 0,
|
|
|
|
isSelectionMode: false,
|
|
|
|
currentSFQueryString: null,
|
|
|
|
pendingReset: false,
|
2021-12-02 02:07:03 +01:00
|
|
|
keywordFilter: null,
|
2021-12-13 02:48:29 +01:00
|
|
|
currScrollTop: 0,
|
|
|
|
resizeTimeout: null,
|
2022-10-16 00:17:40 +02:00
|
|
|
mountWindowWidth: 0,
|
|
|
|
lastItemIndexSelected: -1
|
2021-12-02 02:07:03 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
'$route.query.filter'() {
|
|
|
|
if (this.$route.query.filter && this.$route.query.filter !== this.filterBy) {
|
|
|
|
this.$store.dispatch('user/updateUserSettings', { filterBy: this.$route.query.filter })
|
|
|
|
} else if (!this.$route.query.filter && this.filterBy) {
|
|
|
|
this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' })
|
|
|
|
}
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2022-05-04 02:16:16 +02:00
|
|
|
userIsAdminOrUp() {
|
|
|
|
return this.$store.getters['user/getIsAdminOrUp']
|
2021-12-02 02:07:03 +01:00
|
|
|
},
|
|
|
|
showExperimentalFeatures() {
|
|
|
|
return this.$store.state.showExperimentalFeatures
|
|
|
|
},
|
2022-04-12 02:42:09 +02:00
|
|
|
isPodcast() {
|
|
|
|
return this.$store.getters['libraries/getCurrentLibraryMediaType'] == 'podcast'
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
emptyMessage() {
|
2022-04-24 02:41:06 +02:00
|
|
|
if (this.page === 'series') return 'You have no series'
|
2021-12-01 03:02:40 +01:00
|
|
|
if (this.page === 'collections') return "You haven't made any collections yet"
|
2022-04-24 02:41:06 +02:00
|
|
|
if (this.hasFilter) {
|
|
|
|
if (this.filterName === 'Issues') return 'No Issues'
|
2022-08-06 14:58:19 +02:00
|
|
|
else if (this.filterName === 'Feed-open') return 'No RSS feeds are open'
|
2022-04-24 02:41:06 +02:00
|
|
|
return `No Results for filter "${this.filterName}: ${this.filterValue}"`
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
return 'No results'
|
|
|
|
},
|
|
|
|
entityName() {
|
2021-12-02 02:07:03 +01:00
|
|
|
if (!this.page) return 'books'
|
|
|
|
return this.page
|
2021-12-01 03:02:40 +01:00
|
|
|
},
|
2022-10-29 01:10:19 +02:00
|
|
|
seriesSortBy() {
|
2022-10-29 18:17:51 +02:00
|
|
|
return this.$store.state.libraries.seriesSortBy
|
2022-10-29 01:10:19 +02:00
|
|
|
},
|
|
|
|
seriesSortDesc() {
|
|
|
|
return this.$store.state.libraries.seriesSortDesc
|
|
|
|
},
|
2022-10-29 22:33:38 +02:00
|
|
|
seriesFilterBy() {
|
|
|
|
return this.$store.state.libraries.seriesFilterBy
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
orderBy() {
|
2021-11-29 02:36:44 +01:00
|
|
|
return this.$store.getters['user/getUserSetting']('orderBy')
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
orderDesc() {
|
2021-11-29 02:36:44 +01:00
|
|
|
return this.$store.getters['user/getUserSetting']('orderDesc')
|
|
|
|
},
|
|
|
|
filterBy() {
|
|
|
|
return this.$store.getters['user/getUserSetting']('filterBy')
|
|
|
|
},
|
2022-01-25 01:03:54 +01:00
|
|
|
collapseSeries() {
|
|
|
|
return this.$store.getters['user/getUserSetting']('collapseSeries')
|
|
|
|
},
|
2022-11-03 14:11:33 +01:00
|
|
|
collapseBookSeries() {
|
|
|
|
return this.$store.getters['user/getUserSetting']('collapseBookSeries')
|
|
|
|
},
|
2021-12-02 22:49:03 +01:00
|
|
|
coverAspectRatio() {
|
2022-08-13 20:56:37 +02:00
|
|
|
return this.$store.getters['libraries/getBookCoverAspectRatio']
|
2021-12-02 22:49:03 +01:00
|
|
|
},
|
2022-02-14 23:01:53 +01:00
|
|
|
sortingIgnorePrefix() {
|
|
|
|
return this.$store.getters['getServerSetting']('sortingIgnorePrefix')
|
|
|
|
},
|
2021-12-02 22:49:03 +01:00
|
|
|
isCoverSquareAspectRatio() {
|
2022-08-13 20:56:37 +02:00
|
|
|
return this.coverAspectRatio == 1
|
2021-12-02 22:49:03 +01:00
|
|
|
},
|
2022-08-14 01:18:42 +02:00
|
|
|
bookshelfView() {
|
|
|
|
return this.$store.getters['getBookshelfView']
|
|
|
|
},
|
2021-12-28 22:50:17 +01:00
|
|
|
isAlternativeBookshelfView() {
|
2022-10-22 16:13:20 +02:00
|
|
|
return this.bookshelfView === this.$constants.BookshelfView.DETAIL
|
2021-12-28 22:50:17 +01:00
|
|
|
},
|
2021-12-02 02:07:03 +01:00
|
|
|
hasFilter() {
|
|
|
|
return this.filterBy && this.filterBy !== 'all'
|
|
|
|
},
|
2022-01-10 01:37:16 +01:00
|
|
|
filterName() {
|
|
|
|
if (!this.filterBy) return ''
|
|
|
|
var filter = this.filterBy.split('.')[0]
|
|
|
|
filter = filter.substr(0, 1).toUpperCase() + filter.substr(1)
|
|
|
|
return filter
|
|
|
|
},
|
|
|
|
filterValue() {
|
|
|
|
if (!this.filterBy) return ''
|
|
|
|
if (!this.filterBy.includes('.')) return ''
|
|
|
|
return this.$decode(this.filterBy.split('.')[1])
|
|
|
|
},
|
2021-11-29 02:36:44 +01:00
|
|
|
currentLibraryId() {
|
|
|
|
return this.$store.state.libraries.currentLibraryId
|
|
|
|
},
|
2022-03-27 22:37:04 +02:00
|
|
|
libraryName() {
|
|
|
|
return this.$store.getters['libraries/getCurrentLibraryName']
|
|
|
|
},
|
2021-12-02 22:49:03 +01:00
|
|
|
isEntityBook() {
|
|
|
|
return this.entityName === 'series-books' || this.entityName === 'books'
|
|
|
|
},
|
2021-12-02 02:07:03 +01:00
|
|
|
bookWidth() {
|
2021-12-02 22:49:03 +01:00
|
|
|
var coverSize = this.$store.getters['user/getUserSetting']('bookshelfCoverSize')
|
|
|
|
if (this.isCoverSquareAspectRatio) return coverSize * 1.6
|
|
|
|
return coverSize
|
|
|
|
},
|
|
|
|
bookHeight() {
|
|
|
|
if (this.isCoverSquareAspectRatio) return this.bookWidth
|
|
|
|
return this.bookWidth * 1.6
|
2021-12-02 02:07:03 +01:00
|
|
|
},
|
2021-12-18 03:52:11 +01:00
|
|
|
shelfPadding() {
|
|
|
|
if (this.bookshelfWidth < 640) return 32
|
|
|
|
return 64
|
|
|
|
},
|
|
|
|
totalPadding() {
|
|
|
|
return this.shelfPadding * 2
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
entityWidth() {
|
2021-12-18 03:52:11 +01:00
|
|
|
if (this.entityName === 'series' || this.entityName === 'collections') {
|
|
|
|
if (this.bookWidth * 2 > this.bookshelfWidth - this.shelfPadding) return this.bookWidth * 1.6
|
|
|
|
return this.bookWidth * 2
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
return this.bookWidth
|
|
|
|
},
|
2021-12-02 22:49:03 +01:00
|
|
|
entityHeight() {
|
|
|
|
return this.bookHeight
|
2021-11-29 02:36:44 +01:00
|
|
|
},
|
|
|
|
shelfDividerHeightIndex() {
|
|
|
|
return 6
|
|
|
|
},
|
|
|
|
shelfHeight() {
|
2022-05-10 01:23:23 +02:00
|
|
|
if (this.isAlternativeBookshelfView) {
|
|
|
|
var extraTitleSpace = this.isEntityBook ? 80 : 40
|
|
|
|
return this.entityHeight + extraTitleSpace * this.sizeMultiplier
|
|
|
|
}
|
2021-12-02 22:49:03 +01:00
|
|
|
return this.entityHeight + 40
|
2021-11-29 02:36:44 +01:00
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
totalEntityCardWidth() {
|
2021-11-29 02:36:44 +01:00
|
|
|
// Includes margin
|
2021-12-01 03:02:40 +01:00
|
|
|
return this.entityWidth + 24
|
2021-11-29 02:36:44 +01:00
|
|
|
},
|
2022-03-13 23:10:48 +01:00
|
|
|
selectedLibraryItems() {
|
|
|
|
return this.$store.state.selectedLibraryItems || []
|
2021-12-28 22:50:17 +01:00
|
|
|
},
|
|
|
|
sizeMultiplier() {
|
|
|
|
var baseSize = this.isCoverSquareAspectRatio ? 192 : 120
|
|
|
|
return this.entityWidth / baseSize
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
2022-01-10 01:37:16 +01:00
|
|
|
clearFilter() {
|
|
|
|
this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' })
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
editEntity(entity) {
|
2021-12-02 02:07:03 +01:00
|
|
|
if (this.entityName === 'books' || this.entityName === 'series-books') {
|
2021-12-01 03:02:40 +01:00
|
|
|
var bookIds = this.entities.map((e) => e.id)
|
|
|
|
this.$store.commit('setBookshelfBookIds', bookIds)
|
|
|
|
this.$store.commit('showEditModal', entity)
|
2021-12-02 02:07:03 +01:00
|
|
|
} else if (this.entityName === 'collections') {
|
|
|
|
this.$store.commit('globals/setEditCollection', entity)
|
2021-12-01 03:02:40 +01:00
|
|
|
}
|
|
|
|
},
|
2021-12-02 02:07:03 +01:00
|
|
|
clearSelectedEntities() {
|
2021-12-01 03:02:40 +01:00
|
|
|
this.updateBookSelectionMode(false)
|
|
|
|
this.isSelectionMode = false
|
|
|
|
},
|
2022-10-16 00:17:40 +02:00
|
|
|
selectEntity(entity, shiftKey) {
|
2021-12-02 02:07:03 +01:00
|
|
|
if (this.entityName === 'books' || this.entityName === 'series-books') {
|
2022-10-16 00:17:40 +02:00
|
|
|
var indexOf = this.entities.findIndex((ent) => ent && ent.id === entity.id)
|
|
|
|
const lastLastItemIndexSelected = this.lastItemIndexSelected
|
|
|
|
if (!this.selectedLibraryItems.includes(entity.id)) {
|
|
|
|
this.lastItemIndexSelected = indexOf
|
|
|
|
} else {
|
|
|
|
this.lastItemIndexSelected = -1
|
|
|
|
}
|
|
|
|
|
|
|
|
if (shiftKey && lastLastItemIndexSelected >= 0) {
|
|
|
|
var loopStart = indexOf
|
|
|
|
var loopEnd = lastLastItemIndexSelected
|
|
|
|
if (indexOf > lastLastItemIndexSelected) {
|
|
|
|
loopStart = lastLastItemIndexSelected
|
|
|
|
loopEnd = indexOf
|
|
|
|
}
|
|
|
|
|
|
|
|
var isSelecting = false
|
|
|
|
// If any items in this range is not selected then select all otherwise unselect all
|
|
|
|
for (let i = loopStart; i <= loopEnd; i++) {
|
|
|
|
const thisEntity = this.entities[i]
|
|
|
|
if (thisEntity && !thisEntity.collapsedSeries) {
|
|
|
|
if (!this.selectedLibraryItems.includes(thisEntity.id)) {
|
|
|
|
isSelecting = true
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isSelecting) this.lastItemIndexSelected = indexOf
|
|
|
|
|
|
|
|
for (let i = loopStart; i <= loopEnd; i++) {
|
|
|
|
const thisEntity = this.entities[i]
|
|
|
|
if (thisEntity.collapsedSeries) {
|
|
|
|
console.warn('Ignoring collapsed series')
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
const entityComponentRef = this.entityComponentRefs[i]
|
|
|
|
if (thisEntity && entityComponentRef) {
|
|
|
|
entityComponentRef.selected = isSelecting
|
|
|
|
this.$store.commit('setLibraryItemSelected', { libraryItemId: thisEntity.id, selected: isSelecting })
|
|
|
|
} else {
|
|
|
|
console.error('Invalid entity index', i)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
this.$store.commit('toggleLibraryItemSelected', entity.id)
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
|
2022-03-13 23:10:48 +01:00
|
|
|
var newIsSelectionMode = !!this.selectedLibraryItems.length
|
2021-12-01 03:02:40 +01:00
|
|
|
if (this.isSelectionMode !== newIsSelectionMode) {
|
|
|
|
this.isSelectionMode = newIsSelectionMode
|
|
|
|
this.updateBookSelectionMode(newIsSelectionMode)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
updateBookSelectionMode(isSelectionMode) {
|
|
|
|
for (const key in this.entityComponentRefs) {
|
|
|
|
if (this.entityIndexesMounted.includes(Number(key))) {
|
|
|
|
this.entityComponentRefs[key].setSelectionMode(isSelectionMode)
|
|
|
|
}
|
|
|
|
}
|
2022-10-16 00:17:40 +02:00
|
|
|
if (!isSelectionMode) {
|
|
|
|
this.lastItemIndexSelected = -1
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
},
|
|
|
|
async fetchEntites(page = 0) {
|
2021-11-29 02:36:44 +01:00
|
|
|
var startIndex = page * this.booksPerFetch
|
|
|
|
|
2021-12-01 03:02:40 +01:00
|
|
|
this.isFetchingEntities = true
|
|
|
|
|
|
|
|
if (!this.initialized) {
|
|
|
|
this.currentSFQueryString = this.buildSearchParams()
|
|
|
|
}
|
|
|
|
|
2022-03-11 01:45:02 +01:00
|
|
|
var entityPath = this.entityName === 'books' || this.entityName === 'series-books' ? `items` : this.entityName
|
2021-12-01 03:02:40 +01:00
|
|
|
var sfQueryString = this.currentSFQueryString ? this.currentSFQueryString + '&' : ''
|
2021-12-26 21:40:00 +01:00
|
|
|
var fullQueryString = `?${sfQueryString}limit=${this.booksPerFetch}&page=${page}&minified=1`
|
|
|
|
|
2021-12-02 02:07:03 +01:00
|
|
|
var payload = await this.$axios.$get(`/api/libraries/${this.currentLibraryId}/${entityPath}${fullQueryString}`).catch((error) => {
|
2021-11-29 02:36:44 +01:00
|
|
|
console.error('failed to fetch books', error)
|
|
|
|
return null
|
|
|
|
})
|
2022-02-13 22:00:59 +01:00
|
|
|
|
2021-12-01 03:02:40 +01:00
|
|
|
this.isFetchingEntities = false
|
|
|
|
if (this.pendingReset) {
|
|
|
|
this.pendingReset = false
|
|
|
|
this.resetEntities()
|
|
|
|
return
|
|
|
|
}
|
2021-11-29 02:36:44 +01:00
|
|
|
if (payload) {
|
|
|
|
if (!this.initialized) {
|
|
|
|
this.initialized = true
|
2021-12-01 03:02:40 +01:00
|
|
|
this.totalEntities = payload.total
|
|
|
|
this.totalShelves = Math.ceil(this.totalEntities / this.entitiesPerShelf)
|
|
|
|
this.entities = new Array(this.totalEntities)
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for (let i = 0; i < payload.results.length; i++) {
|
2021-12-01 03:02:40 +01:00
|
|
|
var index = i + startIndex
|
|
|
|
this.entities[index] = payload.results[i]
|
|
|
|
if (this.entityComponentRefs[index]) {
|
|
|
|
this.entityComponentRefs[index].setEntity(this.entities[index])
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
}
|
2022-10-30 16:38:00 +01:00
|
|
|
|
2022-11-13 20:25:20 +01:00
|
|
|
this.$eventBus.$emit('bookshelf-total-entities', this.totalEntities)
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
loadPage(page) {
|
|
|
|
this.pagesLoaded[page] = true
|
2021-12-01 03:02:40 +01:00
|
|
|
this.fetchEntites(page)
|
2021-11-29 02:36:44 +01:00
|
|
|
},
|
|
|
|
showHideBookPlaceholder(index, show) {
|
|
|
|
var el = document.getElementById(`book-${index}-placeholder`)
|
|
|
|
if (el) el.style.display = show ? 'flex' : 'none'
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
mountEntites(fromIndex, toIndex) {
|
2021-11-29 02:36:44 +01:00
|
|
|
for (let i = fromIndex; i < toIndex; i++) {
|
2021-12-01 03:02:40 +01:00
|
|
|
if (!this.entityIndexesMounted.includes(i)) {
|
|
|
|
this.cardsHelpers.mountEntityCard(i)
|
|
|
|
}
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
handleScroll(scrollTop) {
|
2021-12-02 02:07:03 +01:00
|
|
|
this.currScrollTop = scrollTop
|
2021-11-29 02:36:44 +01:00
|
|
|
var firstShelfIndex = Math.floor(scrollTop / this.shelfHeight)
|
|
|
|
var lastShelfIndex = Math.ceil((scrollTop + this.bookshelfHeight) / this.shelfHeight)
|
2021-12-01 03:02:40 +01:00
|
|
|
lastShelfIndex = Math.min(this.totalShelves - 1, lastShelfIndex)
|
2021-11-29 02:36:44 +01:00
|
|
|
|
2021-12-01 03:02:40 +01:00
|
|
|
var firstBookIndex = firstShelfIndex * this.entitiesPerShelf
|
|
|
|
var lastBookIndex = lastShelfIndex * this.entitiesPerShelf + this.entitiesPerShelf
|
|
|
|
lastBookIndex = Math.min(this.totalEntities, lastBookIndex)
|
|
|
|
|
|
|
|
var firstBookPage = Math.floor(firstBookIndex / this.booksPerFetch)
|
|
|
|
var lastBookPage = Math.floor(lastBookIndex / this.booksPerFetch)
|
|
|
|
if (!this.pagesLoaded[firstBookPage]) {
|
2022-03-18 01:10:47 +01:00
|
|
|
// console.log('Must load next batch', firstBookPage, 'book index', firstBookIndex)
|
2021-12-01 03:02:40 +01:00
|
|
|
this.loadPage(firstBookPage)
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
if (!this.pagesLoaded[lastBookPage]) {
|
2022-03-18 01:10:47 +01:00
|
|
|
// console.log('Must load last next batch', lastBookPage, 'book index', lastBookIndex)
|
2021-12-01 03:02:40 +01:00
|
|
|
this.loadPage(lastBookPage)
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
|
2021-12-01 03:02:40 +01:00
|
|
|
this.entityIndexesMounted = this.entityIndexesMounted.filter((_index) => {
|
2021-11-29 02:36:44 +01:00
|
|
|
if (_index < firstBookIndex || _index >= lastBookIndex) {
|
|
|
|
var el = document.getElementById(`book-card-${_index}`)
|
|
|
|
if (el) el.remove()
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
})
|
2021-12-01 03:02:40 +01:00
|
|
|
this.mountEntites(firstBookIndex, lastBookIndex)
|
|
|
|
},
|
|
|
|
async resetEntities() {
|
|
|
|
if (this.isFetchingEntities) {
|
|
|
|
this.pendingReset = true
|
|
|
|
return
|
|
|
|
}
|
|
|
|
this.destroyEntityComponents()
|
|
|
|
this.entityIndexesMounted = []
|
|
|
|
this.entityComponentRefs = {}
|
|
|
|
this.pagesLoaded = {}
|
|
|
|
this.entities = []
|
|
|
|
this.totalShelves = 0
|
|
|
|
this.totalEntities = 0
|
|
|
|
this.currentPage = 0
|
|
|
|
this.isSelectionMode = false
|
|
|
|
this.initialized = false
|
|
|
|
|
2021-12-02 02:07:03 +01:00
|
|
|
this.initSizeData()
|
2021-12-01 03:02:40 +01:00
|
|
|
this.pagesLoaded[0] = true
|
|
|
|
await this.fetchEntites(0)
|
|
|
|
var lastBookIndex = Math.min(this.totalEntities, this.shelvesPerPage * this.entitiesPerShelf)
|
|
|
|
this.mountEntites(0, lastBookIndex)
|
|
|
|
},
|
2021-12-02 02:07:03 +01:00
|
|
|
remountEntities() {
|
|
|
|
for (const key in this.entityComponentRefs) {
|
|
|
|
if (this.entityComponentRefs[key]) {
|
|
|
|
this.entityComponentRefs[key].destroy()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.entityComponentRefs = {}
|
|
|
|
this.entityIndexesMounted.forEach((i) => {
|
|
|
|
this.cardsHelpers.mountEntityCard(i)
|
|
|
|
})
|
|
|
|
},
|
2021-12-13 02:48:29 +01:00
|
|
|
rebuild() {
|
|
|
|
this.initSizeData()
|
|
|
|
|
|
|
|
var lastBookIndex = Math.min(this.totalEntities, this.shelvesPerPage * this.entitiesPerShelf)
|
|
|
|
this.entityIndexesMounted = []
|
|
|
|
for (let i = 0; i < lastBookIndex; i++) {
|
|
|
|
this.entityIndexesMounted.push(i)
|
|
|
|
}
|
|
|
|
var bookshelfEl = document.getElementById('bookshelf')
|
|
|
|
if (bookshelfEl) {
|
|
|
|
bookshelfEl.scrollTop = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$nextTick(this.remountEntities)
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
buildSearchParams() {
|
2022-10-29 01:10:19 +02:00
|
|
|
if (this.page === 'search' || this.page === 'collections') {
|
2021-12-01 03:02:40 +01:00
|
|
|
return ''
|
|
|
|
}
|
|
|
|
|
|
|
|
let searchParams = new URLSearchParams()
|
2022-10-29 01:10:19 +02:00
|
|
|
if (this.page === 'series') {
|
|
|
|
searchParams.set('sort', this.seriesSortBy)
|
|
|
|
searchParams.set('desc', this.seriesSortDesc ? 1 : 0)
|
2022-10-29 22:33:38 +02:00
|
|
|
searchParams.set('filter', this.seriesFilterBy)
|
2022-10-29 01:10:19 +02:00
|
|
|
} else if (this.page === 'series-books') {
|
2022-03-13 01:50:31 +01:00
|
|
|
searchParams.set('filter', `series.${this.$encode(this.seriesId)}`)
|
2022-11-03 14:11:33 +01:00
|
|
|
if (this.collapseBookSeries) {
|
|
|
|
searchParams.set('collapseseries', 1)
|
|
|
|
}
|
2021-12-26 21:40:00 +01:00
|
|
|
} else {
|
|
|
|
if (this.filterBy && this.filterBy !== 'all') {
|
|
|
|
searchParams.set('filter', this.filterBy)
|
|
|
|
}
|
|
|
|
if (this.orderBy) {
|
|
|
|
searchParams.set('sort', this.orderBy)
|
|
|
|
searchParams.set('desc', this.orderDesc ? 1 : 0)
|
|
|
|
}
|
2022-04-12 02:42:09 +02:00
|
|
|
if (this.collapseSeries && !this.isPodcast) {
|
2022-01-25 01:03:54 +01:00
|
|
|
searchParams.set('collapseseries', 1)
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
}
|
|
|
|
return searchParams.toString()
|
|
|
|
},
|
|
|
|
checkUpdateSearchParams() {
|
|
|
|
var newSearchParams = this.buildSearchParams()
|
|
|
|
var currentQueryString = window.location.search
|
2021-12-02 02:07:03 +01:00
|
|
|
if (currentQueryString && currentQueryString.startsWith('?')) currentQueryString = currentQueryString.slice(1)
|
2021-12-01 03:02:40 +01:00
|
|
|
|
|
|
|
if (newSearchParams === '') {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if (newSearchParams !== this.currentSFQueryString || newSearchParams !== currentQueryString) {
|
|
|
|
let newurl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + newSearchParams
|
|
|
|
window.history.replaceState({ path: newurl }, '', newurl)
|
2022-05-19 01:37:38 +02:00
|
|
|
|
|
|
|
this.routeFullPath = window.location.pathname + (window.location.search || '') // Update for saving scroll position
|
2021-12-01 03:02:40 +01:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
},
|
2022-10-29 01:10:19 +02:00
|
|
|
seriesSortUpdated() {
|
|
|
|
var wasUpdated = this.checkUpdateSearchParams()
|
|
|
|
if (wasUpdated) {
|
|
|
|
this.resetEntities()
|
|
|
|
}
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
settingsUpdated(settings) {
|
|
|
|
var wasUpdated = this.checkUpdateSearchParams()
|
|
|
|
if (wasUpdated) {
|
|
|
|
this.resetEntities()
|
2021-12-02 02:07:03 +01:00
|
|
|
} else if (settings.bookshelfCoverSize !== this.currentBookWidth) {
|
2021-12-21 02:26:22 +01:00
|
|
|
this.executeRebuild()
|
2021-12-01 03:02:40 +01:00
|
|
|
}
|
2021-11-29 02:36:44 +01:00
|
|
|
},
|
|
|
|
scroll(e) {
|
|
|
|
if (!e || !e.target) return
|
|
|
|
var { scrollTop } = e.target
|
|
|
|
this.handleScroll(scrollTop)
|
|
|
|
},
|
2022-03-13 00:45:32 +01:00
|
|
|
libraryItemAdded(libraryItem) {
|
|
|
|
console.log('libraryItem added', libraryItem)
|
2021-12-02 02:07:03 +01:00
|
|
|
// TODO: Check if audiobook would be on this shelf
|
|
|
|
this.resetEntities()
|
|
|
|
},
|
2022-03-13 00:45:32 +01:00
|
|
|
libraryItemUpdated(libraryItem) {
|
|
|
|
console.log('Item updated', libraryItem)
|
2021-12-02 02:07:03 +01:00
|
|
|
if (this.entityName === 'books' || this.entityName === 'series-books') {
|
2022-03-13 00:45:32 +01:00
|
|
|
var indexOf = this.entities.findIndex((ent) => ent && ent.id === libraryItem.id)
|
2021-12-02 02:07:03 +01:00
|
|
|
if (indexOf >= 0) {
|
2022-03-13 00:45:32 +01:00
|
|
|
this.entities[indexOf] = libraryItem
|
2021-12-02 02:07:03 +01:00
|
|
|
if (this.entityComponentRefs[indexOf]) {
|
2022-03-13 00:45:32 +01:00
|
|
|
this.entityComponentRefs[indexOf].setEntity(libraryItem)
|
2021-12-02 02:07:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-03-13 00:45:32 +01:00
|
|
|
libraryItemRemoved(libraryItem) {
|
2021-12-02 02:07:03 +01:00
|
|
|
if (this.entityName === 'books' || this.entityName === 'series-books') {
|
2022-03-13 00:45:32 +01:00
|
|
|
var indexOf = this.entities.findIndex((ent) => ent && ent.id === libraryItem.id)
|
2021-12-02 02:07:03 +01:00
|
|
|
if (indexOf >= 0) {
|
2022-03-13 00:45:32 +01:00
|
|
|
this.entities = this.entities.filter((ent) => ent.id !== libraryItem.id)
|
2022-11-13 20:25:20 +01:00
|
|
|
this.totalEntities--
|
|
|
|
this.$eventBus.$emit('bookshelf-total-entities', this.totalEntities)
|
2022-03-13 00:45:32 +01:00
|
|
|
this.executeRebuild()
|
2021-12-02 02:07:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-03-13 00:45:32 +01:00
|
|
|
libraryItemsAdded(libraryItems) {
|
|
|
|
console.log('items added', libraryItems)
|
2021-12-02 02:07:03 +01:00
|
|
|
// TODO: Check if audiobook would be on this shelf
|
|
|
|
this.resetEntities()
|
|
|
|
},
|
2022-03-13 00:45:32 +01:00
|
|
|
libraryItemsUpdated(libraryItems) {
|
|
|
|
libraryItems.forEach((ab) => {
|
|
|
|
this.libraryItemUpdated(ab)
|
2021-12-02 02:07:03 +01:00
|
|
|
})
|
|
|
|
},
|
2022-04-21 15:30:44 +02:00
|
|
|
collectionAdded(collection) {
|
|
|
|
if (this.entityName !== 'collections') return
|
|
|
|
console.log(`[LazyBookshelf] collectionAdded ${collection.id}`, collection)
|
|
|
|
this.resetEntities()
|
|
|
|
},
|
|
|
|
collectionUpdated(collection) {
|
|
|
|
if (this.entityName !== 'collections') return
|
|
|
|
console.log(`[LazyBookshelf] collectionUpdated ${collection.id}`, collection)
|
|
|
|
var indexOf = this.entities.findIndex((ent) => ent && ent.id === collection.id)
|
|
|
|
if (indexOf >= 0) {
|
|
|
|
this.entities[indexOf] = collection
|
|
|
|
if (this.entityComponentRefs[indexOf]) {
|
|
|
|
this.entityComponentRefs[indexOf].setEntity(collection)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
collectionRemoved(collection) {
|
|
|
|
if (this.entityName !== 'collections') return
|
|
|
|
console.log(`[LazyBookshelf] collectionRemoved ${collection.id}`, collection)
|
|
|
|
var indexOf = this.entities.findIndex((ent) => ent && ent.id === collection.id)
|
|
|
|
if (indexOf >= 0) {
|
|
|
|
this.entities = this.entities.filter((ent) => ent.id !== collection.id)
|
2022-11-13 20:25:20 +01:00
|
|
|
this.totalEntities--
|
|
|
|
this.$eventBus.$emit('bookshelf-total-entities', this.totalEntities)
|
2022-04-21 15:30:44 +02:00
|
|
|
this.executeRebuild()
|
|
|
|
}
|
|
|
|
},
|
2021-12-02 02:07:03 +01:00
|
|
|
initSizeData(_bookshelf) {
|
|
|
|
var bookshelf = _bookshelf || document.getElementById('bookshelf')
|
|
|
|
if (!bookshelf) {
|
|
|
|
console.error('Failed to init size data')
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var entitiesPerShelfBefore = this.entitiesPerShelf
|
2021-12-01 03:02:40 +01:00
|
|
|
|
2021-11-29 02:36:44 +01:00
|
|
|
var { clientHeight, clientWidth } = bookshelf
|
2021-12-24 23:37:57 +01:00
|
|
|
// console.log('Init bookshelf width', clientWidth, 'window width', window.innerWidth)
|
2021-12-13 02:48:29 +01:00
|
|
|
this.mountWindowWidth = window.innerWidth
|
2021-11-29 02:36:44 +01:00
|
|
|
this.bookshelfHeight = clientHeight
|
|
|
|
this.bookshelfWidth = clientWidth
|
2021-12-18 03:52:11 +01:00
|
|
|
this.entitiesPerShelf = Math.max(1, Math.floor((this.bookshelfWidth - this.shelfPadding) / this.totalEntityCardWidth))
|
2021-11-29 02:36:44 +01:00
|
|
|
this.shelvesPerPage = Math.ceil(this.bookshelfHeight / this.shelfHeight) + 2
|
2021-12-01 03:02:40 +01:00
|
|
|
this.bookshelfMarginLeft = (this.bookshelfWidth - this.entitiesPerShelf * this.totalEntityCardWidth) / 2
|
2021-11-29 02:36:44 +01:00
|
|
|
|
2021-12-02 02:07:03 +01:00
|
|
|
this.currentBookWidth = this.bookWidth
|
|
|
|
if (this.totalEntities) {
|
|
|
|
this.totalShelves = Math.ceil(this.totalEntities / this.entitiesPerShelf)
|
|
|
|
}
|
|
|
|
return entitiesPerShelfBefore < this.entitiesPerShelf // Books per shelf has changed
|
|
|
|
},
|
|
|
|
async init(bookshelf) {
|
|
|
|
this.checkUpdateSearchParams()
|
|
|
|
this.initSizeData(bookshelf)
|
|
|
|
|
2021-11-29 02:36:44 +01:00
|
|
|
this.pagesLoaded[0] = true
|
2021-12-01 03:02:40 +01:00
|
|
|
await this.fetchEntites(0)
|
|
|
|
var lastBookIndex = Math.min(this.totalEntities, this.shelvesPerPage * this.entitiesPerShelf)
|
|
|
|
this.mountEntites(0, lastBookIndex)
|
2022-05-19 01:37:38 +02:00
|
|
|
|
|
|
|
// Set last scroll position for this bookshelf page
|
|
|
|
if (this.$store.state.lastBookshelfScrollData[this.page] && window.bookshelf) {
|
|
|
|
const { path, scrollTop } = this.$store.state.lastBookshelfScrollData[this.page]
|
|
|
|
if (path === this.routeFullPath) {
|
|
|
|
// Exact path match with query so use scroll position
|
|
|
|
window.bookshelf.scrollTop = scrollTop
|
|
|
|
}
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
},
|
2021-12-21 02:26:22 +01:00
|
|
|
executeRebuild() {
|
2021-12-13 02:48:29 +01:00
|
|
|
clearTimeout(this.resizeTimeout)
|
|
|
|
this.resizeTimeout = setTimeout(() => {
|
|
|
|
this.rebuild()
|
|
|
|
}, 200)
|
|
|
|
},
|
2021-12-21 02:26:22 +01:00
|
|
|
windowResize() {
|
|
|
|
this.executeRebuild()
|
|
|
|
},
|
|
|
|
socketInit() {
|
|
|
|
// Server settings are set on socket init
|
|
|
|
this.executeRebuild()
|
|
|
|
},
|
2021-12-01 03:02:40 +01:00
|
|
|
initListeners() {
|
2021-12-13 02:48:29 +01:00
|
|
|
window.addEventListener('resize', this.windowResize)
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
var bookshelf = document.getElementById('bookshelf')
|
|
|
|
if (bookshelf) {
|
|
|
|
this.init(bookshelf)
|
|
|
|
bookshelf.addEventListener('scroll', this.scroll)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2022-10-29 01:10:19 +02:00
|
|
|
this.$eventBus.$on('series-sort-updated', this.seriesSortUpdated)
|
|
|
|
this.$eventBus.$on('bookshelf_clear_selection', this.clearSelectedEntities)
|
2021-12-21 02:26:22 +01:00
|
|
|
this.$eventBus.$on('socket_init', this.socketInit)
|
2021-12-01 03:02:40 +01:00
|
|
|
|
|
|
|
this.$store.commit('user/addSettingsListener', { id: 'lazy-bookshelf', meth: this.settingsUpdated })
|
2021-12-02 02:07:03 +01:00
|
|
|
|
|
|
|
if (this.$root.socket) {
|
2022-03-13 00:45:32 +01:00
|
|
|
this.$root.socket.on('item_updated', this.libraryItemUpdated)
|
|
|
|
this.$root.socket.on('item_added', this.libraryItemAdded)
|
|
|
|
this.$root.socket.on('item_removed', this.libraryItemRemoved)
|
|
|
|
this.$root.socket.on('items_updated', this.libraryItemsUpdated)
|
|
|
|
this.$root.socket.on('items_added', this.libraryItemsAdded)
|
2022-04-21 15:30:44 +02:00
|
|
|
this.$root.socket.on('collection_added', this.collectionAdded)
|
|
|
|
this.$root.socket.on('collection_updated', this.collectionUpdated)
|
|
|
|
this.$root.socket.on('collection_removed', this.collectionRemoved)
|
2021-12-02 02:07:03 +01:00
|
|
|
} else {
|
|
|
|
console.error('Bookshelf - Socket not initialized')
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
},
|
|
|
|
removeListeners() {
|
2021-12-13 02:48:29 +01:00
|
|
|
window.removeEventListener('resize', this.windowResize)
|
2021-12-01 03:02:40 +01:00
|
|
|
var bookshelf = document.getElementById('bookshelf')
|
|
|
|
if (bookshelf) {
|
|
|
|
bookshelf.removeEventListener('scroll', this.scroll)
|
|
|
|
}
|
2022-10-29 01:10:19 +02:00
|
|
|
|
|
|
|
this.$eventBus.$off('series-sort-updated', this.seriesSortUpdated)
|
|
|
|
this.$eventBus.$off('bookshelf_clear_selection', this.clearSelectedEntities)
|
2021-12-21 02:26:22 +01:00
|
|
|
this.$eventBus.$off('socket_init', this.socketInit)
|
2021-12-01 03:02:40 +01:00
|
|
|
|
|
|
|
this.$store.commit('user/removeSettingsListener', 'lazy-bookshelf')
|
2021-12-02 02:07:03 +01:00
|
|
|
|
|
|
|
if (this.$root.socket) {
|
2022-03-13 00:45:32 +01:00
|
|
|
this.$root.socket.off('item_updated', this.libraryItemUpdated)
|
|
|
|
this.$root.socket.off('item_added', this.libraryItemAdded)
|
|
|
|
this.$root.socket.off('item_removed', this.libraryItemRemoved)
|
|
|
|
this.$root.socket.off('items_updated', this.libraryItemsUpdated)
|
|
|
|
this.$root.socket.off('items_added', this.libraryItemsAdded)
|
2022-04-21 15:30:44 +02:00
|
|
|
this.$root.socket.off('collection_added', this.collectionAdded)
|
|
|
|
this.$root.socket.off('collection_updated', this.collectionUpdated)
|
|
|
|
this.$root.socket.off('collection_removed', this.collectionRemoved)
|
2021-12-02 02:07:03 +01:00
|
|
|
} else {
|
|
|
|
console.error('Bookshelf - Socket not initialized')
|
|
|
|
}
|
2021-12-01 03:02:40 +01:00
|
|
|
},
|
|
|
|
destroyEntityComponents() {
|
|
|
|
for (const key in this.entityComponentRefs) {
|
|
|
|
if (this.entityComponentRefs[key] && this.entityComponentRefs[key].destroy) {
|
|
|
|
this.entityComponentRefs[key].destroy()
|
|
|
|
}
|
|
|
|
}
|
2021-12-02 02:07:03 +01:00
|
|
|
},
|
|
|
|
scan() {
|
2022-05-18 23:33:24 +02:00
|
|
|
this.$store
|
|
|
|
.dispatch('libraries/requestLibraryScan', { libraryId: this.currentLibraryId })
|
|
|
|
.then(() => {
|
|
|
|
this.$toast.success('Library scan started')
|
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
console.error('Failed to start scan', error)
|
|
|
|
this.$toast.error('Failed to start scan')
|
|
|
|
})
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2021-12-01 03:02:40 +01:00
|
|
|
this.initListeners()
|
2022-05-19 01:37:38 +02:00
|
|
|
|
|
|
|
this.routeFullPath = window.location.pathname + (window.location.search || '')
|
2021-11-29 02:36:44 +01:00
|
|
|
},
|
2021-12-13 02:48:29 +01:00
|
|
|
updated() {
|
2022-05-19 01:37:38 +02:00
|
|
|
this.routeFullPath = window.location.pathname + (window.location.search || '')
|
|
|
|
|
2021-12-18 03:52:11 +01:00
|
|
|
setTimeout(() => {
|
|
|
|
if (window.innerWidth > 0 && window.innerWidth !== this.mountWindowWidth) {
|
|
|
|
console.log('Updated window width', window.innerWidth, 'from', this.mountWindowWidth)
|
2021-12-21 02:26:22 +01:00
|
|
|
this.executeRebuild()
|
2021-12-18 03:52:11 +01:00
|
|
|
}
|
|
|
|
}, 50)
|
2021-12-13 02:48:29 +01:00
|
|
|
},
|
2021-11-29 02:36:44 +01:00
|
|
|
beforeDestroy() {
|
2021-12-01 03:02:40 +01:00
|
|
|
this.destroyEntityComponents()
|
|
|
|
this.removeListeners()
|
2022-05-19 01:37:38 +02:00
|
|
|
|
|
|
|
// Set bookshelf scroll position for specific bookshelf page and query
|
|
|
|
if (window.bookshelf) {
|
|
|
|
this.$store.commit('setLastBookshelfScrollData', { scrollTop: window.bookshelf.scrollTop || 0, path: this.routeFullPath, name: this.page })
|
|
|
|
}
|
2021-11-29 02:36:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.bookshelfRow {
|
|
|
|
background-image: var(--bookshelf-texture-img);
|
|
|
|
}
|
2022-10-30 16:38:00 +01:00
|
|
|
|
2021-11-29 02:36:44 +01:00
|
|
|
.bookshelfDivider {
|
|
|
|
background: rgb(149, 119, 90);
|
|
|
|
background: var(--bookshelf-divider-bg);
|
|
|
|
box-shadow: 2px 14px 8px #111111aa;
|
|
|
|
}
|
|
|
|
</style>
|