2021-10-04 22:11:42 -05:00
|
|
|
<template>
|
2022-03-13 19:34:31 -05:00
|
|
|
<div class="page" :class="streamLibraryItem ? 'streaming' : ''">
|
2025-06-05 01:08:08 +00:00
|
|
|
<app-book-shelf-toolbar is-home @select-all-items="selectAllItems" />
|
|
|
|
|
<app-book-shelf-categorized ref="bookShelfCategorized" />
|
2021-10-04 22:11:42 -05:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
async asyncData({ store, params, redirect }) {
|
2022-12-31 14:31:38 -06:00
|
|
|
const libraryId = params.library
|
|
|
|
|
const library = await store.dispatch('libraries/fetch', libraryId)
|
2021-10-04 22:11:42 -05:00
|
|
|
if (!library) {
|
|
|
|
|
return redirect(`/oops?message=Library "${libraryId}" not found`)
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
library
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
2022-03-13 19:34:31 -05:00
|
|
|
streamLibraryItem() {
|
|
|
|
|
return this.$store.state.streamLibraryItem
|
2021-10-04 22:11:42 -05:00
|
|
|
}
|
|
|
|
|
},
|
2025-06-05 01:08:08 +00:00
|
|
|
methods: {
|
|
|
|
|
selectAllItems() {
|
|
|
|
|
if (this.$refs.bookShelfCategorized) {
|
|
|
|
|
this.$refs.bookShelfCategorized.selectAllItems()
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-10-04 22:11:42 -05:00
|
|
|
mounted() {},
|
|
|
|
|
beforeDestroy() {}
|
|
|
|
|
}
|
|
|
|
|
</script>
|