From 8112b0b89c217ea4c2e0041e360a43862fd325b6 Mon Sep 17 00:00:00 2001 From: cc-dan Date: Sat, 14 Mar 2026 08:01:36 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=9A=E7=9F=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=BB=E8=8F=9C=E5=8D=95=E5=AE=9E=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=8A=B6=E6=80=81=20+=20=E7=A7=BB=E9=99=A4=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=A4=9A=E4=BD=99=E5=85=B3=E9=97=AD=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/app.js | 64 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 4 deletions(-) diff --git a/public/app.js b/public/app.js index bff08f3..8b3049d 100644 --- a/public/app.js +++ b/public/app.js @@ -255,7 +255,6 @@
Notification

通知设置

-
@@ -346,7 +345,6 @@ }; panel.querySelector('.settings-back').addEventListener('click', closeSubpage); - panel.querySelector('.settings-close').addEventListener('click', closeSubpage); overlay.addEventListener('click', (e) => { if (e.target === overlay) closeSubpage(); }); } @@ -1381,6 +1379,14 @@ case 'notify_config': if (typeof _onNotifyConfig === 'function') _onNotifyConfig(msg.config); + // Update summary in parent settings panel if visible + if (msg.config) { + const provider = msg.config.provider || 'off'; + const providerLabel = PROVIDER_OPTIONS.find(o => o.value === provider)?.label || '关闭'; + const summaryOn = msg.config.summary?.enabled ? '摘要已启用' : '摘要关闭'; + const meta = provider === 'off' ? '未启用' : `${providerLabel} · ${summaryOn}`; + document.querySelectorAll('[data-notify-summary]').forEach(el => { el.textContent = meta; }); + } break; case 'notify_test_result': @@ -1558,8 +1564,56 @@ } else if (currentAgent === 'codex') { avatar.innerHTML = ``; } else { - // Pixel-style crab SVG (Claude mascot), transparent bg, currentColor - avatar.innerHTML = ``; + // Pixel-style Claude crab mascot, transparent bg, fixed colors matching original + avatar.innerHTML = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + `; } const bubble = document.createElement('div'); @@ -3164,6 +3218,7 @@ function showCodexSettingsPanel() { send({ type: 'get_codex_config' }); + send({ type: 'get_notify_config' }); const overlay = document.createElement('div'); overlay.className = 'settings-overlay'; @@ -3449,6 +3504,7 @@ } // Request current configs (notify config is loaded on demand inside subpage) send({ type: 'get_model_config' }); + send({ type: 'get_notify_config' }); const overlay = document.createElement('div'); overlay.className = 'settings-overlay';