Add screenshot page, add polling screenshots, better screenshot memory cleanup, better visualization/no jitter when screenshots are shown now.

This commit is contained in:
KingKDot
2026-05-17 22:02:23 -05:00
parent 7574988e3b
commit bab5054b47
21 changed files with 1209 additions and 45 deletions
@@ -75,3 +75,14 @@ export function applyUserRoleUI(user, refs) {
unhide("file-share-link");
}
}
export async function applyThumbnailWallVisibility(user) {
if (!user || user.role === "viewer") return;
try {
const res = await fetch("/api/settings/thumbnails", { credentials: "include" });
if (!res.ok) return;
const data = await res.json();
if (data?.thumbnails?.wallEnabled === false) return;
document.querySelectorAll("#screenshots-link").forEach((el) => el.classList.remove("hidden"));
} catch {}
}
@@ -63,6 +63,7 @@ export const NAV_GROUPS = [
iconColor: "text-emerald-400",
children: [
{ href: "/metrics", label: "Metrics", icon: "fa-chart-line", iconColor: "text-emerald-400", linkId: "metrics-link" },
{ href: "/screenshots", label: "Screenshot Wall", icon: "fa-images", iconColor: "text-sky-400", linkId: "screenshots-link", hidden: true },
],
},
{