From 3061a70087c1b52f54f35cfe578064dd5c7c871e Mon Sep 17 00:00:00 2001 From: jianf <2198972886@qq.com> Date: Sun, 16 Aug 2026 13:15:38 +0800 Subject: [PATCH] style(ui): normalize index.html formatting (expanded attrs, 2-space indent) --- internal/gateway/ui/index.html | 6111 ++++++++++++++++++++------------ 1 file changed, 3781 insertions(+), 2330 deletions(-) diff --git a/internal/gateway/ui/index.html b/internal/gateway/ui/index.html index f5130e1..e724d66 100644 --- a/internal/gateway/ui/index.html +++ b/internal/gateway/ui/index.html @@ -1,2510 +1,3961 @@ - + - - - -ModelRouter - - - - - -
- -
-
- -
-
- - - - - -
-
-
-
+
- - + /* ---------- boot ---------- */ + function refresh(tab) { + if (tab === "status") return renderStatus(); + if (tab === "chat") return renderChat(); + if (tab === "keys") return renderKeys(); + if (tab === "sort") return renderSort(); + if (tab === "sources") return renderSources(); + return renderAdapters(); + } + (async () => { + try { + const me = await api("/api/keys/me"); + window._me = me.key; + maybeWarnSeed(me.key); + if (me.key.role !== "admin") { + ["sort", "sources", "adapters"].forEach((tn) => { + const b = document.querySelector( + `nav button.sb-i[data-tab="${tn}"]`, + ); + if (b) b.style.display = "none"; + }); + } + } catch (e) {} + })(); + refresh("status"); + +