dragonflight/services/web-ui/public/home.html
Zac Gaetano 656c820638 feat: wire editor.html as primary editor, fix its sidebar/branding
- All pages: Editor nav link now points to editor.html (in-house NLE)
- Removes the :47435 OpenReel resolver script from all pages
- editor.html: canonical Z-AMPP sidebar (all 10 nav items, correct icons)
- editor.html: Z-AMPP brand logo, removes Wild Dragon SVG mark
- editor.html: removes Google Fonts import
- editor.html: adds auth-guard.js
2026-05-18 23:11:53 -04:00

479 lines
23 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<title>Home — Z-AMPP</title>
<link rel="stylesheet" href="css/common.css">
<style>
/* AMPP-style landing — wide row of preview cards on a brand-blue gradient */
.home-main {
flex: 1;
overflow: auto;
position: relative;
background:
radial-gradient(ellipse 70% 50% at 50% 0%, oklch(35% 0.16 266 / 0.55), transparent 65%),
radial-gradient(ellipse 80% 60% at 30% 90%, oklch(40% 0.20 266 / 0.45), transparent 70%),
radial-gradient(ellipse 60% 50% at 80% 80%, oklch(45% 0.18 240 / 0.30), transparent 65%),
linear-gradient(135deg, oklch(20% 0.05 260), oklch(12% 0.025 250) 100%);
display: flex;
flex-direction: column;
}
.home-stage {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 56px 32px 32px;
gap: 36px;
min-height: 100%;
}
.home-brandmark {
display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.home-portrait {
width: 120px; height: 120px;
border-radius: 50%;
overflow: hidden; position: relative;
background:
radial-gradient(ellipse at 40% 30%, oklch(35% 0.18 266 / 0.4), transparent 65%),
linear-gradient(135deg, oklch(20% 0.04 260), oklch(8% 0.015 250));
border: 2px solid oklch(55% 0.20 266 / 0.5);
box-shadow:
0 20px 50px -10px oklch(45% 0.20 266 / 0.4),
inset 0 1px 0 oklch(100% 0 0 / 0.08);
}
.home-portrait img {
position: absolute; inset: 0;
width: 100%; height: 100%;
object-fit: cover;
object-position: 50% 30%;
}
.home-portrait-dot {
position: absolute; bottom: 4px; right: 4px;
width: 18px; height: 18px;
background: oklch(62% 0.22 25);
border: 3px solid oklch(15% 0.025 250);
border-radius: 50%;
box-shadow: 0 0 12px oklch(62% 0.22 25);
animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
0%, 100% { opacity: 0.85; transform: scale(1); }
50% { opacity: 1; transform: scale(1.1); }
}
.home-wordmark-svg { width: min(380px, 70vw); height: auto; filter: drop-shadow(0 16px 30px oklch(35% 0.18 266 / 0.45)); margin-bottom: -10px; }
.home-wordmark {
font-size: 36px; font-weight: 700;
letter-spacing: -0.02em;
color: var(--text-primary);
line-height: 1;
}
.home-wordmark .accent { color: oklch(70% 0.18 266); }
.home-tagline {
display: flex; align-items: center; gap: 12px;
font-size: 17px; font-weight: 500;
color: oklch(75% 0.10 240);
letter-spacing: 0.005em;
}
.home-tagline::before {
content: ''; width: 3px; height: 18px;
background: oklch(70% 0.18 266);
border-radius: 2px;
}
.home-cards {
display: flex;
gap: 18px;
width: 100%;
max-width: 1680px;
padding: 0 24px;
flex-wrap: wrap;
justify-content: center;
}
.home-card {
flex: 1 1 0;
min-width: 200px;
max-width: 220px;
background: oklch(12% 0.020 250 / 0.85);
border: 1px solid oklch(30% 0.04 260 / 0.5);
border-radius: 10px;
overflow: hidden;
text-decoration: none;
color: var(--text-primary);
display: flex;
flex-direction: column;
cursor: pointer;
backdrop-filter: blur(6px);
transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.home-card:hover {
transform: translateY(-4px);
border-color: oklch(55% 0.20 266 / 0.6);
box-shadow: 0 24px 50px -16px oklch(45% 0.20 266 / 0.4);
}
.home-card-title {
padding: 12px 16px 10px;
font-size: 15px; font-weight: 500;
letter-spacing: 0.005em;
color: var(--text-primary);
}
.home-card-preview {
position: relative;
aspect-ratio: 16/10;
background: linear-gradient(135deg, oklch(18% 0.030 260), oklch(10% 0.015 250));
overflow: hidden;
border-top: 1px solid oklch(28% 0.04 260 / 0.4);
border-bottom: 1px solid oklch(28% 0.04 260 / 0.4);
}
.home-card-preview svg.preview-art {
position: absolute; inset: 0;
width: 100%; height: 100%;
}
.home-card-stats {
position: absolute; bottom: 8px; left: 10px;
display: inline-flex; align-items: center; gap: 6px;
background: oklch(10% 0.015 250 / 0.8);
backdrop-filter: blur(6px);
padding: 3px 8px;
border-radius: 999px;
border: 1px solid oklch(28% 0.04 260 / 0.4);
font-size: 10px; font-family: var(--font-mono);
letter-spacing: 0.04em;
color: var(--text-secondary);
}
.home-card-stats b { color: var(--text-primary); font-weight: 600; }
.home-card-stats-dot {
width: 6px; height: 6px; border-radius: 50%;
background: var(--signal-good); box-shadow: 0 0 6px var(--signal-good);
}
.home-card-desc {
padding: 12px 16px 16px;
font-size: 11.5px; line-height: 1.5;
color: var(--text-secondary);
}
.home-footer {
padding: 24px;
display: flex; align-items: center; gap: 10px;
justify-content: center;
color: var(--text-tertiary);
font-size: 11px; letter-spacing: 0.08em;
text-transform: uppercase;
}
.home-footer-mark {
display: inline-flex; align-items: center; gap: 8px;
font-weight: 700; color: var(--text-secondary);
}
.home-footer-mark-dot {
width: 6px; height: 6px; border-radius: 50%;
background: oklch(70% 0.18 266);
}
@media (max-width: 900px) {
.home-stage { padding: 32px 16px; gap: 24px; }
.home-wordmark { font-size: 28px; }
.home-portrait { width: 96px; height: 96px; }
.home-cards { gap: 12px; padding: 0 12px; }
.home-card { min-width: 150px; }
}
</style>
</head>
<body>
<div class="shell">
<nav class="sidebar" aria-label="Main navigation">
<div class="sidebar-brand">
<img src="img/dragon-logo.png?v=1" alt="Wild Dragon" class="sidebar-logo">
<span class="sidebar-brand-name">Z-AMPP</span>
</div>
<nav class="sidebar-nav">
<a href="home.html" class="nav-item active">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 7l6-5 6 5v7a1 1 0 0 1-1 1h-3v-5H6v5H3a1 1 0 0 1-1-1z"/></svg>
Home
</a>
<a href="index.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="1" width="6" height="6" rx="1"/><rect x="9" y="1" width="6" height="6" rx="1"/><rect x="1" y="9" width="6" height="6" rx="1"/><rect x="9" y="9" width="6" height="6" rx="1"/></svg>
Library
</a>
<a href="projects.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M1 4a1 1 0 0 1 1-1h4l2 2h5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1z"/></svg>
Projects
</a>
<a href="upload.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 11V3M5 6l3-3 3 3"/><path d="M2 13h12"/></svg>
Ingest
</a>
<a href="recorders.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="1" y="4" width="10" height="8" rx="1"/><path d="M11 7l4-2v6l-4-2"/></svg>
Recorders
</a>
<a href="capture.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="8" cy="8" r="3"/><circle cx="8" cy="8" r="6.5"/></svg>
Capture
</a>
<a href="jobs.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4h12M2 8h8M2 12h5"/></svg>
Jobs
</a>
<a href="editor.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 13l1.5-3.5L11 2l3 3-7.5 7.5L3 14zM10 3l3 3"/></svg>
Editor
</a>
<div class="sidebar-section-label">Admin</div>
<a href="users.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="6" cy="5" r="2.5"/><path d="M1 13c0-2.8 2.2-5 5-5s5 2.2 5 5"/><circle cx="12" cy="5" r="2"/><path d="M15 12c0-1.9-1.3-3.5-3-4"/></svg>
Users
</a>
<a href="tokens.html" class="nav-item">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="6" cy="10" r="3.5"/><path d="M8.7 7.3L13 3M11.5 3.5l1.5 1.5M13.5 2.5l1 1"/></svg>
Tokens
</a>
</nav>
<div class="sidebar-footer">
<div class="sidebar-user">
<div class="sidebar-user-avatar" id="userAvatar">?</div>
<div class="sidebar-user-info">
<div class="sidebar-user-name" id="userName"></div>
<div class="sidebar-user-role" id="userRole"></div>
</div>
<button class="btn btn-ghost" id="logoutBtn" title="Sign out" style="padding:0;width:24px;height:24px;flex-shrink:0;">
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" width="14" height="14"><path d="M10 8H3M6 5l-3 3 3 3"/><path d="M7 3h5a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H7"/></svg>
</button>
</div>
</div>
</nav>
<div class="main home-main">
<div class="home-stage">
<div class="home-brandmark">
<div class="home-portrait">
<img src="img/ampp-safe.png?v=hardhat3" alt="Zac in hardhat">
<span class="home-portrait-dot" title="On duty"></span>
</div>
<svg class="home-wordmark-svg" viewBox="0 0 540 132" xmlns="http://www.w3.org/2000/svg" aria-label="Z-AMPP">
<defs>
<linearGradient id="zwm" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="oklch(82% 0.14 220)"/>
<stop offset="0.55" stop-color="oklch(58% 0.18 245)"/>
<stop offset="1" stop-color="oklch(32% 0.16 265)"/>
</linearGradient>
</defs>
<text x="0" y="108" font-family="Inter, system-ui, sans-serif" font-weight="900" font-size="132" letter-spacing="-8" fill="url(#zwm)">Z-AMPP</text>
</svg>
</div>
<div class="home-tagline">Please select an option below to get started</div>
<div class="home-cards">
<a href="index.html" class="home-card">
<div class="home-card-title">Library</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<g fill="oklch(25% 0.05 260)" stroke="oklch(45% 0.10 266 / 0.4)" stroke-width="0.5">
<rect x="12" y="14" width="40" height="28" rx="2"/>
<rect x="58" y="14" width="40" height="28" rx="2"/>
<rect x="104" y="14" width="40" height="28" rx="2"/>
<rect x="150" y="14" width="40" height="28" rx="2"/>
<rect x="12" y="48" width="40" height="28" rx="2"/>
<rect x="58" y="48" width="40" height="28" rx="2"/>
<rect x="104" y="48" width="40" height="28" rx="2"/>
<rect x="150" y="48" width="40" height="28" rx="2"/>
<rect x="12" y="82" width="40" height="28" rx="2"/>
<rect x="58" y="82" width="40" height="28" rx="2"/>
<rect x="104" y="82" width="40" height="28" rx="2"/>
<rect x="150" y="82" width="40" height="28" rx="2"/>
</g>
<g fill="oklch(45% 0.20 266 / 0.8)"><circle cx="32" cy="28" r="3"/><circle cx="124" cy="62" r="3"/><circle cx="170" cy="96" r="3"/></g>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot"></span><b id="assetCount">--</b>&nbsp;assets</span>
</div>
<div class="home-card-desc">Browse, organize, and preview every asset across all projects.</div>
</a>
<a href="projects.html" class="home-card">
<div class="home-card-title">Projects</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<g fill="oklch(20% 0.04 260)" stroke="oklch(45% 0.10 266 / 0.4)" stroke-width="0.5">
<path d="M12 24 L12 100 L188 100 L188 36 L92 36 L80 24 Z" />
<path d="M28 56 L184 56" stroke-dasharray="2,3"/>
<path d="M28 76 L184 76" stroke-dasharray="2,3"/>
</g>
<g fill="oklch(45% 0.20 266 / 0.6)">
<rect x="32" y="46" width="6" height="6" rx="1"/>
<rect x="32" y="66" width="6" height="6" rx="1"/>
<rect x="32" y="86" width="6" height="6" rx="1"/>
</g>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot"></span><b id="projectCount">--</b>&nbsp;projects</span>
</div>
<div class="home-card-desc">Create projects, organize bins, and manage who owns what footage.</div>
</a>
<a href="upload.html" class="home-card">
<div class="home-card-title">Ingest</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<g stroke="oklch(45% 0.20 266 / 0.6)" stroke-width="2" fill="none">
<path d="M100 80 V 30 M85 45 L 100 30 L 115 45" stroke-linecap="round" stroke-linejoin="round"/>
<line x1="30" y1="100" x2="170" y2="100" stroke-dasharray="3,3" stroke-width="1"/>
</g>
<rect x="40" y="92" width="120" height="6" rx="3" fill="oklch(25% 0.05 260)"/>
<rect x="40" y="92" width="68" height="6" rx="3" fill="oklch(55% 0.20 266 / 0.9)"/>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot"></span><b id="ingestCount">--</b>&nbsp;processing</span>
</div>
<div class="home-card-desc">Upload finished files. MOV, MP4, MXF, ProRes — drop them, we proxy them.</div>
</a>
<a href="recorders.html" class="home-card">
<div class="home-card-title">Recorders</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<rect x="20" y="22" width="120" height="80" rx="4" fill="oklch(8% 0.01 250)" stroke="oklch(45% 0.10 266 / 0.4)" stroke-width="0.5"/>
<g opacity="0.5"><path d="M30 50 q15 -12 30 0 t30 0 t30 0 t30 0" stroke="oklch(55% 0.20 266)" stroke-width="1" fill="none"/><path d="M30 70 q15 -8 30 0 t30 0 t30 0 t30 0" stroke="oklch(55% 0.20 266)" stroke-width="1" fill="none"/></g>
<path d="M140 62 L182 42 L182 82 Z" fill="oklch(20% 0.04 260)" stroke="oklch(45% 0.10 266 / 0.4)" stroke-width="0.5"/>
<circle cx="160" cy="62" r="6" fill="oklch(62% 0.22 25)"><animate attributeName="opacity" values="1;0.5;1" dur="1.6s" repeatCount="indefinite"/></circle>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot" style="background:oklch(62% 0.22 25);box-shadow:0 0 6px oklch(62% 0.22 25)"></span><b id="recorderCount">--</b>&nbsp;live</span>
</div>
<div class="home-card-desc">Pull SRT, RTMP, and SDI feeds straight to ProRes with a live HLS preview.</div>
</a>
<a href="capture.html" class="home-card">
<div class="home-card-title">Capture</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<circle cx="100" cy="62" r="34" fill="none" stroke="oklch(45% 0.10 266 / 0.3)" stroke-width="0.5"/>
<circle cx="100" cy="62" r="22" fill="none" stroke="oklch(45% 0.10 266 / 0.5)" stroke-width="0.5"/>
<circle cx="100" cy="62" r="12" fill="oklch(20% 0.04 260)" stroke="oklch(55% 0.20 266 / 0.7)" stroke-width="1"/>
<circle cx="100" cy="62" r="4" fill="oklch(70% 0.18 266)"/>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot"></span><b id="captureStatus">Idle</b></span>
</div>
<div class="home-card-desc">DeckLink SDI capture with manual scene control and per-device routing.</div>
</a>
<a href="edit.html" class="home-card">
<div class="home-card-title">Editor</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<rect x="14" y="14" width="172" height="44" rx="3" fill="oklch(8% 0.01 250)" stroke="oklch(45% 0.10 266 / 0.4)" stroke-width="0.5"/>
<g stroke="oklch(45% 0.10 266 / 0.4)" stroke-width="0.5">
<line x1="14" y1="74" x2="186" y2="74"/>
<line x1="14" y1="92" x2="186" y2="92"/>
<line x1="14" y1="110" x2="186" y2="110"/>
</g>
<rect x="22" y="68" width="60" height="12" rx="2" fill="oklch(55% 0.20 266 / 0.8)"/>
<rect x="90" y="68" width="38" height="12" rx="2" fill="oklch(55% 0.20 266 / 0.5)"/>
<rect x="40" y="86" width="90" height="12" rx="2" fill="oklch(70% 0.18 266 / 0.6)"/>
<rect x="30" y="104" width="80" height="12" rx="2" fill="oklch(55% 0.20 266 / 0.7)"/>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot"></span>Web editor &nbsp;</span>
</div>
<div class="home-card-desc">Pull a clip from the library into the in-browser editor. Trim, cut, export.</div>
</a>
<a href="jobs.html" class="home-card">
<div class="home-card-title">Jobs</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<g stroke="oklch(45% 0.10 266 / 0.4)" stroke-width="0.5">
<line x1="14" y1="28" x2="186" y2="28"/>
<line x1="14" y1="46" x2="186" y2="46"/>
<line x1="14" y1="64" x2="186" y2="64"/>
<line x1="14" y1="82" x2="186" y2="82"/>
<line x1="14" y1="100" x2="186" y2="100"/>
</g>
<rect x="22" y="20" width="38" height="6" rx="3" fill="oklch(45% 0.16 145 / 0.8)"/>
<rect x="22" y="38" width="80" height="6" rx="3" fill="oklch(45% 0.16 145 / 0.6)"/>
<rect x="22" y="56" width="120" height="6" rx="3" fill="oklch(70% 0.18 80 / 0.8)"/>
<rect x="22" y="74" width="60" height="6" rx="3" fill="oklch(45% 0.16 145 / 0.7)"/>
<rect x="22" y="92" width="100" height="6" rx="3" fill="oklch(45% 0.16 145 / 0.5)"/>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot"></span><b id="jobCount">--</b>&nbsp;active</span>
</div>
<div class="home-card-desc">Track proxy generation, thumbnails, and AMPP folder sync as they run.</div>
</a>
<a href="tokens.html" class="home-card" title="Just kidding">
<div class="home-card-title">Tokens</div>
<div class="home-card-preview">
<svg class="preview-art" viewBox="0 0 200 125" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="200" height="125" fill="oklch(13% 0.02 250)"/>
<g stroke="oklch(45% 0.10 266 / 0.5)" stroke-width="0.5"><line x1="14" y1="100" x2="186" y2="100"/><line x1="14" y1="80" x2="186" y2="80" stroke-dasharray="2,3"/><line x1="14" y1="60" x2="186" y2="60" stroke-dasharray="2,3"/></g>
<polyline points="14,90 38,72 62,80 86,55 110,62 134,40 158,48 186,28" fill="none" stroke="oklch(70% 0.18 200)" stroke-width="2"/>
<polyline points="14,95 38,86 62,90 86,76 110,80 134,68 158,72 186,58" fill="none" stroke="oklch(62% 0.15 145)" stroke-width="2"/>
<circle cx="186" cy="28" r="3" fill="oklch(62% 0.22 25)"/>
</svg>
<span class="home-card-stats"><span class="home-card-stats-dot" style="background:oklch(62% 0.22 25);box-shadow:0 0 6px oklch(62% 0.22 25)"></span><b id="tokenBurn"></b>&nbsp;burning</span>
</div>
<div class="home-card-desc">Token-metered pricing parody. Click for a giggle. (You actually pay $0.)</div>
</a>
</div>
</div>
<div class="home-footer">
<span class="home-footer-mark"><span class="home-footer-mark-dot"></span>Wild Dragon</span>
<span>·</span>
<span id="systemBuild">Z-AMPP Operator Console</span>
</div>
</div>
</div>
<script src="js/api.js"></script>
<script src="js/topbar-strip.js"></script>
<script>
async function loadStats() {
const setText = (id, val) => { const el = document.getElementById(id); if (el) el.textContent = val; };
try {
const [aRes, pRes, rRes, jRes] = await Promise.allSettled([
fetch('/api/v1/assets?limit=1', { credentials: 'include' }),
fetch('/api/v1/projects', { credentials: 'include' }),
fetch('/api/v1/recorders', { credentials: 'include' }),
fetch('/api/v1/jobs?status=active', { credentials: 'include' }),
]);
if (aRes.status === 'fulfilled' && aRes.value.ok) {
const j = await aRes.value.json();
setText('assetCount', j.total ?? (j.assets?.length ?? '--'));
}
if (pRes.status === 'fulfilled' && pRes.value.ok) {
const j = await pRes.value.json();
const arr = Array.isArray(j) ? j : (j.projects ?? []);
setText('projectCount', arr.length);
}
if (rRes.status === 'fulfilled' && rRes.value.ok) {
const j = await rRes.value.json();
const arr = Array.isArray(j) ? j : [];
const recording = arr.filter(r => r.status === 'recording').length;
setText('recorderCount', recording);
}
if (jRes.status === 'fulfilled' && jRes.value.ok) {
const j = await jRes.value.json();
const arr = Array.isArray(j) ? j : (j.jobs ?? []);
setText('jobCount', arr.length);
setText('ingestCount', arr.filter(x => (x.type || '').toLowerCase().includes('proxy')).length || arr.length);
}
const tb = document.getElementById('tokenBurn'); if (tb) { tb.textContent = (14000 + Math.round(Math.random() * 8000)).toLocaleString(); }
} catch (_) { /* leave dashes */ }
}
loadStats();
setInterval(loadStats, 15000);
</script>
</body>
</html>