diff --git a/komga-webui/src/components/dialogs/BulkEditBooksDialog.vue b/komga-webui/src/components/dialogs/BulkEditBooksDialog.vue index 0f21606e5..12edd71e7 100644 --- a/komga-webui/src/components/dialogs/BulkEditBooksDialog.vue +++ b/komga-webui/src/components/dialogs/BulkEditBooksDialog.vue @@ -43,6 +43,32 @@ {{ prop.label }} + + + + {{ $t('dialog.edit_books.copy_from', {field: $t('dialog.edit_books.field_number_sort')}) }} + + + + + + + {{ $t('dialog.edit_books.number_sort_decrement') }} + + + + + + {{ $t('dialog.edit_books.number_sort_increment') }} + + + @@ -259,7 +285,7 @@ export default Vue.extend({ validateReleaseDate(date: string): string | boolean { return date && !isMatch(date, 'yyyy-MM-dd') ? this.$t('dialog.edit_books.field_release_date_error').toString() : true }, - bookDisplayName(book: BookDto):string { + bookDisplayName(book: BookDto): string { const parts = book.url.split('/') return parts[parts.length - 2] + '/' + parts[parts.length - 1] }, @@ -279,6 +305,21 @@ export default Vue.extend({ this.form[book.id][propLock] = lock } }, + numberSortDecrement() { + for (const book of this.books) { + this.form[book.id].numberSort = this.form[book.id].numberSort - 1 + } + }, + numberSortIncrement() { + for (const book of this.books) { + this.form[book.id].numberSort = this.form[book.id].numberSort + 1 + } + }, + copyFromNumberSort() { + for (const book of this.books) { + this.form[book.id].number = this.form[book.id].numberSort + } + }, dialogReset(books: BookDto[]) { (this.$refs.form as any)?.resetValidation() this.form = books.reduce((accum, current) => { diff --git a/komga-webui/src/locales/en.json b/komga-webui/src/locales/en.json index 9745391ce..4fa396986 100644 --- a/komga-webui/src/locales/en.json +++ b/komga-webui/src/locales/en.json @@ -347,6 +347,7 @@ "authors_notice_multiple_edit": "You are editing authors for multiple books. This will override existing authors of each book.", "button_cancel": "Cancel", "button_confirm": "Save changes", + "copy_from": "Copy from {field}", "dialog_title_multiple": "Edit {count} book | Edit {count} books", "dialog_title_single": "Edit {book}", "field_alternate_title": "Alternate title", @@ -364,6 +365,8 @@ "field_summary": "Summary", "field_tags": "Tags", "field_title": "Title", + "number_sort_decrement": "Decrement all by 1", + "number_sort_increment": "Increment all by 1", "tab_authors": "Authors", "tab_general": "General", "tab_links": "Links",