improve cards getting updated, move bind size to 50 mb and also fix custom css for some pages

This commit is contained in:
KingKDot
2026-04-08 19:47:38 -05:00
parent d37355ffaa
commit 3da598369d
6 changed files with 209 additions and 167 deletions
@@ -234,7 +234,7 @@ export async function handleBuildRoutes(
? sleepSeconds : 0;
const MAX_BOUND_FILES = 5;
const MAX_BOUND_FILE_BYTES = 10 * 1024 * 1024;
const MAX_BOUND_FILE_BYTES = 50 * 1024 * 1024;
const ALLOWED_BIND_TARGET_OS = new Set(["windows", "linux", "darwin"]);
const RESERVED_BIND_NAMES = new Set(["manifest.json"]);
type SafeBoundFile = { name: string; data: string; targetOS: string[]; execute: boolean };
@@ -266,7 +266,7 @@ export async function handleBuildRoutes(
}
const approxDecodedBytes = Math.floor(f.data.length * 3 / 4);
if (approxDecodedBytes > MAX_BOUND_FILE_BYTES) {
return Response.json({ error: `Bound file '${safeName}' exceeds the 10 MB limit` }, { status: 400 });
return Response.json({ error: `Bound file '${safeName}' exceeds the 50 MB limit` }, { status: 400 });
}
const safeTargetOS = Array.isArray(f.targetOS)
? f.targetOS.filter((o: unknown) => typeof o === "string" && ALLOWED_BIND_TARGET_OS.has(o as string)) as string[]
@@ -657,6 +657,7 @@ export async function handlePluginRoutes(
referrerpolicy="no-referrer"
/>
<link rel="stylesheet" href="/assets/main.css" />
<link rel="stylesheet" href="/assets/custom.css" />
</head>
<body class="min-h-screen bg-slate-950 text-slate-100">
<header id="top-nav"></header>