diff --git a/src/api/queries/chapters.ts b/src/api/queries/chapters.ts index 4c22666..91a4920 100644 --- a/src/api/queries/chapters.ts +++ b/src/api/queries/chapters.ts @@ -2,6 +2,12 @@ export const GET_RECENTLY_UPDATED = ` query GetRecentlyUpdated { chapters(orderBy: FETCHED_AT, orderByType: DESC, first: 300) { nodes { + id + name + chapterNumber + sourceOrder + isRead + lastPageRead mangaId fetchedAt manga { id title thumbnailUrl inLibrary } @@ -19,4 +25,4 @@ export const GET_CHAPTERS = ` } } } -`; \ No newline at end of file +`; diff --git a/src/api/queries/manga.ts b/src/api/queries/manga.ts index d2656eb..ac89539 100644 --- a/src/api/queries/manga.ts +++ b/src/api/queries/manga.ts @@ -75,6 +75,9 @@ export const LIBRARY_UPDATE_STATUS = ` manga { id title thumbnailUrl unreadCount } } } + lastUpdateTimestamp { + timestamp + } } `; diff --git a/src/api/queries/queries.md b/src/api/queries/queries.md index e8dadef..7c441a8 100644 --- a/src/api/queries/queries.md +++ b/src/api/queries/queries.md @@ -10,7 +10,7 @@ | `GET_CATEGORIES` | — | All categories with order/settings and their assigned manga (minimal fields) | | `GET_DOWNLOADED_CHAPTERS_PAGES` | — | Page counts for all downloaded chapters — used for storage stats | | `GET_DOWNLOADS_PATH` | — | `downloadsPath` and `localSourcePath` from settings | -| `LIBRARY_UPDATE_STATUS` | — | Current library update job — `jobsInfo` progress and `mangaUpdates` list with new chapters | +| `LIBRARY_UPDATE_STATUS` | — | Current library update job (`jobsInfo`, `mangaUpdates`) plus `lastUpdateTimestamp` for server-side update timing | | `GET_RESTORE_STATUS` | `id: String!` | Backup restore job status by job ID — `mangaProgress`, `state`, `totalManga` | | `VALIDATE_BACKUP` | `backup: Upload!` | Validate a backup file before restore — returns missing sources and trackers | | `MANGAS_BY_GENRE` | `filter: MangaFilterInput`, `first: Int`, `offset: Int` | Paginated manga filtered by genre, ordered by `IN_LIBRARY_AT DESC` | diff --git a/src/core/cache/queryCache.ts b/src/core/cache/queryCache.ts index 4eae1cf..1baae89 100644 --- a/src/core/cache/queryCache.ts +++ b/src/core/cache/queryCache.ts @@ -147,6 +147,7 @@ export const CACHE_GROUPS = { export const CACHE_KEYS = { LIBRARY: "library", + RECENT_UPDATES: "recent_updates", ALL_MANGA: "all_manga_unfiltered", CATEGORIES: "categories", SEARCH: "search_all_manga", diff --git a/src/features/downloads/components/DownloadQueue.svelte b/src/features/downloads/components/DownloadQueue.svelte index f9f235c..a543f33 100644 --- a/src/features/downloads/components/DownloadQueue.svelte +++ b/src/features/downloads/components/DownloadQueue.svelte @@ -23,8 +23,28 @@ {#if loading} -
Couldn't load updates
+{error}
+No recent library updates
+Run a library update to populate this page.
+