fix: offline-content renamed to downloads

This commit is contained in:
gosangam
2026-07-14 16:51:17 +05:30
parent 12a5c15121
commit 1683abc2e9
6 changed files with 39 additions and 27 deletions
+3 -3
View File
@@ -9,7 +9,7 @@
* - **Transcript audio** → a Blob in IndexedDB, played through a pre-created
* object URL (full native seeking; see `primeOfflineAudio`).
*
* An `items` index (IndexedDB) records what's saved so `/offline-content` can
* An `items` index (IndexedDB) records what's saved so `/downloads` can
* list it and the header button can show saved state.
*/
@@ -212,13 +212,13 @@ async function cachePageAndAssets(
return { htmlLength: html.length, assetCount: assetUrls.length };
}
/** Precache the /offline-content library page so it works as the SW's offline
/** Precache the /downloads library page so it works as the SW's offline
* navigation fallback even if the user never opened it online. Best-effort. */
export async function precacheOfflineLibrary(): Promise<void> {
if (!offlineSupported()) return;
try {
await cachePageAndAssets(
new URL("/offline-content", window.location.origin).href,
new URL("/downloads", window.location.origin).href,
);
} catch {
/* best-effort */