From 018a6cb84abd2396d3d9df3948996ee0242b33f6 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 19 Aug 2025 10:54:02 +0300 Subject: [PATCH] chore(react/settings): add back some checks for MFA --- .../options/multi_factor_authentication.tsx | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx b/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx index efbc0d972..bebb51eca 100644 --- a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx +++ b/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx @@ -14,15 +14,20 @@ import Button from "../../react/Button" import dialog from "../../../services/dialog" import toast from "../../../services/toast" import RawHtml from "../../react/RawHtml" +import { isElectron } from "../../../services/utils" export default function MultiFactorAuthenticationSettings() { const [ mfaEnabled, setMfaEnabled ] = useTriliumOptionBool("mfaEnabled"); - return ( - <> - - - + return (!isElectron() + ? ( + <> + + { mfaEnabled && } + + ) : ( + {t("multi_factor_authentication.electron_disabled")} + ) ) } @@ -70,14 +75,6 @@ function MultiFactorMethod() { } function TotpSettings() { - return ( -
- -
- ); -} - -function TotpGenerateSecret() { const [ totpStatus, setTotpStatus ] = useState(); const [ recoveryKeys, setRecoveryKeys ] = useState();