diff --git a/internal/plugins/webui/dashboard.html b/internal/plugins/webui/dashboard.html index 246e67d..dc4aebd 100644 --- a/internal/plugins/webui/dashboard.html +++ b/internal/plugins/webui/dashboard.html @@ -1745,9 +1745,6 @@ background: flex-shrink: 0; margin-bottom: 0; } - #sm-container-chat { - height: 480px; - } .loading { display: inline-block; width: 16px; @@ -1856,119 +1853,6 @@ background: transform: translateY(0); } } - #starmap-container { - width: 100%; - height: calc(100vh - 100px); - position: relative; - overflow: hidden; - border-radius: var(--radius-md); - border: 1px solid var(--border-color); - background: var(--bg-input); - } - #starmap-container canvas { - display: block; - } - #starmap-stats { - position: absolute; - top: 16px; - left: 16px; - background: var(--glass-bg-strong); - padding: 12px 16px; - border-radius: var(--radius-md); - border: 1px solid var(--glass-border); - font-size: 13px; - z-index: 10; - backdrop-filter: blur(12px); - -webkit-backdrop-filter: blur(12px); - color: var(--text-secondary); - box-shadow: var(--shadow-md); - } - #starmap-stats h3 { - margin-bottom: 6px; - color: var(--accent); - font-size: 14px; - } - #starmap-stats p { - margin: 2px 0; - color: var(--text-muted); - font-size: 12px; - } - #starmap-stats span { - color: var(--text-primary); - font-weight: 700; - } - #starmap-info { - position: absolute; - top: 16px; - right: 16px; - background: var(--glass-bg-strong); - padding: 12px 16px; - border-radius: var(--radius-md); - border: 1px solid var(--glass-border); - font-size: 13px; - z-index: 10; - display: none; - backdrop-filter: blur(12px); - -webkit-backdrop-filter: blur(12px); - color: var(--text-secondary); - max-width: 260px; - box-shadow: var(--shadow-md); - } - #starmap-info h3 { - color: var(--success); - margin-bottom: 6px; - font-size: 14px; - } - #starmap-info p { - margin: 2px 0; - color: var(--text-muted); - font-size: 12px; - } - #starmap-info .label { - color: var(--text-muted); - } - #starmap-loading { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - font-size: 18px; - color: var(--accent); - z-index: 20; - } - .starmap-toggle { - position: absolute; - bottom: 16px; - left: 50%; - transform: translateX(-50%); - display: flex; - gap: 8px; - z-index: 10; - } - .starmap-toggle button { - background: var(--glass-bg-strong); - border: 1px solid var(--glass-border); - color: var(--text-secondary); - padding: 6px 14px; - border-radius: var(--radius-pill); - cursor: pointer; - font-size: 12px; - font-family: inherit; - backdrop-filter: blur(10px); - -webkit-backdrop-filter: blur(10px); - transition: all 0.2s; - } - .starmap-toggle button:hover { - background: var(--accent-bg); - color: var(--text-primary); - border-color: rgba(255, 127, 172, 0.5); - } - .starmap-toggle button.on { - background: var(--accent-bg); - color: var(--accent); - border-color: var(--accent); - box-shadow: var(--shadow-glow); - } #sm-container-chat { height: 260px; background: var(--bg-input); @@ -2140,22 +2024,6 @@ background: .kv-row .key { width: auto; } - #starmap-stats { - top: 8px; - left: 8px; - padding: 8px 10px; - font-size: 11px; - } - #starmap-info { - top: 8px; - right: 8px; - padding: 8px 10px; - max-width: 180px; - font-size: 11px; - } - #starmap-container { - height: calc(100vh - 60px); - } .msg-avatar { width: 24px; height: 24px; @@ -2393,11 +2261,6 @@ background: var ICON_MOON = ''; - function systemTheme() { - return window.matchMedia("(prefers-color-scheme: dark)").matches - ? "dark" - : "light"; - } function setTheme(name) { document.documentElement.setAttribute("data-theme", name); @@ -2539,13 +2402,6 @@ background: .replace(/"/g, """); } - function timeAgo(t) { - var s = Math.floor((Date.now() - new Date(t).getTime()) / 1000); - if (s < 60) return s + "秒前"; - var m = Math.floor(s / 60); - if (m < 60) return m + "分钟前"; - return Math.floor(m / 60) + "小时前"; - } function toast(m, isError) { var t = document.getElementById("toast"); @@ -2559,74 +2415,7 @@ background: } // ===== 8.6 Unified toast + confirm dialog ===== - function showToast(type, msg) { - var cls = "toast"; - if (type === "success") cls += " success"; - else if (type === "error") cls += " error"; - else if (type === "warn") cls += " warn"; - var t = document.getElementById("toast"); - t.textContent = msg; - t.className = cls; - t.style.display = "block"; - t.style.animation = "none"; - void t.offsetWidth; - t.style.animation = ""; - clearTimeout(t._hideTimer); - t._hideTimer = setTimeout(function () { - t.style.display = "none"; - }, 3000); - } - function confirmDialog(action, onConfirm) { - var existing = document.getElementById("confirm-overlay"); - if (existing) existing.remove(); - var o = document.createElement("div"); - o.id = "confirm-overlay"; - o.className = "confirm-overlay"; - o.innerHTML = - '
" + - escHtml(action) + - "
" + - '