2021-08-18 00:01:11 +02:00
|
|
|
<template>
|
2021-11-04 23:35:59 +01:00
|
|
|
<div id="bookshelf" class="bookshelf overflow-hidden relative block max-h-full">
|
2021-10-31 01:50:49 +02:00
|
|
|
<div ref="wrapper" class="h-full w-full relative" :class="isGridMode ? 'overflow-y-scroll' : 'overflow-hidden'">
|
|
|
|
<!-- Cover size widget -->
|
|
|
|
<div v-show="!isSelectionMode && isGridMode" class="fixed bottom-2 right-4 z-30">
|
|
|
|
<div class="rounded-full py-1 bg-primary px-2 border border-black-100 text-center flex items-center box-shadow-md" @mousedown.prevent @mouseup.prevent>
|
|
|
|
<span class="material-icons" :class="selectedSizeIndex === 0 ? 'text-gray-400' : 'hover:text-yellow-300 cursor-pointer'" style="font-size: 0.9rem" @mousedown.prevent @click="decreaseSize">remove</span>
|
|
|
|
<p class="px-2 font-mono">{{ bookCoverWidth }}</p>
|
|
|
|
<span class="material-icons" :class="selectedSizeIndex === availableSizes.length - 1 ? 'text-gray-400' : 'hover:text-yellow-300 cursor-pointer'" style="font-size: 0.9rem" @mousedown.prevent @click="increaseSize">add</span>
|
|
|
|
</div>
|
2021-08-26 16:47:51 +02:00
|
|
|
</div>
|
|
|
|
|
2021-10-31 01:50:49 +02:00
|
|
|
<div v-if="!audiobooks.length" class="w-full flex flex-col items-center justify-center py-12">
|
|
|
|
<p class="text-center text-2xl font-book mb-4 py-4">Your Audiobookshelf is empty!</p>
|
|
|
|
<div class="flex">
|
|
|
|
<ui-btn to="/config" color="primary" class="w-52 mr-2" @click="scan">Configure Scanner</ui-btn>
|
|
|
|
<ui-btn color="success" class="w-52" @click="scan">Scan Audiobooks</ui-btn>
|
|
|
|
</div>
|
2021-09-21 23:42:01 +02:00
|
|
|
</div>
|
2021-10-31 01:50:49 +02:00
|
|
|
<div v-else-if="page === 'search'" id="bookshelf-categorized" class="w-full flex flex-col items-center">
|
|
|
|
<template v-for="(shelf, index) in categorizedShelves">
|
|
|
|
<app-book-shelf-row :key="index" :index="index" :shelf="shelf" :size-multiplier="sizeMultiplier" :book-cover-width="bookCoverWidth" />
|
|
|
|
</template>
|
|
|
|
<div v-show="!categorizedShelves.length" class="w-full py-16 text-center text-xl">
|
|
|
|
<div class="py-4 mb-6"><p class="text-2xl">No Results</p></div>
|
|
|
|
</div>
|
2021-10-17 18:29:52 +02:00
|
|
|
</div>
|
2021-10-31 01:50:49 +02:00
|
|
|
<div v-else class="w-full">
|
|
|
|
<template v-if="viewMode === 'grid'">
|
|
|
|
<div class="w-full flex flex-col items-center">
|
|
|
|
<template v-for="(shelf, index) in shelves">
|
|
|
|
<div :key="index" class="w-full bookshelfRow relative">
|
|
|
|
<div class="flex justify-center items-center">
|
|
|
|
<template v-for="entity in shelf">
|
|
|
|
<cards-group-card v-if="showGroups" :key="entity.id" :width="bookCoverWidth" :group="entity" @click="clickGroup" />
|
|
|
|
<!-- <cards-book-3d :key="entity.id" v-else :width="100" :src="$store.getters['audiobooks/getBookCoverSrc'](entity.book)" /> -->
|
|
|
|
<cards-book-card v-else :key="entity.id" :show-volume-number="!!selectedSeries" :width="bookCoverWidth" :user-progress="userAudiobooks[entity.id]" :audiobook="entity" @edit="editBook" />
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
<div class="bookshelfDivider h-4 w-full absolute bottom-0 left-0 right-0 z-10" />
|
|
|
|
</div>
|
|
|
|
</template>
|
2021-08-18 00:01:11 +02:00
|
|
|
</div>
|
2021-10-30 03:42:28 +02:00
|
|
|
</template>
|
2021-10-31 01:50:49 +02:00
|
|
|
<template v-else>
|
|
|
|
<app-book-list :books="entities" />
|
2021-10-30 03:42:28 +02:00
|
|
|
</template>
|
2021-10-31 01:50:49 +02:00
|
|
|
<div v-show="!shelves.length" class="w-full py-16 text-center text-xl">
|
|
|
|
<div v-if="page === 'search'" class="py-4 mb-6"><p class="text-2xl">No Results</p></div>
|
2021-11-06 02:24:02 +01:00
|
|
|
<div v-else class="py-4 capitalize">No {{ showGroups ? page : 'Audiobooks' }}</div>
|
2021-10-31 01:50:49 +02:00
|
|
|
<ui-btn v-if="!showGroups && (filterBy !== 'all' || keywordFilter)" @click="clearFilter">Clear Filter</ui-btn>
|
|
|
|
<ui-btn v-else-if="page === 'search'" to="/library">Back to Library</ui-btn>
|
|
|
|
</div>
|
2021-09-05 20:21:02 +02:00
|
|
|
</div>
|
2021-08-18 00:01:11 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2021-09-23 03:40:35 +02:00
|
|
|
props: {
|
2021-09-24 14:32:38 +02:00
|
|
|
page: String,
|
2021-09-24 23:14:33 +02:00
|
|
|
selectedSeries: String,
|
|
|
|
searchResults: {
|
2021-10-17 18:29:52 +02:00
|
|
|
type: Object,
|
|
|
|
default: () => {}
|
2021-09-24 23:14:33 +02:00
|
|
|
},
|
2021-10-30 03:42:28 +02:00
|
|
|
searchQuery: String,
|
|
|
|
viewMode: String
|
2021-09-23 03:40:35 +02:00
|
|
|
},
|
2021-08-18 00:01:11 +02:00
|
|
|
data() {
|
|
|
|
return {
|
2021-09-24 14:32:38 +02:00
|
|
|
shelves: [],
|
2021-10-07 04:08:52 +02:00
|
|
|
currSearchParams: null,
|
2021-08-26 16:47:51 +02:00
|
|
|
availableSizes: [60, 80, 100, 120, 140, 160, 180, 200, 220],
|
|
|
|
selectedSizeIndex: 3,
|
2021-09-05 20:21:02 +02:00
|
|
|
rowPaddingX: 40,
|
2021-09-21 23:42:01 +02:00
|
|
|
keywordFilterTimeout: null,
|
2021-09-26 22:34:08 +02:00
|
|
|
scannerParseSubtitle: false,
|
|
|
|
wrapperClientWidth: 0
|
2021-09-05 20:21:02 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
keywordFilter() {
|
|
|
|
this.checkKeywordFilter()
|
2021-09-24 14:32:38 +02:00
|
|
|
},
|
|
|
|
selectedSeries() {
|
|
|
|
this.$nextTick(() => {
|
2021-09-28 13:44:40 +02:00
|
|
|
this.$store.commit('audiobooks/setSelectedSeries', this.selectedSeries)
|
2021-09-24 14:32:38 +02:00
|
|
|
this.setBookshelfEntities()
|
|
|
|
})
|
2021-09-24 23:14:33 +02:00
|
|
|
},
|
|
|
|
searchResults() {
|
|
|
|
this.$nextTick(() => {
|
2021-10-17 18:29:52 +02:00
|
|
|
// this.$store.commit('audiobooks/setSearchResults', this.searchResults)
|
2021-09-24 23:14:33 +02:00
|
|
|
this.setBookshelfEntities()
|
|
|
|
})
|
2021-10-09 18:09:06 +02:00
|
|
|
},
|
|
|
|
'$route.query.filter'() {
|
|
|
|
if (this.$route.query.filter && this.$route.query.filter !== this.filterBy) {
|
|
|
|
this.$store.dispatch('user/updateUserSettings', { filterBy: this.$route.query.filter })
|
2021-10-24 22:53:51 +02:00
|
|
|
} else if (!this.$route.query.filter && this.filterBy) {
|
|
|
|
this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' })
|
2021-10-09 18:09:06 +02:00
|
|
|
}
|
2021-08-18 00:01:11 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2021-10-30 03:42:28 +02:00
|
|
|
isGridMode() {
|
|
|
|
return this.viewMode === 'grid'
|
|
|
|
},
|
2021-09-05 20:21:02 +02:00
|
|
|
keywordFilter() {
|
|
|
|
return this.$store.state.audiobooks.keywordFilter
|
|
|
|
},
|
2021-08-18 00:01:11 +02:00
|
|
|
userAudiobooks() {
|
2021-08-24 01:31:04 +02:00
|
|
|
return this.$store.state.user.user ? this.$store.state.user.user.audiobooks || {} : {}
|
2021-08-18 00:01:11 +02:00
|
|
|
},
|
|
|
|
audiobooks() {
|
|
|
|
return this.$store.state.audiobooks.audiobooks
|
2021-08-18 13:50:24 +02:00
|
|
|
},
|
2021-10-17 18:29:52 +02:00
|
|
|
sizeMultiplier() {
|
|
|
|
return this.bookCoverWidth / 120
|
|
|
|
},
|
2021-08-26 16:47:51 +02:00
|
|
|
bookCoverWidth() {
|
2021-10-30 03:42:28 +02:00
|
|
|
var coverWidth = this.availableSizes[this.selectedSizeIndex]
|
|
|
|
return coverWidth
|
2021-08-26 16:47:51 +02:00
|
|
|
},
|
|
|
|
sizeMultiplier() {
|
|
|
|
return this.bookCoverWidth / 120
|
|
|
|
},
|
|
|
|
paddingX() {
|
|
|
|
return 16 * this.sizeMultiplier
|
|
|
|
},
|
|
|
|
bookWidth() {
|
2021-10-01 01:52:32 +02:00
|
|
|
var _width = this.bookCoverWidth + this.paddingX * 2
|
|
|
|
return this.showGroups ? _width * 1.6 : _width
|
2021-08-27 01:32:05 +02:00
|
|
|
},
|
|
|
|
isSelectionMode() {
|
|
|
|
return this.$store.getters['getNumAudiobooksSelected']
|
2021-09-05 20:21:02 +02:00
|
|
|
},
|
|
|
|
filterBy() {
|
|
|
|
return this.$store.getters['user/getUserSetting']('filterBy')
|
2021-09-24 14:32:38 +02:00
|
|
|
},
|
2021-10-07 04:08:52 +02:00
|
|
|
orderBy() {
|
|
|
|
return this.$store.getters['user/getUserSetting']('orderBy')
|
|
|
|
},
|
|
|
|
orderDesc() {
|
|
|
|
return this.$store.getters['user/getUserSetting']('orderDesc')
|
|
|
|
},
|
2021-09-24 14:32:38 +02:00
|
|
|
showGroups() {
|
2021-09-24 23:14:33 +02:00
|
|
|
return this.page !== '' && this.page !== 'search' && !this.selectedSeries
|
2021-09-24 14:32:38 +02:00
|
|
|
},
|
2021-10-17 18:29:52 +02:00
|
|
|
categorizedShelves() {
|
|
|
|
if (this.page !== 'search') return []
|
|
|
|
var audiobookSearchResults = this.searchResults ? this.searchResults.audiobooks || [] : []
|
|
|
|
const shelves = []
|
|
|
|
|
|
|
|
if (audiobookSearchResults.length) {
|
|
|
|
shelves.push({
|
|
|
|
label: 'Books',
|
|
|
|
books: audiobookSearchResults.map((absr) => absr.audiobook)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.searchResults.series && this.searchResults.series.length) {
|
|
|
|
var seriesGroups = this.searchResults.series.map((seriesResult) => {
|
|
|
|
return {
|
|
|
|
type: 'series',
|
|
|
|
name: seriesResult.series || '',
|
|
|
|
books: seriesResult.audiobooks || []
|
|
|
|
}
|
|
|
|
})
|
|
|
|
shelves.push({
|
|
|
|
label: 'Series',
|
|
|
|
series: seriesGroups
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.searchResults.tags && this.searchResults.tags.length) {
|
|
|
|
var tagGroups = this.searchResults.tags.map((tagResult) => {
|
|
|
|
return {
|
|
|
|
type: 'tags',
|
|
|
|
name: tagResult.tag || '',
|
|
|
|
books: tagResult.audiobooks || []
|
|
|
|
}
|
|
|
|
})
|
|
|
|
shelves.push({
|
|
|
|
label: 'Tags',
|
|
|
|
series: tagGroups
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
return shelves
|
|
|
|
},
|
2021-09-24 14:32:38 +02:00
|
|
|
entities() {
|
|
|
|
if (this.page === '') {
|
|
|
|
return this.$store.getters['audiobooks/getFilteredAndSorted']()
|
2021-09-24 23:14:33 +02:00
|
|
|
} else if (this.page === 'search') {
|
2021-10-17 18:29:52 +02:00
|
|
|
var audiobookSearchResults = this.searchResults ? this.searchResults.audiobooks || [] : []
|
|
|
|
return audiobookSearchResults.map((absr) => absr.audiobook)
|
2021-11-06 02:24:02 +01:00
|
|
|
} else if (this.page === 'collections') {
|
|
|
|
return (this.$store.state.user.collections || []).map((c) => {
|
|
|
|
return {
|
|
|
|
type: 'collection',
|
|
|
|
...c
|
|
|
|
}
|
|
|
|
})
|
2021-09-24 14:32:38 +02:00
|
|
|
} else {
|
|
|
|
var seriesGroups = this.$store.getters['audiobooks/getSeriesGroups']()
|
|
|
|
if (this.selectedSeries) {
|
|
|
|
var group = seriesGroups.find((group) => group.name === this.selectedSeries)
|
|
|
|
return group.books
|
|
|
|
}
|
|
|
|
return seriesGroups
|
|
|
|
}
|
2021-08-18 00:01:11 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
2021-10-16 03:31:00 +02:00
|
|
|
editBook(audiobook) {
|
|
|
|
var bookIds = this.entities.map((e) => e.id)
|
|
|
|
this.$store.commit('setBookshelfBookIds', bookIds)
|
|
|
|
this.$store.commit('showEditModal', audiobook)
|
|
|
|
},
|
2021-09-24 14:32:38 +02:00
|
|
|
clickGroup(group) {
|
2021-11-06 02:24:02 +01:00
|
|
|
if (this.page === 'collections') return
|
2021-09-24 14:32:38 +02:00
|
|
|
this.$emit('update:selectedSeries', group.name)
|
|
|
|
},
|
2021-09-05 20:21:02 +02:00
|
|
|
clearFilter() {
|
|
|
|
this.$store.commit('audiobooks/setKeywordFilter', null)
|
|
|
|
if (this.filterBy !== 'all') {
|
|
|
|
this.$store.dispatch('user/updateUserSettings', {
|
|
|
|
filterBy: 'all'
|
|
|
|
})
|
|
|
|
} else {
|
2021-09-23 03:40:35 +02:00
|
|
|
this.setBookshelfEntities()
|
2021-09-05 20:21:02 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
checkKeywordFilter() {
|
|
|
|
clearTimeout(this.keywordFilterTimeout)
|
|
|
|
this.keywordFilterTimeout = setTimeout(() => {
|
2021-09-23 03:40:35 +02:00
|
|
|
this.setBookshelfEntities()
|
2021-09-05 20:21:02 +02:00
|
|
|
}, 500)
|
|
|
|
},
|
2021-08-26 16:47:51 +02:00
|
|
|
increaseSize() {
|
|
|
|
this.selectedSizeIndex = Math.min(this.availableSizes.length - 1, this.selectedSizeIndex + 1)
|
|
|
|
this.resize()
|
|
|
|
this.$store.dispatch('user/updateUserSettings', { bookshelfCoverSize: this.bookCoverWidth })
|
|
|
|
},
|
|
|
|
decreaseSize() {
|
|
|
|
this.selectedSizeIndex = Math.max(0, this.selectedSizeIndex - 1)
|
|
|
|
this.resize()
|
|
|
|
this.$store.dispatch('user/updateUserSettings', { bookshelfCoverSize: this.bookCoverWidth })
|
|
|
|
},
|
2021-09-23 03:40:35 +02:00
|
|
|
setBookshelfEntities() {
|
2021-09-26 22:34:08 +02:00
|
|
|
this.wrapperClientWidth = this.$refs.wrapper.clientWidth
|
|
|
|
var width = Math.max(0, this.wrapperClientWidth - this.rowPaddingX * 2)
|
2021-10-01 01:52:32 +02:00
|
|
|
|
2021-09-24 14:32:38 +02:00
|
|
|
var booksPerRow = Math.floor(width / this.bookWidth)
|
|
|
|
|
2021-10-07 04:08:52 +02:00
|
|
|
this.currSearchParams = this.buildSearchParams()
|
|
|
|
|
2021-09-24 14:32:38 +02:00
|
|
|
var entities = this.entities
|
2021-10-09 18:09:06 +02:00
|
|
|
|
2021-08-18 00:01:11 +02:00
|
|
|
var groups = []
|
|
|
|
var currentRow = 0
|
|
|
|
var currentGroup = []
|
2021-08-19 03:18:44 +02:00
|
|
|
|
2021-09-23 03:40:35 +02:00
|
|
|
for (let i = 0; i < entities.length; i++) {
|
2021-09-24 14:32:38 +02:00
|
|
|
var row = Math.floor(i / booksPerRow)
|
2021-08-18 00:01:11 +02:00
|
|
|
if (row > currentRow) {
|
|
|
|
groups.push([...currentGroup])
|
|
|
|
currentRow = row
|
|
|
|
currentGroup = []
|
|
|
|
}
|
2021-09-23 03:40:35 +02:00
|
|
|
currentGroup.push(entities[i])
|
2021-08-18 00:01:11 +02:00
|
|
|
}
|
|
|
|
if (currentGroup.length) {
|
|
|
|
groups.push([...currentGroup])
|
|
|
|
}
|
2021-09-24 14:32:38 +02:00
|
|
|
this.shelves = groups
|
2021-08-18 00:01:11 +02:00
|
|
|
},
|
2021-09-24 14:32:38 +02:00
|
|
|
async init() {
|
2021-10-07 04:08:52 +02:00
|
|
|
this.checkUpdateSearchParams()
|
|
|
|
|
2021-09-26 22:34:08 +02:00
|
|
|
this.wrapperClientWidth = this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0
|
|
|
|
|
2021-08-26 17:43:46 +02:00
|
|
|
var bookshelfCoverSize = this.$store.getters['user/getUserSetting']('bookshelfCoverSize')
|
|
|
|
var sizeIndex = this.availableSizes.findIndex((s) => s === bookshelfCoverSize)
|
|
|
|
if (!isNaN(sizeIndex)) this.selectedSizeIndex = sizeIndex
|
2021-09-24 14:32:38 +02:00
|
|
|
|
|
|
|
var isLoading = await this.$store.dispatch('audiobooks/load')
|
|
|
|
if (!isLoading) {
|
|
|
|
this.setBookshelfEntities()
|
|
|
|
}
|
2021-08-18 00:01:11 +02:00
|
|
|
},
|
|
|
|
resize() {
|
2021-09-26 22:34:08 +02:00
|
|
|
this.$nextTick(this.setBookshelfEntities)
|
2021-08-18 00:01:11 +02:00
|
|
|
},
|
|
|
|
audiobooksUpdated() {
|
|
|
|
console.log('[AudioBookshelf] Audiobooks Updated')
|
2021-09-23 03:40:35 +02:00
|
|
|
this.setBookshelfEntities()
|
2021-08-18 00:43:29 +02:00
|
|
|
},
|
2021-10-07 04:08:52 +02:00
|
|
|
buildSearchParams() {
|
2021-11-06 02:24:02 +01:00
|
|
|
if (this.page === 'search' || this.page === 'series' || this.page === 'collections') {
|
2021-10-07 04:08:52 +02:00
|
|
|
return ''
|
|
|
|
}
|
|
|
|
|
|
|
|
let searchParams = new URLSearchParams()
|
|
|
|
if (this.filterBy && this.filterBy !== 'all') {
|
|
|
|
searchParams.set('filter', this.filterBy)
|
|
|
|
}
|
|
|
|
if (this.orderBy) {
|
|
|
|
searchParams.set('order', this.orderBy)
|
|
|
|
searchParams.set('orderdesc', this.orderDesc ? 1 : 0)
|
2021-08-19 03:18:44 +02:00
|
|
|
}
|
2021-10-07 04:08:52 +02:00
|
|
|
return searchParams.toString()
|
|
|
|
},
|
|
|
|
checkUpdateSearchParams() {
|
|
|
|
var newSearchParams = this.buildSearchParams()
|
|
|
|
var currentQueryString = window.location.search
|
|
|
|
|
|
|
|
if (newSearchParams === '') {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
if (newSearchParams !== this.currSearchParams || newSearchParams !== currentQueryString) {
|
|
|
|
let newurl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + newSearchParams
|
|
|
|
window.history.replaceState({ path: newurl }, '', newurl)
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
},
|
|
|
|
settingsUpdated(settings) {
|
|
|
|
var wasUpdated = this.checkUpdateSearchParams()
|
|
|
|
if (wasUpdated) this.setBookshelfEntities()
|
|
|
|
|
2021-08-26 16:47:51 +02:00
|
|
|
if (settings.bookshelfCoverSize !== this.bookCoverWidth && settings.bookshelfCoverSize !== undefined) {
|
|
|
|
var index = this.availableSizes.indexOf(settings.bookshelfCoverSize)
|
|
|
|
if (index >= 0) {
|
|
|
|
this.selectedSizeIndex = index
|
|
|
|
this.resize()
|
|
|
|
}
|
|
|
|
}
|
2021-08-19 03:18:44 +02:00
|
|
|
},
|
2021-08-18 00:43:29 +02:00
|
|
|
scan() {
|
2021-10-05 05:11:42 +02:00
|
|
|
this.$root.socket.emit('scan', this.$store.state.libraries.currentLibraryId)
|
2021-08-18 00:01:11 +02:00
|
|
|
}
|
|
|
|
},
|
2021-09-26 22:34:08 +02:00
|
|
|
updated() {
|
|
|
|
if (this.$refs.wrapper) {
|
|
|
|
if (this.wrapperClientWidth !== this.$refs.wrapper.clientWidth) {
|
|
|
|
this.$nextTick(this.setBookshelfEntities)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2021-08-18 00:01:11 +02:00
|
|
|
mounted() {
|
2021-09-24 14:32:38 +02:00
|
|
|
window.addEventListener('resize', this.resize)
|
2021-08-18 00:01:11 +02:00
|
|
|
this.$store.commit('audiobooks/addListener', { id: 'bookshelf', meth: this.audiobooksUpdated })
|
2021-08-24 01:31:04 +02:00
|
|
|
this.$store.commit('user/addSettingsListener', { id: 'bookshelf', meth: this.settingsUpdated })
|
2021-09-26 22:34:08 +02:00
|
|
|
|
2021-08-18 00:01:11 +02:00
|
|
|
this.init()
|
|
|
|
},
|
|
|
|
beforeDestroy() {
|
2021-09-24 14:32:38 +02:00
|
|
|
window.removeEventListener('resize', this.resize)
|
2021-08-18 00:01:11 +02:00
|
|
|
this.$store.commit('audiobooks/removeListener', 'bookshelf')
|
2021-08-24 01:31:04 +02:00
|
|
|
this.$store.commit('user/removeSettingsListener', 'bookshelf')
|
2021-08-18 00:01:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2021-10-31 01:50:49 +02:00
|
|
|
.bookshelf {
|
2021-11-04 23:35:59 +01:00
|
|
|
/* height: calc(100% - 40px); */
|
2021-10-31 01:50:49 +02:00
|
|
|
width: calc(100vw - 80px);
|
2021-08-18 13:50:24 +02:00
|
|
|
}
|
2021-11-04 23:35:59 +01:00
|
|
|
@media (max-width: 768px) {
|
|
|
|
.bookshelf {
|
|
|
|
/* height: calc(100% - 80px); */
|
|
|
|
width: 100vw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-18 00:01:11 +02:00
|
|
|
.bookshelfRow {
|
|
|
|
background-image: url(/wood_panels.jpg);
|
|
|
|
}
|
|
|
|
.bookshelfDivider {
|
|
|
|
background: rgb(149, 119, 90);
|
|
|
|
background: linear-gradient(180deg, rgba(149, 119, 90, 1) 0%, rgba(103, 70, 37, 1) 17%, rgba(103, 70, 37, 1) 88%, rgba(71, 48, 25, 1) 100%);
|
|
|
|
box-shadow: 2px 14px 8px #111111aa;
|
|
|
|
}
|
|
|
|
</style>
|