From 08caf53ba6b78536ddc8fcbebb653c5a97a2f894 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 25 May 2026 13:42:09 +0200 Subject: [PATCH] refactor(xray): drop stale --ant-primary-color fallbacks and hex literals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - RoutingTab .drop-before/.drop-after box-shadow: #1677ff → var(--ant-color-primary) - OutboundFormModal .random-icon: drop the --ant-primary-color/#1890ff pair (the old AntD v4 token name with stale fallback) for the v6 --ant-color-primary; .danger-icon hex #ff4d4f → var(--ant-color-error). - XrayPage .restart-icon: same drop of the --ant-primary-color fallback. These were all leftovers from the AntD v4 → v6 rename — the v6 --ant-color-primary is already populated by ConfigProvider, so the fallback hex was dead code that would only trigger if AntD wasn't mounted. --- frontend/src/pages/xray/OutboundFormModal.css | 4 ++-- frontend/src/pages/xray/RoutingTab.css | 4 ++-- frontend/src/pages/xray/XrayPage.css | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/xray/OutboundFormModal.css b/frontend/src/pages/xray/OutboundFormModal.css index 3217ac0e..b2150758 100644 --- a/frontend/src/pages/xray/OutboundFormModal.css +++ b/frontend/src/pages/xray/OutboundFormModal.css @@ -1,12 +1,12 @@ .random-icon { cursor: pointer; - color: var(--ant-primary-color, #1890ff); + color: var(--ant-color-primary); margin-left: 4px; } .danger-icon { cursor: pointer; - color: #ff4d4f; + color: var(--ant-color-error); margin-left: 8px; } diff --git a/frontend/src/pages/xray/RoutingTab.css b/frontend/src/pages/xray/RoutingTab.css index 8ef6ad85..6ad04cec 100644 --- a/frontend/src/pages/xray/RoutingTab.css +++ b/frontend/src/pages/xray/RoutingTab.css @@ -27,11 +27,11 @@ } .drop-before > td { - box-shadow: inset 0 2px 0 0 #1677ff; + box-shadow: inset 0 2px 0 0 var(--ant-color-primary); } .drop-after > td { - box-shadow: inset 0 -2px 0 0 #1677ff; + box-shadow: inset 0 -2px 0 0 var(--ant-color-primary); } .row-index { diff --git a/frontend/src/pages/xray/XrayPage.css b/frontend/src/pages/xray/XrayPage.css index 166ebe80..7ffd701a 100644 --- a/frontend/src/pages/xray/XrayPage.css +++ b/frontend/src/pages/xray/XrayPage.css @@ -51,7 +51,7 @@ .xray-page .restart-icon { font-size: 16px; cursor: pointer; - color: var(--ant-primary-color, #1890ff); + color: var(--ant-color-primary); } .xray-page .restart-result {