feat(book-uploader): Improved UX of drag&drop when adding books. (#2410)

The current experience was not great when you have several libraries, instead of swallowing the drop it was disabling the drag/drop zone leading to the browser taking over and opening the file.
This changes keeps the drag & drop enabled but just swallows the files and displays an error if no library is selected.
It also improves the UI by making it more clear when a drag event is happening.
This commit is contained in:
Giroux Arthur
2026-01-23 09:39:35 -07:00
committed by GitHub
parent d1c4836917
commit 5d1a295d49
3 changed files with 39 additions and 5 deletions
@@ -90,8 +90,7 @@
[multiple]="true"
accept=".pdf,.epub,.cbz,.cbr,.cb7,.fb2,.mobi,.azw,.azw3"
(onSelect)="onFilesSelect($event)"
(uploadHandler)="uploadFiles($event)"
[disabled]="value === 'library' ? (!selectedLibrary || !selectedPath) : false">
(uploadHandler)="uploadFiles($event)">
<ng-template #header let-files let-chooseCallback="chooseCallback" let-clearCallback="clearCallback" let-uploadCallback="uploadCallback">
<div class="upload-actions">
<div class="action-buttons">