refactor: massive UX and beginner refactoring (Cookbook, Dashboard, Layout, Wording)

This commit is contained in:
Hitonabi
2026-06-20 22:06:04 +02:00
parent 9d05b2d011
commit e3be7fbfb5
11 changed files with 359 additions and 276 deletions
+8 -3
View File
@@ -25,14 +25,19 @@ function applyStatus(s) {
dot.className = "dot off";
label.textContent = "Backend nicht erreichbar";
$("#top-models").textContent = "";
showAlert("Backend nicht erreichbar — läuft uvicorn?", false);
$("#top-active").textContent = "";
showAlert("Backend nicht erreichbar läuft uvicorn?", false);
} else {
const host = s.swap_url.replace(/^https?:\/\//, "");
dot.className = "dot " + (s.swap_ok ? "on" : "off");
label.textContent = (s.swap_ok ? "llama-swap online · " : "llama-swap offline · ") + host;
label.textContent = (s.swap_ok ? "LLM-Engine: Online " : "LLM-Engine: Offline ") + host;
$("#top-models").textContent = (s.models || []).length;
const active = (s.models || []).find(m => m.state === "running");
$("#top-active").textContent = active ? active.name : "";
if (s.swap_ok) hideAlert();
else showAlert(`llama-swap nicht erreichbar unter <b>${host}</b> läuft der Dienst?`, true);
else showAlert(`LLM-Engine nicht erreichbar unter <b>${host}</b> läuft der llama-swap Dienst?`, true);
}
for (const p of panels) p.onStatus?.(s);
}