mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
chore(react/settings): add back some checks for MFA
This commit is contained in:
parent
44825af0c0
commit
018a6cb84a
@ -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()
|
||||
? (
|
||||
<>
|
||||
<EnableMultiFactor mfaEnabled={mfaEnabled} setMfaEnabled={setMfaEnabled} />
|
||||
<MultiFactorMethod />
|
||||
{ mfaEnabled && <MultiFactorMethod /> }
|
||||
</>
|
||||
) : (
|
||||
<FormText>{t("multi_factor_authentication.electron_disabled")}</FormText>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@ -70,14 +75,6 @@ function MultiFactorMethod() {
|
||||
}
|
||||
|
||||
function TotpSettings() {
|
||||
return (
|
||||
<div class="totp-options">
|
||||
<TotpGenerateSecret />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function TotpGenerateSecret() {
|
||||
const [ totpStatus, setTotpStatus ] = useState<TOTPStatus>();
|
||||
const [ recoveryKeys, setRecoveryKeys ] = useState<string[]>();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user