+
{{ doneCount }} uploaded, {{ errorCount }} failed
+
{{ doneCount }} of {{ files.length }} uploading...
@@ -263,3 +395,25 @@ function formatBytes(bytes: number): string {
+
+
diff --git a/client/src/features/library/components/LibraryCreatorScanner.vue b/client/src/features/library/components/LibraryCreatorScanner.vue
index 304ec01c4..46a89cb84 100644
--- a/client/src/features/library/components/LibraryCreatorScanner.vue
+++ b/client/src/features/library/components/LibraryCreatorScanner.vue
@@ -33,7 +33,7 @@ function useDragList(getList: () => string[], onUpdate: (v: string[]) => void) {
if (dragFrom.value === null || dragOver.value === null || dragFrom.value === dragOver.value) return
const list = [...getList()]
const [item] = list.splice(dragFrom.value, 1)
- list.splice(dragOver.value, 0, item)
+ if (item !== undefined) list.splice(dragOver.value, 0, item)
onUpdate(list)
dragFrom.value = null
dragOver.value = null
diff --git a/client/src/features/library/composables/__tests__/useLibraryUploadEvents.spec.ts b/client/src/features/library/composables/__tests__/useLibraryUploadEvents.spec.ts
index bf1fe45d7..cf6754ac4 100644
--- a/client/src/features/library/composables/__tests__/useLibraryUploadEvents.spec.ts
+++ b/client/src/features/library/composables/__tests__/useLibraryUploadEvents.spec.ts
@@ -1,11 +1,11 @@
import { describe, expect, it, vi } from 'vitest'
-import { emitLibraryUploadCompleted, useLibraryUploadEvents } from '../useLibraryUploadEvents'
+import { emitLibraryUploadCompleted, useLibraryUploadEvents, type LibraryUploadCompletedEvent } from '../useLibraryUploadEvents'
describe('useLibraryUploadEvents', () => {
it('notifies subscribers with the emitted event payload', () => {
const { onLibraryUploadCompleted } = useLibraryUploadEvents()
- const cb = vi.fn()
+ const cb = vi.fn<(event: LibraryUploadCompletedEvent) => void>()
const off = onLibraryUploadCompleted(cb)
const event = {
@@ -26,7 +26,7 @@ describe('useLibraryUploadEvents', () => {
it('stops notifying once unsubscribed', () => {
const { onLibraryUploadCompleted } = useLibraryUploadEvents()
- const cb = vi.fn()
+ const cb = vi.fn<(event: LibraryUploadCompletedEvent) => void>()
const off = onLibraryUploadCompleted(cb)
off()
diff --git a/client/src/features/library/composables/useBookUpload.ts b/client/src/features/library/composables/useBookUpload.ts
index eba0a1aaf..08ee7e148 100644
--- a/client/src/features/library/composables/useBookUpload.ts
+++ b/client/src/features/library/composables/useBookUpload.ts
@@ -105,6 +105,14 @@ export function useBookUpload() {
files.value = files.value.filter((f) => f.id !== id)
}
+ function retryFile(id: string) {
+ const item = files.value.find((f) => f.id === id)
+ if (!item || item.status !== 'error') return
+ item.status = 'pending'
+ item.error = undefined
+ item.progress = 0
+ }
+
function reset() {
files.value = []
}
@@ -138,6 +146,7 @@ export function useBookUpload() {
uploadedBookIds,
addFiles,
removeFile,
+ retryFile,
reset,
startUpload,
}
diff --git a/client/src/features/reader/cbz/CbzReaderView.vue b/client/src/features/reader/cbz/CbzReaderView.vue
index 640231666..d1c6e1258 100644
--- a/client/src/features/reader/cbz/CbzReaderView.vue
+++ b/client/src/features/reader/cbz/CbzReaderView.vue
@@ -92,11 +92,13 @@ function handleImageClick(e: MouseEvent) {
let touchStartX = 0
function onTouchStart(e: TouchEvent) {
- touchStartX = e.touches[0].clientX
+ if (e.touches[0]) touchStartX = e.touches[0].clientX
}
function onTouchEnd(e: TouchEvent) {
- const dx = e.changedTouches[0].clientX - touchStartX
+ const touch = e.changedTouches[0]
+ if (!touch) return
+ const dx = touch.clientX - touchStartX
if (Math.abs(dx) < 50) return
if (dx < 0) {
if (direction.value === 'rtl') prevPage()
diff --git a/client/src/features/reader/epub/components/NoteDialog.vue b/client/src/features/reader/epub/components/NoteDialog.vue
index 38f0acc2d..85088ae18 100644
--- a/client/src/features/reader/epub/components/NoteDialog.vue
+++ b/client/src/features/reader/epub/components/NoteDialog.vue
@@ -1,6 +1,6 @@
diff --git a/client/src/features/reader/epub/components/ReaderSidebar.vue b/client/src/features/reader/epub/components/ReaderSidebar.vue
index d0ad966bc..6d1d98c0a 100644
--- a/client/src/features/reader/epub/components/ReaderSidebar.vue
+++ b/client/src/features/reader/epub/components/ReaderSidebar.vue
@@ -1,6 +1,6 @@