fix: offline-content renamed to downloads
This commit is contained in:
+3
-3
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user