From ff38516b11a15b66c94bedaaf67c47cf94799878 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Tue, 28 Dec 2021 18:58:36 +0800 Subject: [PATCH] feat(webui): display book links closes #750 --- komga-webui/src/locales/en.json | 13 ++++---- komga-webui/src/types/komga-books.ts | 7 +++++ komga-webui/src/views/BrowseBook.vue | 30 ++++++++++++++++++- .../komga/infrastructure/jooq/BookDtoDao.kt | 14 +++++++-- .../komga/interfaces/api/rest/dto/BookDto.kt | 2 ++ .../interfaces/api/rest/dto/WebLinkDto.kt | 10 +++++++ 6 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/WebLinkDto.kt diff --git a/komga-webui/src/locales/en.json b/komga-webui/src/locales/en.json index 5c43e9ca7..eeedbfac0 100644 --- a/komga-webui/src/locales/en.json +++ b/komga-webui/src/locales/en.json @@ -152,6 +152,7 @@ "file": "FILE", "format": "FORMAT", "isbn": "ISBN", + "links": "LINKS", "navigation_within_readlist": "Navigation within the readlist: {name}", "outdated_tooltip": "The file for this book has changed, this book must be re-analyzed", "read_book": "Read book", @@ -306,12 +307,6 @@ "warning_html": "The read list {name} will be removed from this server. Your media files will not be affected. This cannot be undone. Continue?", "warning_multiple_html": "{count} read lists will be removed from this server. Your media files will not be affected. This cannot be undone. Continue?" }, - "delete_user": { - "button_confirm": "Delete", - "confirm_delete": "Yes, delete the user \"{name}\"", - "dialog_title": "Delete User", - "warning_html": "The user {name} will be deleted from this server. This cannot be undone. Continue?" - }, "delete_series": { "button_confirm": "Delete", "confirm_delete": "Yes, delete series \"{name}\" and its files", @@ -320,6 +315,12 @@ "warning_html": "The Series {name} will be removed from this server alongside with stored media files. This cannot be undone. Continue?", "warning_multiple_html": "{count} series will be removed from this server alongside with stored media files. This cannot be undone. Continue?" }, + "delete_user": { + "button_confirm": "Delete", + "confirm_delete": "Yes, delete the user \"{name}\"", + "dialog_title": "Delete User", + "warning_html": "The user {name} will be deleted from this server. This cannot be undone. Continue?" + }, "edit_books": { "authors_notice_multiple_edit": "You are editing authors for multiple books. This will override existing authors of each book.", "button_cancel": "Cancel", diff --git a/komga-webui/src/types/komga-books.ts b/komga-webui/src/types/komga-books.ts index c90463646..df0f71b56 100644 --- a/komga-webui/src/types/komga-books.ts +++ b/komga-webui/src/types/komga-books.ts @@ -63,6 +63,8 @@ export interface BookMetadataDto { tagsLock: boolean, isbn: string, isbnLock: boolean + links?: WebLinkDto[], + linksLock?: boolean } export interface ReadProgressDto { @@ -100,6 +102,11 @@ export interface AuthorDto { role: string } +export interface WebLinkDto { + label: string, + url: string +} + export interface ReadProgressUpdateDto { page?: number, completed?: boolean diff --git a/komga-webui/src/views/BrowseBook.vue b/komga-webui/src/views/BrowseBook.vue index 7ee6e0bc5..45edc8c88 100644 --- a/komga-webui/src/views/BrowseBook.vue +++ b/komga-webui/src/views/BrowseBook.vue @@ -250,7 +250,9 @@ :key="role" class="align-center text-caption" > - {{ $te(`author_roles.${role}`) ? $t(`author_roles.${role}`) : role }} + + {{ $te(`author_roles.${role}`) ? $t(`author_roles.${role}`) : role }} +