Support for dynamic page loading for Multi-WACZs (#399)

Support querying pages dynamically via pages endpoint:
- If loaded pages < total pages, load additional pages via /pages
endpoint if canQueryPages is set to true on item
- If query provided, do `/pages?search=...` to search for pages. Use
pagination of 25 pages for now.

WACZ hash:
- if provided, store waczhash per page, and use for thumbnail, favicon
and top-level replay loading.

Embed: better support for force reloading, call delete with reload
directly in embed

Depends on webrecorder/wabac.js#220
This commit is contained in:
Ilya Kreymer
2025-02-24 14:35:03 -08:00
committed by GitHub
parent 94cbf5e43d
commit 6ef8bf4973
9 changed files with 203 additions and 66 deletions
+6 -2
View File
@@ -11,9 +11,12 @@ export type URLResource = {
size: number;
favIconUrl: string;
text?: string;
waczhash?: string;
};
export type Page = URLResource;
export type Page = URLResource & {
isSeed?: boolean;
};
export type ItemType = {
filename?: string;
@@ -43,12 +46,13 @@ export type ItemType = {
software?: string;
};
onDemand?: boolean;
pages: URLResource[];
pages: Page[];
curatedPages: (URLResource & { list: string })[];
lists: URLResource[];
ctime?: string;
totalSize?: unknown;
size?: number | string;
canQueryPages?: boolean;
};
export type FavIconEventDetail = {