MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / toggleSecuritySection

Function toggleSecuritySection

web/scripts/ragnar_modern.js:5507–5521  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5505 // Track colour is inline — bg-slate-700/80 isn't in the compiled Tailwind.
5506 const bar = (pct, pulse, text) =>
5507 '<span class="inline-flex items-center gap-1.5 align-middle">'
5508 + '<span class="inline-block w-28 h-1.5 rounded overflow-hidden" style="background:rgba(51,65,85,.8)">'
5509 + `<span class="block h-full rounded bg-Ragnar-500${pulse ? ' animate-pulse' : ''}" style="width:${pct}%"></span></span>`
5510 + `<span>${text}</span></span>`;
5511 const render = () => {
5512 const el = Date.now() - t0;
5513 if (el < total) {
5514 const left = Math.ceil((total - el) / 1000);
5515 st.innerHTML = bar(Math.min(100, Math.round(el / total * 100)), false,
5516 `${label} · ${left}s left`);
5517 } else {
5518 st.innerHTML = bar(100, true, 'capture done — analyzing…');
5519 }
5520 };
5521 render();
5522 const timer = setInterval(render, 500);
5523 return { done() { clearInterval(timer); } };
5524}

Callers

nothing calls this directly

Calls 1

addMethod · 0.80

Tested by

no test coverage detected