design
This commit is contained in:
@@ -176,12 +176,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body scroll-y pt-10 pb-15 px-lg-17">
|
<div class="modal-body scroll-y pt-10 pb-15 px-lg-17">
|
||||||
<div class="text-gray-500 fw-semibold fs-6 mb-10">
|
<div class="text-gray-500 fw-semibold fs-6 mb-10">
|
||||||
To finish activating, enter the current TOTP code <br/>
|
<div class="alert alert-primary d-flex align-items-center p-5 mb-10">
|
||||||
<input type="text" class="form-control form-control-lg form-control-solid" @bind="currentTotp"/>
|
<i class="bx bx-info-circle fs-2hx text-primary me-4">
|
||||||
|
<span class="path1"></span><span class="path2"></span>
|
||||||
|
</i>
|
||||||
|
<div class="d-flex flex-column">
|
||||||
|
<h4 class="mb-1 text-primary">
|
||||||
|
<TL>2fa Code requiered</TL>
|
||||||
|
</h4>
|
||||||
|
<span>In order to finish the activation of 2fa, you need to enter the code your 2fa app shows you.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control form-control-lg form-control-solid" placeholder="@SmartTranslateService.Translate("2fa Code")" @bind="currentTotp"/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<WButton CssClasses="btn btn-primary px-6 align-self-center text-nowrap float end" WorkingText="@SmartTranslateService.Translate("Saving")" Text="@SmartTranslateService.Translate("Save")" OnClick="CheckAndSaveTotp">
|
<WButton CssClasses="btn btn-primary px-6 align-self-center text-nowrap float-end" WorkingText="@SmartTranslateService.Translate("Saving")" Text="@SmartTranslateService.Translate("Finish")" OnClick="CheckAndSaveTotp">
|
||||||
</WButton>
|
</WButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -239,9 +249,10 @@
|
|||||||
if (await TotpService.Verify(TotpSecret, currentTotp))
|
if (await TotpService.Verify(TotpSecret, currentTotp))
|
||||||
{
|
{
|
||||||
await TotpService.EnforceTotpLogin();
|
await TotpService.EnforceTotpLogin();
|
||||||
TotpEnabled = await TotpService.GetEnabled();
|
TotpEnabled = true;
|
||||||
TotpSecret = await TotpService.GetSecret();
|
TotpSecret = await TotpService.GetSecret();
|
||||||
await ToastService.Success("Successfully enabled 2fa!");
|
await ToastService.Success("Successfully enabled 2fa!");
|
||||||
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -426,3 +426,5 @@ anyone write a fancy text here?;anyone write a fancy text here?
|
|||||||
Disable;Disable
|
Disable;Disable
|
||||||
You need to enter a 2fa code;You need to enter a 2fa code
|
You need to enter a 2fa code;You need to enter a 2fa code
|
||||||
2FA code invalid;2FA code invalid
|
2FA code invalid;2FA code invalid
|
||||||
|
2fa Code;2fa Code
|
||||||
|
2fa Code requiered;2fa Code requiered
|
||||||
|
|||||||
Reference in New Issue
Block a user