From bb69cad361da1326220e992a89b325fc49f49ac9 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 25 May 2026 13:33:37 +0200 Subject: [PATCH] refactor(logs): collapse log-container dark forks to AntD CSS variables LogModal and XrayLogModal each had a body.dark fork that overrode the log container's background, border-color, and text color in addition to the --log-* severity tokens. Background/border/color all map cleanly to var(--ant-color-fill-tertiary) / var(--ant-color-border) / var(--ant-color-text) which already adapt to the theme, so only the severity color tokens remain inside the dark/ultra-dark blocks. --- frontend/src/pages/index/LogModal.css | 7 ++----- frontend/src/pages/index/XrayLogModal.css | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/index/LogModal.css b/frontend/src/pages/index/LogModal.css index dff5fbe6..86858812 100644 --- a/frontend/src/pages/index/LogModal.css +++ b/frontend/src/pages/index/LogModal.css @@ -34,7 +34,8 @@ overflow-y: auto; border: 1px solid var(--ant-color-border); border-radius: 6px; - background: rgba(0, 0, 0, 0.04); + background: var(--ant-color-fill-tertiary); + color: var(--ant-color-text); } .log-stamp { @@ -140,10 +141,6 @@ } body.dark .log-container { - background: rgba(255, 255, 255, 0.03); - border-color: rgba(255, 255, 255, 0.1); - color: rgba(255, 255, 255, 0.88); - --log-stamp: #6aa6ee; --log-debug: #6aa6ee; --log-info: #4ed3a6; diff --git a/frontend/src/pages/index/XrayLogModal.css b/frontend/src/pages/index/XrayLogModal.css index ad80e8cb..5b7aa652 100644 --- a/frontend/src/pages/index/XrayLogModal.css +++ b/frontend/src/pages/index/XrayLogModal.css @@ -25,7 +25,8 @@ overflow: auto; border: 1px solid var(--ant-color-border); border-radius: 6px; - background: rgba(0, 0, 0, 0.04); + background: var(--ant-color-fill-tertiary); + color: var(--ant-color-text); } .log-container-mobile { @@ -110,10 +111,6 @@ } body.dark .log-container { - background: rgba(255, 255, 255, 0.03); - border-color: rgba(255, 255, 255, 0.1); - color: rgba(255, 255, 255, 0.88); - --log-blocked: #ff7575; --log-proxy: #6aa6ee; --log-divider: rgba(255, 255, 255, 0.1);