From c38e70e2444bf1e553c923be78da078a29544f7f Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 31 Mar 2026 22:49:31 +0200 Subject: [PATCH] fix: toggle switches not reflecting state in admin settings --- client/src/components/Admin/BackupPanel.tsx | 6 ++- client/src/pages/AdminPage.tsx | 42 ++++++++++----------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/client/src/components/Admin/BackupPanel.tsx b/client/src/components/Admin/BackupPanel.tsx index c1fd048..44acdf5 100644 --- a/client/src/components/Admin/BackupPanel.tsx +++ b/client/src/components/Admin/BackupPanel.tsx @@ -324,9 +324,11 @@ export default function BackupPanel() { diff --git a/client/src/pages/AdminPage.tsx b/client/src/pages/AdminPage.tsx index 7489723..37d4e36 100644 --- a/client/src/pages/AdminPage.tsx +++ b/client/src/pages/AdminPage.tsx @@ -708,14 +708,12 @@ export default function AdminPage(): React.ReactElement { @@ -736,14 +734,12 @@ export default function AdminPage(): React.ReactElement { @@ -940,14 +936,12 @@ export default function AdminPage(): React.ReactElement { @@ -1027,9 +1021,11 @@ export default function AdminPage(): React.ReactElement { const newVal = isOn ? 'false' : 'true' setSmtpValues(prev => ({ ...prev, [opt.key]: newVal })) }} - className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${isOn ? 'bg-slate-900' : 'bg-slate-300'}`} + className="relative inline-flex h-6 w-11 items-center rounded-full transition-colors" + style={{ background: isOn ? 'var(--text-primary)' : 'var(--border-primary)' }} > - + ) @@ -1069,8 +1065,10 @@ export default function AdminPage(): React.ReactElement { const newVal = smtpValues.smtp_skip_tls_verify === 'true' ? 'false' : 'true' setSmtpValues(prev => ({ ...prev, smtp_skip_tls_verify: newVal })) }} - className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${smtpValues.smtp_skip_tls_verify === 'true' ? 'bg-slate-900' : 'bg-slate-300'}`}> - + className="relative inline-flex h-6 w-11 items-center rounded-full transition-colors" + style={{ background: smtpValues.smtp_skip_tls_verify === 'true' ? 'var(--text-primary)' : 'var(--border-primary)' }}> +