diff --git a/src/components/history/History.svelte b/src/components/history/History.svelte
deleted file mode 100644
index cec9424..0000000
--- a/src/components/history/History.svelte
+++ /dev/null
@@ -1,283 +0,0 @@
-
-
-
-
-
- {#if stats}
-
-
- {stats.uniqueChapters}
- chapters read
-
-
-
- {stats.uniqueManga}
- series
-
-
-
- {formatReadTime(stats.estimatedMinutes)}
- est. read time
-
-
- {/if}
-
- {#if $history.length === 0}
-
-
-
No reading history yet
-
Chapters you read will appear here
-
- {:else if sessions.length === 0}
-
-
-
No results for "{search}"
-
- {:else}
-
- {#each groups as { label, items }}
-
-
{label}
- {#each items as session}
-
resume(session)}>
-
-
- {#if session.chapterCount > 1}
-
{session.chapterCount}
- {/if}
-
-
- {session.mangaTitle}
-
- {#if session.chapterCount > 1}
-
- {session.firstChapterName}
- →
- {session.latestChapterName}
-
- {:else}
- {session.latestChapterName}
- {#if session.latestPageNumber > 1}
- p.{session.latestPageNumber}
- {/if}
- {/if}
-
-
- {timeAgo(session.readAt)}
-
-
- {/each}
-
- {/each}
-
- {/if}
-
-
-
diff --git a/src/components/layout/Layout.svelte b/src/components/layout/Layout.svelte
index 0b84ef7..c78741f 100644
--- a/src/components/layout/Layout.svelte
+++ b/src/components/layout/Layout.svelte
@@ -4,10 +4,10 @@
import Home from "../pages/Home.svelte";
import Library from "../pages/Library.svelte";
import SeriesDetail from "../pages/SeriesDetail.svelte";
- import History from "../history/History.svelte";
- import Search from "../search/Search.svelte";
+ import History from "../pages/History.svelte";
+ import Search from "../pages/Search.svelte";
import Discover from "../pages/Discover.svelte";
- import Downloads from "../downloads/Downloads.svelte";
+ import Downloads from "../pages/Downloads.svelte";
import Extensions from "../pages/Extensions.svelte";
diff --git a/src/components/layout/History.svelte b/src/components/layout/RecentActivity.svelte
similarity index 100%
rename from src/components/layout/History.svelte
rename to src/components/layout/RecentActivity.svelte
diff --git a/src/components/pages/Discover.svelte b/src/components/pages/Discover.svelte
index b8f0cca..ac16691 100644
--- a/src/components/pages/Discover.svelte
+++ b/src/components/pages/Discover.svelte
@@ -9,7 +9,7 @@
import type { Manga, Source } from "../../lib/types";
import ContextMenu from "../shared/ContextMenu.svelte";
import type { MenuEntry } from "../shared/ContextMenu.svelte";
- import SourceBrowse from "../sources/SourceBrowse.svelte";
+ import SourceBrowse from "../shared/SourceBrowse.svelte";
// ── Config ────────────────────────────────────────────────────────────────────
const GENRE_TABS = ["All", "Action", "Romance", "Fantasy", "Comedy", "Drama", "Horror", "Sci-Fi", "Adventure", "Thriller"];
diff --git a/src/components/downloads/Downloads.svelte b/src/components/pages/Downloads.svelte
similarity index 100%
rename from src/components/downloads/Downloads.svelte
rename to src/components/pages/Downloads.svelte
diff --git a/src/components/pages/History.svelte b/src/components/pages/History.svelte
new file mode 100644
index 0000000..0314c21
--- /dev/null
+++ b/src/components/pages/History.svelte
@@ -0,0 +1,403 @@
+
+
+
+
+
+
+
+ {stats.uniqueChapters}
+ chapters
+
+
+
+ {stats.uniqueManga}
+ series
+
+
+
+ {formatReadTime(stats.estimatedMinutes)}
+ est. time
+
+ {#if $readingStats.currentStreakDays > 0}
+
+
+ {$readingStats.currentStreakDays}d
+ streak
+
+ {/if}
+
+
+ {#if $history.length === 0}
+
+
+
No reading history yet
+
Chapters you read will appear here
+
+ {:else if sessions.length === 0}
+
+
+
No results for "{search}"
+
+ {:else}
+
+ {#each groups as { label, items } (label)}
+
+
+ {label}
+ {items.length}
+
+ {#each items as session (session.latestChapterId + ":" + session.readAt)}
+
+
resume(session)}>
+
+
+ {#if session.chapterCount > 1}
+
{session.chapterCount}
+ {/if}
+
+
+ {session.mangaTitle}
+
+ {#if session.chapterCount > 1}
+
+ {session.firstChapterName}
+ →
+ {session.latestChapterName}
+
+ {:else}
+ {session.latestChapterName}
+ {#if session.latestPageNumber > 1}
+ p.{session.latestPageNumber}
+ {/if}
+ {/if}
+
+
+ {timeAgo(session.readAt)}
+
+
+
clearManga(session.mangaId, e)}
+ title="Remove {session.mangaTitle} from history"
+ aria-label="Remove from history"
+ >
+
+
+
+ {/each}
+
+ {/each}
+
+ {/if}
+
+
+
diff --git a/src/components/pages/Home.svelte b/src/components/pages/Home.svelte
index 3691eff..30df204 100644
--- a/src/components/pages/Home.svelte
+++ b/src/components/pages/Home.svelte
@@ -28,9 +28,12 @@
return new Date(ts).toLocaleDateString("en-US", { month: "short", day: "numeric" });
}
function formatReadTime(mins: number): string {
- if (mins < 60) return `${mins}m`;
+ if (mins < 1) return `${Math.round(mins * 60)}s`;
+ if (mins < 60) return `${Math.round(mins)}m`;
const h = Math.floor(mins / 60), r = mins % 60;
- return r === 0 ? `${h}h` : `${h}h ${r}m`;
+ if (h < 24) return r === 0 ? `${h}h` : `${h}h ${r}m`;
+ const d = Math.floor(h / 24), rh = h % 24;
+ return rh === 0 ? `${d}d` : `${d}d ${rh}h`;
}
function focusEl(node: HTMLElement) { node.focus(); }
@@ -209,7 +212,7 @@
: [];
$: recentHistory = $history.slice(0, 8);
$: stats = $readingStats;
- $: hasStats = stats.totalChaptersRead > 0 || stats.totalMangaRead > 0;
+ $: hasStats = true;
function handleRowWheel(e: WheelEvent) {
if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) return;
@@ -437,90 +440,88 @@
{/if}
-
+
-
+
+
+
Completed
+ {#if completedManga.length > 0}
+
navPage.set("library")}>View all
+ {/if}
+
{#if completedManga.length > 0}
-
{#each completedManga as m (m.id)}
previewManga.set(m)}>
-
+
+
- {m.title}
{/each}
{:else}
-
Finish a manga to see it here
{/if}
+
+
-
-
diff --git a/src/components/sources/SourceBrowse.svelte b/src/components/shared/SourceBrowse.svelte
similarity index 100%
rename from src/components/sources/SourceBrowse.svelte
rename to src/components/shared/SourceBrowse.svelte
diff --git a/src/components/sources/SourceList.svelte b/src/components/shared/SourceList.svelte
similarity index 100%
rename from src/components/sources/SourceList.svelte
rename to src/components/shared/SourceList.svelte