feat(frontend,backend): storage panel with weight rows and trash, heavy media streams by url in the viewer

This commit is contained in:
hh committed 2026-10-14 03:09:37 +02:00
1 parent f2c245707a
commit 55634984fd
19 files changed
+1822 -24

No files matched your search

+13
View File
@@ -95,6 +95,19 @@ export async function request<T>(
return response.json() as Promise<T>;
}
function streamUrl(path: string): string {
const query = auth.token ? `?token=${encodeURIComponent(auth.token)}` : "";
return `${BASE}${path}${query}`;
}
export function mediaUrl(mediaId: number): string {
return streamUrl(`/media/${mediaId}`);
}
export function trashedUrl(storageKey: string): string {
return streamUrl(`/storage/trash/${storageKey}/file`);
}
export type MediaResult =
| { state: "ready"; url: string; mime: string | null }
| { state: "not-downloaded" }