From e86b0af2c470e500e96c22ec7e85c16a92db9e1c Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 11 Apr 2025 06:01:25 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=BB=E9=A2=98=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=85=8D=E8=89=B2=E6=96=B9?= =?UTF-8?q?=E6=A1=88=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=85=8D=E8=89=B2=E6=96=B9=E6=A1=88=E7=9A=84=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E6=98=BE=E7=A4=BA=EF=BC=8C=E6=8F=90=E5=8D=87=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BD=93=E9=AA=8C=E5=92=8C=E4=BB=A3=E7=A0=81=E5=8F=AF?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/admin/pages_settings.tsx | 50 ++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/client/admin/pages_settings.tsx b/client/admin/pages_settings.tsx index 1beba6a..8001147 100644 --- a/client/admin/pages_settings.tsx +++ b/client/admin/pages_settings.tsx @@ -484,22 +484,40 @@ export const ThemeSettingsPage = () => { {(() => { const themeMode = (form.getFieldValue('theme_mode') as ThemeMode) || ThemeMode.LIGHT; const schemes = COLOR_SCHEMES[themeMode] || {}; - return Object.entries(schemes).map(([key, scheme]) => ( - - )); + const currentPrimary = form.getFieldValue('primary_color'); + const currentBg = form.getFieldValue('background_color'); + const currentText = form.getFieldValue('text_color'); + + return Object.entries(schemes).map(([key, scheme]) => { + const isActive = + scheme.primary === currentPrimary && + scheme.background === currentBg && + scheme.text === currentText; + + return ( + + ); + }); })()}