diff --git a/komga-webui/src/components/Dialogs.vue b/komga-webui/src/components/Dialogs.vue index 38014566e..fb407c51b 100644 --- a/komga-webui/src/components/Dialogs.vue +++ b/komga-webui/src/components/Dialogs.vue @@ -92,6 +92,7 @@ import Vue from 'vue' import ReadListAddToDialog from '@/components/dialogs/ReadListAddToDialog.vue' import ReadListDeleteDialog from '@/components/dialogs/ReadListDeleteDialog.vue' import ReadListEditDialog from '@/components/dialogs/ReadListEditDialog.vue' +import { BookDto } from '@/types/komga-books' export default Vue.extend({ name: 'Dialogs', diff --git a/komga-webui/src/components/ItemCard.vue b/komga-webui/src/components/ItemCard.vue index af3e85f4c..f505e978a 100644 --- a/komga-webui/src/components/ItemCard.vue +++ b/komga-webui/src/components/ItemCard.vue @@ -50,7 +50,7 @@ x-large color="accent" style="position: absolute; top: 50%; left: 50%; margin-left: -36px; margin-top: -36px" - :to="{name: 'read-book', params: { bookId: item.id}}" + :to="fabTo" > mdi-book-open-page-variant @@ -124,6 +124,7 @@ import { createItem, Item, ItemTypes } from '@/types/items' import Vue from 'vue' import { RawLocation } from 'vue-router' import ReadListActionsMenu from '@/components/menus/ReadListActionsMenu.vue' +import { BookDto } from '@/types/komga-books' export default Vue.extend({ name: 'ItemCard', @@ -232,6 +233,9 @@ export default Vue.extend({ to (): RawLocation { return this.computedItem.to() }, + fabTo (): RawLocation { + return this.computedItem.fabTo() + }, }, methods: { onClick () { diff --git a/komga-webui/src/components/ReadListsExpansionPanels.vue b/komga-webui/src/components/ReadListsExpansionPanels.vue index 00ff9adeb..ed10ecda3 100644 --- a/komga-webui/src/components/ReadListsExpansionPanels.vue +++ b/komga-webui/src/components/ReadListsExpansionPanels.vue @@ -30,6 +30,8 @@ import HorizontalScroller from '@/components/HorizontalScroller.vue' import ItemBrowser from '@/components/ItemBrowser.vue' import Vue from 'vue' +import { BookDto } from '@/types/komga-books' +import { ContextOrigin } from '@/types/context' export default Vue.extend({ name: 'ReadListsExpansionPanels', @@ -62,6 +64,7 @@ export default Vue.extend({ const rlId = this.readLists[val].id if (this.$_.isEmpty(this.readListsContent[val])) { const content = (await this.$komgaReadLists.getBooks(rlId, { unpaged: true } as PageRequest)).content + content.forEach((x: BookDto) => x.context = { origin: ContextOrigin.READLIST, id: rlId }) this.readListsContent.splice(val, 1, content) } } diff --git a/komga-webui/src/components/SearchBox.vue b/komga-webui/src/components/SearchBox.vue index cdf66d79d..92ebf6107 100644 --- a/komga-webui/src/components/SearchBox.vue +++ b/komga-webui/src/components/SearchBox.vue @@ -105,6 +105,7 @@ import { bookThumbnailUrl, collectionThumbnailUrl, readListThumbnailUrl, seriesThumbnailUrl } from '@/functions/urls' import { debounce } from 'lodash' import Vue from 'vue' +import { BookDto } from '@/types/komga-books' export default Vue.extend({ name: 'SearchBox', diff --git a/komga-webui/src/components/dialogs/EditBooksDialog.vue b/komga-webui/src/components/dialogs/EditBooksDialog.vue index a3c33ba8a..64d663308 100644 --- a/komga-webui/src/components/dialogs/EditBooksDialog.vue +++ b/komga-webui/src/components/dialogs/EditBooksDialog.vue @@ -279,6 +279,7 @@ import { authorRoles } from '@/types/author-roles' import moment from 'moment' import Vue from 'vue' import { helpers, requiredIf } from 'vuelidate/lib/validators' +import { BookDto } from '@/types/komga-books' const validDate = (value: any) => !helpers.req(value) || moment(value, 'YYYY-MM-DD', true).isValid() diff --git a/komga-webui/src/components/dialogs/ReadListAddToDialog.vue b/komga-webui/src/components/dialogs/ReadListAddToDialog.vue index b23736966..e75be329c 100644 --- a/komga-webui/src/components/dialogs/ReadListAddToDialog.vue +++ b/komga-webui/src/components/dialogs/ReadListAddToDialog.vue @@ -80,6 +80,7 @@