feat(EnvelopeLocked): Kontrollkästchen hinzugefügt, um TFA per SMS auswählen zu können oder nicht, wenn tfa aktiviert ist.
- Das Kontrollkästchen ist standardmäßig nicht aktiviert. - Das Kontrollkästchen ist deaktiviert, wenn der Benutzer keine Telefonnummer hat.
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
bool viaSms = ViewData["ViaSms"] is bool _viaSms && _viaSms;
|
||||
var accessCodeName = viaSms ? "smsCode" : "accessCode";
|
||||
DateTime? expiration = ViewData["Expiration"] is DateTime _expiration ? _expiration : null;
|
||||
bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled;
|
||||
bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber;
|
||||
}
|
||||
<div class="page container py-4 px-4">
|
||||
<header class="text-center">
|
||||
@@ -37,6 +39,13 @@
|
||||
login
|
||||
</span>
|
||||
</button>
|
||||
@if (tfaEnabled)
|
||||
{
|
||||
<div class="form-check form-switch tfa-sms">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckChecked" @(hasPhoneNumber ? string.Empty : "disabled")>
|
||||
<label class="form-check-label" for="flexSwitchCheckChecked">2FA per SMS</label>
|
||||
</div>
|
||||
}
|
||||
@if (expiration is not null)
|
||||
{
|
||||
<div id="sms-timer" class="alert alert-primary" role="alert">00:00</div>
|
||||
|
||||
Reference in New Issue
Block a user