Files
mangabaka-seeder/src/web/main.ts
T
Lucas WintherandClaude Opus 5.5 2da992fd81 feat(web): history of searches on the page
Each search is kept in IndexedDB with its covers and edits; the History list and
a shelf of recent series on the start screen reopen it instantly. Searching a
series again keeps the edits of covers that are still there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:35:06 +02:00

26 lines
976 B
TypeScript

import { Session } from "../core/session";
import { withPolicy } from "../core/transport";
import { mountApp } from "./app";
import { browserThemeDocument, followDarkReader } from "./dark-reader";
import { openHistory } from "./history-db";
import { APP_HTML } from "./template";
import { localStore, pageTransport } from "./transport";
import type { ServerConfig } from "./view-model";
followDarkReader(browserThemeDocument(document));
const app = document.getElementById("app")!;
app.innerHTML = APP_HTML;
const config = await fetch("/api/config")
.then((r) => (r.ok ? (r.json() as Promise<ServerConfig>) : null))
.catch(() => null);
const store = localStore();
const history = await openHistory();
const session = new Session({
transport: withPolicy(pageTransport(location.origin)),
serverBase: location.origin,
catboxVia: "server",
store,
persistHostedUrls: false,
});
mountApp({ root: document, session, store, config, catboxNeedsServer: true, history });