From 3126b103b1c2ba3fd3c610100a747fa80bc3acf6 Mon Sep 17 00:00:00 2001 From: megaproxy Date: Thu, 23 Apr 2026 23:21:21 +0000 Subject: [PATCH] Disable 2FA setup/disable buttons in demo mode Shows the 2FA section as normal but disables both the 'Set up 2FA' and 'Disable 2FA' buttons with opacity and cursor-not-allowed, plus a small amber note explaining why, matching the pattern used for password changes. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/settings/SettingsPage.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/settings/SettingsPage.tsx b/frontend/src/pages/settings/SettingsPage.tsx index c77bb34..44f2393 100644 --- a/frontend/src/pages/settings/SettingsPage.tsx +++ b/frontend/src/pages/settings/SettingsPage.tsx @@ -273,6 +273,7 @@ function PasswordCard() { function TotpCard() { const qc = useQueryClient(); + const isDemo = useDemoMode(); const totpEnabled = useAuthStore(s => s.totpEnabled); const { setToken, token, userId, displayName } = useAuthStore(); @@ -346,10 +347,14 @@ function TotpCard() { {step === "idle" && !totpEnabled && (

Add an extra layer of security with an authenticator app.

+ {isDemo && ( +

2FA setup is disabled in demo mode.

+ )}