Align Admin/Chat UI with NetX dark ops shell.

Add a netx theme preset as the default, variable-drive chrome styles, and keep legacy DeepSeek/other palettes available.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-11 03:25:48 +08:00
parent e4b7b8d12e
commit cbd9942b0b
7 changed files with 317 additions and 90 deletions

View file

@ -1,29 +1,32 @@
/* Admin + standalone /chat: restore palette from localStorage before first paint. */
(function () {
const STORAGE_KEY = "oclaw_admin_theme";
const THEMES = ["deepseek", "github", "nord", "dracula", "forest", "catppuccin", "light"];
const DEFAULT_THEME = "netx";
const THEMES = ["netx", "deepseek", "github", "nord", "dracula", "forest", "catppuccin", "light"];
const LEGIT = new Set(THEMES);
function applyAdminTheme(theme) {
const t = theme && LEGIT.has(theme) ? theme : "deepseek";
const t = theme && LEGIT.has(theme) ? theme : DEFAULT_THEME;
if (t === "deepseek") document.body.removeAttribute("data-admin-theme");
else document.body.setAttribute("data-admin-theme", t);
}
function initAdminThemeFromStorage() {
let raw = "deepseek";
let raw = DEFAULT_THEME;
try {
raw = localStorage.getItem(STORAGE_KEY) || "deepseek";
const stored = localStorage.getItem(STORAGE_KEY);
// Missing key → netx. Existing deepseek/github/… prefs are preserved.
raw = stored == null || stored === "" ? DEFAULT_THEME : stored;
} catch (_) {
raw = "deepseek";
raw = DEFAULT_THEME;
}
if (!LEGIT.has(raw)) raw = "deepseek";
if (!LEGIT.has(raw)) raw = DEFAULT_THEME;
applyAdminTheme(raw);
return raw;
}
function persistAdminTheme(theme) {
const t = theme && LEGIT.has(theme) ? theme : "deepseek";
const t = theme && LEGIT.has(theme) ? theme : DEFAULT_THEME;
try {
localStorage.setItem(STORAGE_KEY, t);
} catch (_) {}
@ -33,14 +36,16 @@
function currentAdminTheme() {
try {
const v = localStorage.getItem(STORAGE_KEY);
return v && LEGIT.has(v) ? v : "deepseek";
if (v == null || v === "") return DEFAULT_THEME;
return LEGIT.has(v) ? v : DEFAULT_THEME;
} catch (_) {
return "deepseek";
return DEFAULT_THEME;
}
}
window.OclawAdminTheme = {
STORAGE_KEY,
DEFAULT_THEME,
THEMES,
applyAdminTheme,
initAdminThemeFromStorage,

View file

@ -273,7 +273,8 @@ const I18N = {
"common.forbidden": "无权访问该页面。",
"common.error": "错误",
"theme.label": "界面配色",
"theme.deepseek": "DeepSeek 默认",
"theme.netx": "NetX 暗色",
"theme.deepseek": "DeepSeek",
"theme.github": "GitHub 暗色",
"theme.nord": "Nord",
"theme.dracula": "Dracula",
@ -755,7 +756,8 @@ const I18N = {
"common.forbidden": "You do not have access to this page.",
"common.error": "Error",
"theme.label": "Color theme",
"theme.deepseek": "DeepSeek (default)",
"theme.netx": "NetX Dark",
"theme.deepseek": "DeepSeek",
"theme.github": "GitHub Dark",
"theme.nord": "Nord",
"theme.dracula": "Dracula",

View file

@ -87,7 +87,8 @@ const I18N = {
"auth.disabled": "账号已被禁用,请联系管理员",
"common.error": "错误",
"theme.label": "界面配色",
"theme.deepseek": "DeepSeek 默认",
"theme.netx": "NetX 暗色",
"theme.deepseek": "DeepSeek",
"theme.github": "GitHub 暗色",
"theme.nord": "Nord",
"theme.dracula": "Dracula",
@ -276,7 +277,8 @@ const I18N = {
"auth.disabled": "Account is disabled",
"common.error": "Error",
"theme.label": "Color theme",
"theme.deepseek": "DeepSeek (default)",
"theme.netx": "NetX Dark",
"theme.deepseek": "DeepSeek",
"theme.github": "GitHub Dark",
"theme.nord": "Nord",
"theme.dracula": "Dracula",
@ -3017,10 +3019,10 @@ function syncAuthUserLabel() {
style: "width:100%;margin:4px 8px 8px;max-width:calc(100% - 16px);",
});
try {
(window.OclawAdminTheme && window.OclawAdminTheme.THEMES ? window.OclawAdminTheme.THEMES : ["deepseek"]).forEach((tid) => {
(window.OclawAdminTheme && window.OclawAdminTheme.THEMES ? window.OclawAdminTheme.THEMES : ["netx"]).forEach((tid) => {
themeSelMenu.appendChild(el("option", { value: tid, text: t(`theme.${tid}`) }));
});
themeSelMenu.value = window.OclawAdminTheme ? window.OclawAdminTheme.currentAdminTheme() : "deepseek";
themeSelMenu.value = window.OclawAdminTheme ? window.OclawAdminTheme.currentAdminTheme() : "netx";
} catch (_) {}
themeSelMenu.addEventListener("change", () => {
try {

View file

@ -98,6 +98,7 @@
<label class="admin-theme-wrap" style="display: inline-flex; align-items: center; gap: 6px; margin-right: 4px">
<span class="muted" style="font-size: 12px" data-i18n="theme.label">配色</span>
<select id="adminThemeSelect" class="input input--compact" style="min-width: 132px; max-width: 200px; padding: 6px 8px" aria-label="theme">
<option value="netx" data-i18n="theme.netx">NetX</option>
<option value="deepseek" data-i18n="theme.deepseek">DeepSeek</option>
<option value="github" data-i18n="theme.github">GitHub</option>
<option value="nord" data-i18n="theme.nord">Nord</option>

View file

@ -1,6 +1,35 @@
* { box-sizing: border-box; }
html, body { height: 100%; }
html {
color-scheme: dark;
scrollbar-color: var(--ds-chat-scroll-thumb, #475569) var(--ds-chat-scroll-track, #0f172a);
scrollbar-width: thin;
}
*::-webkit-scrollbar {
width: 10px;
height: 10px;
}
*::-webkit-scrollbar-track {
background: var(--ds-chat-scroll-track, #0f172a);
}
*::-webkit-scrollbar-thumb {
background: var(--ds-chat-scroll-thumb, #475569);
border: 2px solid var(--ds-chat-scroll-track, #0f172a);
border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
background: var(--ds-chat-scroll-thumb-hover, #64748b);
}
*::-webkit-scrollbar-corner {
background: var(--ds-chat-scroll-track, #0f172a);
}
/* Local Outfit font (no external network dependency). */
@font-face {
font-family: "Outfit";
@ -36,22 +65,27 @@ html, body { height: 100%; }
}
body {
margin: 0;
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
"Segoe UI Emoji";
/* Prefer theme variables when enabled (e.g. theme-deepseek.css). */
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
color: var(--ds-text, #e2e8f0);
background: var(--ds-bg, #0b1020);
background: var(--ds-bg, #070b14);
}
.layout { display: flex; height: 100vh; }
.sidebar { width: 260px; background: #0f172a; color: #e2e8f0; display: flex; flex-direction: column; border-right: 1px solid rgba(148,163,184,0.2); }
.sidebar {
width: 260px;
background: var(--ds-sidebar, #0c1220);
color: var(--ds-text, #e2e8f0);
display: flex;
flex-direction: column;
border-right: 1px solid var(--ds-border, rgba(148, 163, 184, 0.18));
}
.brand { padding: 16px 16px 8px; }
.brand__logoWrap {
width: 100%;
max-width: 180px;
height: 44px;
overflow: hidden;
border-radius: 10px;
border-radius: 8px;
}
.brand__logo {
display: block;
@ -61,12 +95,13 @@ body {
object-position: center;
}
.brand__title {
font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
font-family: "Outfit", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
font-weight: 600;
font-size: 1.125rem;
letter-spacing: 0.02em;
color: var(--ds-text, #e2e8f0);
}
.brand__sub { font-size: 12px; color: rgba(226,232,240,0.7); margin-top: 4px; }
.brand__sub { font-size: 12px; color: var(--ds-text-muted, #94a3b8); margin-top: 4px; }
.nav { padding: 8px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.nav__group {
display: flex;
@ -77,23 +112,69 @@ body {
font-size: 11px;
letter-spacing: 0.04em;
text-transform: uppercase;
color: rgba(226,232,240,0.55);
color: var(--ds-text-muted, #94a3b8);
padding: 6px 12px 2px;
}
.nav__item { text-decoration: none; color: rgba(226,232,240,0.85); padding: 10px 12px; border-radius: 10px; }
.nav__item:hover { background: rgba(148,163,184,0.12); }
.nav__item--active { background: rgba(59,130,246,0.22); color: #e2e8f0; }
.sidebar__footer { margin-top: auto; padding: 12px 16px; border-top: 1px solid rgba(148,163,184,0.2); }
.muted { font-size: 12px; color: rgba(226,232,240,0.65); }
.nav__item {
text-decoration: none;
color: var(--ds-text, #e2e8f0);
padding: 10px 12px;
border-radius: 8px;
border: 1px solid transparent;
}
.nav__item:hover { background: var(--ds-menu-hover-bg, rgba(148, 163, 184, 0.1)); }
.nav__item--active {
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.22));
border-color: var(--ds-accent-border, rgba(59, 130, 246, 0.4));
color: var(--ds-text, #e2e8f0);
}
.sidebar__footer {
margin-top: auto;
padding: 12px 16px;
border-top: 1px solid var(--ds-border, rgba(148, 163, 184, 0.18));
}
.muted { font-size: 12px; color: var(--ds-text-muted, #94a3b8); }
.main { flex: 1; display: flex; flex-direction: column; background: #0b1020; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(148,163,184,0.18); background: rgba(2,6,23,0.6); backdrop-filter: blur(10px); }
.topbar__title { color: #e2e8f0; font-weight: 650; }
.btn { background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.25); color: #e2e8f0; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.btn:hover { background: rgba(148,163,184,0.18); }
.btn--primary { background: rgba(59,130,246,0.25); border-color: rgba(59,130,246,0.4); }
.btn--danger { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.35); }
.content { padding: 18px; overflow: auto; color: #e2e8f0; }
.main {
flex: 1;
display: flex;
flex-direction: column;
background: var(--ds-bg, #070b14);
min-width: 0;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 18px;
border-bottom: 1px solid var(--ds-border, rgba(148, 163, 184, 0.18));
background: var(--ds-topbar-bg, rgba(6, 10, 18, 0.94));
backdrop-filter: blur(10px);
}
.topbar__title { color: var(--ds-text, #e2e8f0); font-weight: 650; }
.btn {
background: rgba(148, 163, 184, 0.1);
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.25));
color: var(--ds-text, #e2e8f0);
border-radius: 8px;
padding: 8px 12px;
cursor: pointer;
}
.btn:hover { background: var(--ds-menu-hover-bg, rgba(148, 163, 184, 0.16)); }
.btn--primary {
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.25));
border-color: var(--ds-accent-border, rgba(59, 130, 246, 0.4));
}
.btn--danger { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.35); }
.content {
padding: 18px 20px 28px;
overflow: auto;
color: var(--ds-text, #e2e8f0);
background:
radial-gradient(1200px 480px at 12% -10%, rgba(37, 99, 235, 0.14), transparent 55%),
radial-gradient(900px 420px at 88% 0%, rgba(14, 165, 233, 0.08), transparent 50%),
var(--ds-bg, #070b14);
}
.page-shell {
display: flex;
@ -121,6 +202,7 @@ body {
.page-shell__subtitle {
max-width: 920px;
line-height: 1.45;
color: var(--ds-text-muted, #94a3b8);
}
.page-shell__actions {
justify-content: flex-end;
@ -132,16 +214,16 @@ body {
}
.page-shell__tocItem {
text-decoration: none;
color: rgba(226,232,240,0.82);
border: 1px solid rgba(148,163,184,0.22);
border-radius: 999px;
color: var(--ds-text, #e2e8f0);
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.22));
border-radius: 8px;
padding: 4px 10px;
font-size: 12px;
background: transparent;
cursor: pointer;
}
.page-shell__tocItem:hover {
background: rgba(148,163,184,0.16);
background: var(--ds-menu-hover-bg, rgba(148, 163, 184, 0.16));
}
.page-grid {
@ -171,7 +253,13 @@ body {
padding: 2px 0;
}
.card { background: rgba(15,23,42,0.9); border: 1px solid rgba(148,163,184,0.18); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card {
background: var(--ds-panel, rgba(15, 23, 42, 0.92));
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.18));
border-radius: 12px;
padding: 14px;
margin-bottom: 12px;
}
.card__title { font-weight: 650; margin-bottom: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.section-card .row {
@ -227,7 +315,15 @@ body {
.row--wecom-form .btn {
flex: 0 0 auto;
}
.kv { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.14); padding: 6px 8px; border-radius: 10px; }
.kv {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 12px;
background: rgba(148, 163, 184, 0.08);
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.14));
padding: 6px 8px;
border-radius: 8px;
color: var(--ds-text, #e2e8f0);
}
.section-card .kv {
display: flex;
align-items: center;
@ -235,7 +331,14 @@ body {
width: 100%;
box-sizing: border-box;
}
.input { background: rgba(2,6,23,0.65); border: 1px solid rgba(148,163,184,0.25); color: #e2e8f0; border-radius: 10px; padding: 8px 10px; min-width: 240px; }
.input {
background: var(--ds-surface, #0f172a);
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.25));
color: var(--ds-text, #e2e8f0);
border-radius: 8px;
padding: 8px 10px;
min-width: 240px;
}
/* Unified switch style for admin/chat checkboxes */
input[type="checkbox"],
@ -245,8 +348,8 @@ input[type="checkbox"],
width: 40px;
height: 22px;
border-radius: 999px;
border: 1px solid rgba(148,163,184,0.35);
background: rgba(15,23,42,0.75);
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.35));
background: var(--ds-surface, rgba(15, 23, 42, 0.75));
position: relative;
cursor: pointer;
transition: background .18s ease, border-color .18s ease;
@ -265,8 +368,8 @@ input[type="checkbox"]::before,
}
input[type="checkbox"]:checked,
.switch-input:checked {
background: rgba(34,197,94,0.45);
border-color: rgba(34,197,94,0.85);
background: rgba(34, 197, 94, 0.45);
border-color: rgba(34, 197, 94, 0.85);
}
input[type="checkbox"]:checked::before,
.switch-input:checked::before {
@ -289,16 +392,27 @@ input[type="checkbox"]:checked::before,
.input--readonly {
max-width: min(100%, 720px);
cursor: default;
color: rgba(226,232,240,0.82);
border-color: rgba(148,163,184,0.18);
background: rgba(2,6,23,0.45);
color: var(--ds-text-muted, #94a3b8);
border-color: var(--ds-border, rgba(148, 163, 184, 0.18));
background: var(--ds-surface-2, #152033);
}
.input--readonly::placeholder {
color: rgba(226,232,240,0.45);
color: var(--ds-text-muted, #94a3b8);
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid rgba(148,163,184,0.18); padding: 10px 8px; text-align: left; font-size: 13px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid rgba(148,163,184,0.12); border-radius: 10px; }
.table th, .table td {
border-bottom: 1px solid var(--ds-border, rgba(148, 163, 184, 0.18));
padding: 10px 8px;
text-align: left;
font-size: 13px;
}
.table-wrap {
width: 100%;
overflow-x: auto;
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.12));
border-radius: 8px;
background: var(--ds-panel, rgba(15, 23, 42, 0.65));
}
.table--compact { table-layout: fixed; min-width: 860px; }
.table--compact th, .table--compact td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table--compact td.table__cell--actions,
@ -320,16 +434,16 @@ input[type="checkbox"]:checked::before,
}
}
.session-monitor-row--active {
background: rgba(94, 179, 255, 0.12);
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.12));
}
.session-monitor-row--active td {
border-bottom-color: rgba(94, 179, 255, 0.35);
border-bottom-color: var(--ds-accent-border, rgba(59, 130, 246, 0.35));
}
.session-monitor-modal {
position: fixed;
inset: 0;
z-index: 320;
background: var(--ds-overlay-bg, rgba(0, 0, 0, 0.58));
background: var(--ds-overlay-bg, rgba(2, 6, 23, 0.72));
align-items: center;
justify-content: center;
padding: 16px;
@ -375,7 +489,7 @@ input[type="checkbox"]:checked::before,
flex: 0 0 2rem;
min-width: 2rem;
padding: 6px 4px;
border-radius: 10px;
border-radius: 8px;
border: 1px solid transparent;
background: transparent;
color: inherit;
@ -387,30 +501,30 @@ input[type="checkbox"]:checked::before,
box-shadow: none;
}
.chat-sess-more:hover {
background: var(--ds-menu-hover-bg, rgba(255, 255, 255, 0.06));
background: var(--ds-menu-hover-bg, rgba(148, 163, 184, 0.1));
}
.chat-sess-more:focus {
outline: none;
}
.chat-sess-more:focus-visible {
outline: 1px solid rgba(94, 179, 255, 0.35);
outline: 1px solid var(--ds-accent-border, rgba(59, 130, 246, 0.35));
outline-offset: 1px;
}
.chat-sess-more--active {
background: rgba(94, 179, 255, 0.18);
border-color: rgba(94, 179, 255, 0.3);
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.18));
border-color: var(--ds-accent-border, rgba(59, 130, 246, 0.3));
}
.chat-sess-more--active:hover {
background: rgba(94, 179, 255, 0.22);
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.22));
}
.chat-sess-menu-pop {
z-index: 300;
background: var(--ds-panel, var(--ds-surface, #222));
border: 1px solid var(--ds-border, rgba(255, 255, 255, 0.12));
border-radius: 10px;
background: var(--ds-panel, var(--ds-surface, #0f172a));
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.18));
border-radius: 8px;
padding: 4px;
min-width: 11rem;
box-shadow: var(--ds-pop-shadow, 0 8px 24px rgba(0, 0, 0, 0.45));
box-shadow: var(--ds-pop-shadow, 0 8px 24px rgba(2, 6, 23, 0.55));
color: var(--ds-text, inherit);
}
.chat-sess-menu-item {
@ -426,7 +540,7 @@ input[type="checkbox"]:checked::before,
font-size: 13px;
}
.chat-sess-menu-item:hover {
background: var(--ds-menu-hover-bg, rgba(255, 255, 255, 0.06));
background: var(--ds-menu-hover-bg, rgba(148, 163, 184, 0.1));
}
.table--resizable thead th {
@ -443,7 +557,7 @@ input[type="checkbox"]:checked::before,
touch-action: none;
}
.table-col-resizer:hover {
background: rgba(94, 179, 255, 0.18);
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.18));
}
body.col-resize-active {
cursor: col-resize;
@ -485,28 +599,68 @@ body.col-resize-active {
box-sizing: border-box;
}
.cell-copyable { cursor: copy; position: relative; }
.cell-copyable:hover { background: rgba(59,130,246,0.12); }
.cell-copyable.cell-selected { background: rgba(59,130,246,0.2); outline: 1px solid rgba(59,130,246,0.45); }
.cell-copyable:hover { background: var(--ds-accent-soft, rgba(59, 130, 246, 0.12)); }
.cell-copyable.cell-selected {
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.2));
outline: 1px solid var(--ds-accent-border, rgba(59, 130, 246, 0.45));
}
.cell-copyable.cell-copied::after {
content: "Copied";
position: absolute;
right: 6px;
top: 4px;
font-size: 11px;
color: #93c5fd;
color: var(--ds-accent-link, #60a5fa);
}
.details { border: 1px solid rgba(148,163,184,0.18); border-radius: 10px; padding: 8px 10px; background: rgba(2,6,23,0.3); }
.details > summary { cursor: pointer; color: #cbd5e1; font-weight: 600; }
.details {
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.18));
border-radius: 8px;
padding: 8px 10px;
background: var(--ds-surface, rgba(15, 23, 42, 0.55));
}
.details > summary { cursor: pointer; color: var(--ds-text, #e2e8f0); font-weight: 600; }
.plugins-fold { margin-bottom: 12px; }
.plugins-fold__inner { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(148,163,184,0.12); }
.plugins-fold__inner {
margin-top: 10px;
padding-top: 8px;
border-top: 1px solid var(--ds-border, rgba(148, 163, 184, 0.12));
}
.plugins-pager .btn.btn--small { min-width: 72px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid rgba(148,163,184,0.25); background: rgba(148,163,184,0.08); }
.badge--ok { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.12); }
.badge--bad { border-color: rgba(239,68,68,0.45); background: rgba(239,68,68,0.12); }
.badge--mode-restricted { border-color: rgba(250,204,21,0.45); background: rgba(250,204,21,0.12); }
.badge--mode-unrestricted { border-color: rgba(59,130,246,0.45); background: rgba(59,130,246,0.16); }
.pre { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; }
.alert { margin: 8px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(148,163,184,0.25); font-size: 13px; }
.alert--critical { border-color: rgba(239,68,68,0.6); background: rgba(239,68,68,0.12); color: #fecaca; }
.alert-list { margin: 8px 0 0; padding-left: 18px; color: #cbd5e1; font-size: 13px; }
.badge {
display: inline-block;
padding: 2px 8px;
border-radius: 8px;
font-size: 12px;
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.25));
background: rgba(148, 163, 184, 0.08);
}
.badge--ok { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.12); }
.badge--bad { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.12); }
.badge--mode-restricted { border-color: rgba(250, 204, 21, 0.45); background: rgba(250, 204, 21, 0.12); }
.badge--mode-unrestricted {
border-color: var(--ds-accent-border, rgba(59, 130, 246, 0.45));
background: var(--ds-accent-soft, rgba(59, 130, 246, 0.16));
}
.pre {
white-space: pre-wrap;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 12px;
}
.alert {
margin: 8px 0;
padding: 10px 12px;
border-radius: 8px;
border: 1px solid var(--ds-border, rgba(148, 163, 184, 0.25));
font-size: 13px;
}
.alert--critical { border-color: rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.12); color: #fecaca; }
.alert-list { margin: 8px 0 0; padding-left: 18px; color: var(--ds-text-muted, #94a3b8); font-size: 13px; }
.alert-list li { margin: 4px 0; }
/* Light theme: prefer light color-scheme for native controls */
body.theme-ds-body[data-admin-theme="light"] {
color-scheme: light;
}
body.theme-ds-body[data-admin-theme="light"] .content {
background: var(--ds-bg, #f1f5f9);
}

View file

@ -63,7 +63,7 @@ body.theme-ds-body .nav__item {
}
body.theme-ds-body .nav__item:hover {
background: rgba(255, 255, 255, 0.06);
background: var(--ds-menu-hover-bg, rgba(255, 255, 255, 0.06));
}
body.theme-ds-body .nav__item--active {
@ -90,8 +90,12 @@ body.theme-ds-body .topbar__title {
}
body.theme-ds-body .content {
background: var(--ds-bg);
color: var(--ds-text);
/* Keep styles.css radial wash for themed shells; flatten only DeepSeek (no attribute). */
}
body.theme-ds-body:not([data-admin-theme]) .content {
background: var(--ds-bg);
}
body.theme-ds-body .muted {
@ -99,19 +103,21 @@ body.theme-ds-body .muted {
}
body.theme-ds-body .btn {
background: rgba(255, 255, 255, 0.06);
background: var(--ds-menu-hover-bg, rgba(255, 255, 255, 0.06));
border-color: var(--ds-border);
color: var(--ds-text);
}
body.theme-ds-body .btn:hover {
background: rgba(255, 255, 255, 0.1);
background: var(--ds-menu-hover-bg, rgba(255, 255, 255, 0.1));
filter: brightness(1.12);
}
body.theme-ds-body .btn--primary {
background: var(--ds-accent-soft);
border-color: var(--ds-accent-border-strong);
color: var(--ds-text);
filter: none;
}
body.theme-ds-body .input {
@ -353,7 +359,7 @@ body.theme-ds-body .card {
.chat-sess-row--active {
background: var(--chat-sess-active-bg, rgba(255, 255, 255, 0.062));
border-color: rgba(255, 255, 255, 0.08);
border-color: var(--chat-sess-border, rgba(255, 255, 255, 0.08));
}
.chat-sess-row--active .chat-sess-btn {

View file

@ -1,5 +1,62 @@
/* Classic admin/chat palettes: override CSS variables on body.theme-ds-body[data-admin-theme="…"].
Default (no attribute or deepseek) stays in theme-deepseek.css. */
Default attribute-less body uses theme-deepseek.css (DeepSeek). New installs default to netx via admin-theme.js. */
/* NetX dark ops shell — maps netx --nm-* chrome to --ds-* used by Admin/Chat. */
body.theme-ds-body[data-admin-theme="netx"] {
--ds-bg: #070b14;
--ds-chat-main: #070b14;
--ds-surface: #0f172a;
--ds-surface-2: #152033;
--ds-border: rgba(148, 163, 184, 0.18);
--ds-text: #e2e8f0;
--ds-text-muted: #94a3b8;
--ds-accent: #3b82f6;
--ds-accent-soft: rgba(59, 130, 246, 0.22);
--ds-sidebar: #0c1220;
--ds-topbar-bg: rgba(6, 10, 18, 0.94);
--ds-accent-border: rgba(59, 130, 246, 0.4);
--ds-accent-border-strong: rgba(59, 130, 246, 0.55);
--ds-accent-link: #60a5fa;
--ds-accent-scrollbar: #475569;
--ds-accent-scrollbar-hover: #64748b;
--ds-panel: rgba(15, 23, 42, 0.92);
--ds-chat-scroll-track: #0f172a;
--ds-chat-scroll-thumb: #475569;
--ds-chat-scroll-thumb-hover: #64748b;
--chat-sess-hover-bg: rgba(148, 163, 184, 0.08);
--chat-sess-active-bg: rgba(59, 130, 246, 0.16);
--chat-sess-border: rgba(148, 163, 184, 0.18);
--chat-user-bubble-bg: #2563eb;
--chat-user-bubble-fg: #f8fafc;
--ds-overlay-bg: rgba(2, 6, 23, 0.72);
--ds-menu-hover-bg: rgba(148, 163, 184, 0.1);
--ds-menu-sep: rgba(148, 163, 184, 0.16);
--ds-pop-shadow: 0 8px 24px rgba(2, 6, 23, 0.55);
--ds-modal-shadow: 0 16px 48px rgba(2, 6, 23, 0.65);
--ds-scroll-track-hover: rgba(148, 163, 184, 0.08);
--ds-lightbox-bg: rgba(2, 6, 23, 0.78);
--ds-lightbox-panel-bg: rgba(15, 23, 42, 0.92);
--ds-lightbox-control-bg: rgba(15, 23, 42, 0.95);
--ds-lightbox-control-fg: #e2e8f0;
--ds-lightbox-control-hover-bg: #1e293b;
--ds-lightbox-btn-bg: rgba(15, 23, 42, 0.85);
--ds-lightbox-btn-hover-bg: #1e293b;
--ds-toast-bg: rgba(15, 23, 42, 0.96);
--ds-toast-error-bg: rgba(185, 28, 28, 0.96);
--ds-toast-fg: #f8fafc;
--ds-splash-bg: rgba(15, 23, 42, 0.55);
--ds-splash-border: rgba(148, 163, 184, 0.18);
--ds-splash-spinner-track: rgba(148, 163, 184, 0.25);
--ds-splash-spinner-active: #60a5fa;
}
body.theme-ds-body[data-admin-theme="netx"] .card {
background: var(--ds-panel);
}
body.theme-ds-body[data-admin-theme="netx"] .table-wrap {
background: var(--ds-panel);
}
body.theme-ds-body[data-admin-theme="github"] {
--ds-bg: #0d1117;