feat: add reading stats and replace dashboard charts with recharts

Add currently reading, recently read, and reading activity sections to
the dashboard. Replace all custom SVG/CSS charts with recharts library
(donut, area, stacked bar, horizontal bar). Reorganize layout: libraries
and popular series side by side, books added chart full width below.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 06:26:45 +01:00
parent 766e3a01b2
commit 08f0397029
8 changed files with 901 additions and 177 deletions

View File

@@ -550,9 +550,32 @@ export type MetadataStats = {
by_provider: ProviderCount[];
};
export type CurrentlyReadingItem = {
book_id: string;
title: string;
series: string | null;
current_page: number;
page_count: number;
};
export type RecentlyReadItem = {
book_id: string;
title: string;
series: string | null;
last_read_at: string;
};
export type MonthlyReading = {
month: string;
books_read: number;
};
export type StatsResponse = {
overview: StatsOverview;
reading_status: ReadingStatusStats;
currently_reading: CurrentlyReadingItem[];
recently_read: RecentlyReadItem[];
reading_over_time: MonthlyReading[];
by_format: FormatCount[];
by_language: LanguageCount[];
by_library: LibraryStatsItem[];