diff --git a/panel.html b/panel.html index 22ae99d..821f86e 100644 --- a/panel.html +++ b/panel.html @@ -7,6 +7,12 @@ ST-BME 记忆图谱 SYSTEM_ACTIVE +
+ + + + +
@@ -353,18 +359,7 @@ -
-
面板外观
-
- - -
-
+ diff --git a/panel.js b/panel.js index 0778d82..43b4673 100644 --- a/panel.js +++ b/panel.js @@ -633,7 +633,8 @@ function _refreshConfigTab() { _setInputValue("bme-setting-compress-prompt", settings.compressPrompt || DEFAULT_PROMPTS.compress); _setInputValue("bme-setting-synopsis-prompt", settings.synopsisPrompt || DEFAULT_PROMPTS.synopsis); _setInputValue("bme-setting-reflection-prompt", settings.reflectionPrompt || DEFAULT_PROMPTS.reflection); - _setInputValue("bme-setting-panel-theme", settings.panelTheme || "crimson"); + // 主题调色盘高亮 + _highlightThemeDot(settings.panelTheme || "crimson"); } function _bindConfigControls() { @@ -720,9 +721,15 @@ function _bindConfigControls() { bindText("bme-setting-reflection-prompt", (value) => _updateSettings?.({ reflectionPrompt: value }), ); - bindText("bme-setting-panel-theme", (value) => - _updateSettings?.({ panelTheme: value }), - ); + // 主题调色盘点击 + panelEl.querySelectorAll(".bme-theme-dot").forEach((dot) => { + dot.addEventListener("click", () => { + const theme = dot.dataset.theme; + if (!theme) return; + _updateSettings?.({ panelTheme: theme }); + _highlightThemeDot(theme); + }); + }); document.getElementById("bme-test-llm")?.addEventListener("click", async () => { await _actionHandlers.testMemoryLLM?.(); @@ -768,6 +775,13 @@ function _setText(id, text) { if (el) el.textContent = String(text); } +function _highlightThemeDot(themeName) { + if (!panelEl) return; + panelEl.querySelectorAll(".bme-theme-dot").forEach((dot) => { + dot.classList.toggle("active", dot.dataset.theme === themeName); + }); +} + function _setInputValue(id, value) { const el = document.getElementById(id); if (el && el.value !== String(value ?? "")) { diff --git a/style.css b/style.css index 5985f31..293a377 100644 --- a/style.css +++ b/style.css @@ -187,6 +187,8 @@ font-size: 14px; font-weight: 600; color: var(--bme-primary, #e94560); + flex: 1; + min-width: 0; } .bme-panel-title i { @@ -200,6 +202,35 @@ font-weight: 400; } +.bme-theme-palette { + display: flex; + align-items: center; + gap: 6px; + margin-right: 8px; +} + +.bme-theme-dot { + width: 16px; + height: 16px; + border-radius: 50%; + border: 2px solid transparent; + background: var(--dot-color); + cursor: pointer; + padding: 0; + transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; + box-shadow: 0 0 0 0 transparent; +} + +.bme-theme-dot:hover { + transform: scale(1.2); + box-shadow: 0 0 6px var(--dot-color); +} + +.bme-theme-dot.active { + border-color: var(--bme-on-surface, #e4e1e6); + box-shadow: 0 0 8px var(--dot-color); +} + .bme-panel-close { width: 28px; height: 28px;