diff --git a/Todo b/Todo index 65060ba..879df8e 100644 --- a/Todo +++ b/Todo @@ -3,27 +3,19 @@ Major Revisions: Minor Revisions: - Improve Deduplication Algorithm with Advanced Option Settings (Implement Chapter & Author-based Comparisons, Resource Intensive) - - Integrate Download Directory Changes (Settings) + - Investigate feasibility of Multi-Page Screenshot (Reader) - Add Hover Info on Library (Make sure doesn't conflict with additional clicks) - Revise Migration (https://github.com/Suwayomi/Suwayomi-WebUI/pull/1073) - Look at how Manga are Organized in WebUI and Implement into Series-Detail (Chapter Display is Off) - Adjustment in Settings for Theme Editor: - Patch Color-Picker to Work Properly - - Investigate using AniList, etc for Moku RPC. + - Moku Discord RPC + - Write a better library for Discord RPC & Tauri + - Integrate Download Directory Changes (Settings) Priority Bugs: - Cache ALL Cover Pictures & Details for Manga in Library - - Investigate Zoom (Reader), Appears to have Cutoff, etc. - - - Display Downloaded in Series Detail - - Change Chapter Individual Delete to Red Trash Icon - - Put Downloaded Icon somewhere in Chapter Bar - - Hover Effect on Downloaded Icon (Display Total Downloaded vs Total Chapter) - - Allow Multiclick in Grid/List View to Mass Delete, Etc. - - - Fix Source Allow in Content (Doesn't even work) - - Fix TitleBar not Appearing on Windows in Fullscreen (Locks in User) General/Misc Bugs: @@ -35,4 +27,13 @@ General/Misc Bugs: In-Progress: - - Enable Cloudflare Bypass (Suwayomi Config) (Requires Patching) \ No newline at end of file + - Enable Cloudflare Bypass (Suwayomi Config) (Requires Patching) + + + + +Testing: + + - Fix TitleBar not Appearing on Windows in Fullscreen (Locks in User) + - Integrate Download Directory Changes (Settings) + - Fix Source Allow in Content (Doesn't even work) \ No newline at end of file diff --git a/src/components/pages/SeriesDetail.svelte b/src/components/pages/SeriesDetail.svelte index a79d8c2..2930b36 100644 --- a/src/components/pages/SeriesDetail.svelte +++ b/src/components/pages/SeriesDetail.svelte @@ -56,6 +56,40 @@ // Tracking modal let trackingOpen: boolean = $state(false); + // Multi-select + let selectedIds: Set = $state(new Set()); + const hasSelection = $derived(selectedIds.size > 0); + + function toggleSelect(id: number, e: MouseEvent | KeyboardEvent) { + e.stopPropagation(); + const next = new Set(selectedIds); + if (next.has(id)) next.delete(id); else next.add(id); + selectedIds = next; + } + + function clearSelection() { selectedIds = new Set(); } + + async function deleteSelected() { + const ids = [...selectedIds].filter(id => chapters.find(c => c.id === id)?.isDownloaded); + if (ids.length) { + await gql(DELETE_DOWNLOADED_CHAPTERS, { ids }).catch(console.error); + chapters = chapters.map(c => ids.includes(c.id) ? { ...c, isDownloaded: false } : c); + if (store.activeManga) chapterStore.set(store.activeManga.id, { data: chapters, fetchedAt: Date.now() }); + } + clearSelection(); + } + + async function downloadSelected() { + const ids = [...selectedIds].filter(id => !chapters.find(c => c.id === id)?.isDownloaded); + await enqueueMultiple(ids); + clearSelection(); + } + + async function markSelectedRead(isRead: boolean) { + await markBulk([...selectedIds], isRead); + clearSelection(); + } + let mangaAbort: AbortController | null = null; let chapterAbort: AbortController | null = null; let loadingFor: number | null = null; @@ -532,6 +566,24 @@
+ {#if hasSelection} + {selectedIds.size} selected + + + + + + {:else}
+ {/if}
{#if dlOpen}
+ {#if downloadedCount > 0} + +
+ {/if} {#if continueChapter} {@const contIdx = sortedChapters.indexOf(continueChapter.chapter)} {#if contIdx >= 0} @@ -653,7 +711,7 @@
{/if} - {#if totalPages > 1} + {#if totalPages >= 1}