refactor(EnvelopeLocked): Umbenennung von Expiration in SmsExpiration.
- HomeController aktualisiert.
This commit is contained in:
parent
e82d7552c2
commit
72a0cb78c7
@ -193,9 +193,9 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
var res = await _msgService.SendSmsCodeAsync(er_secret.PhoneNumber!, envelopeReceiverId: envelopeReceiverId);
|
||||
if (res.Ok)
|
||||
return View("EnvelopeLocked").WithData("CodeType", "smsCode").WithData("Expiration", res.Expiration);
|
||||
return View("EnvelopeLocked").WithData("CodeType", "smsCode").WithData("SmsExpiration", res.Expiration);
|
||||
else if (!res.Allowed)
|
||||
return View("EnvelopeLocked").WithData("CodeType", "smsCode").WithData("Expiration", res.AllowedAt);
|
||||
return View("EnvelopeLocked").WithData("CodeType", "smsCode").WithData("SmsExpiration", res.AllowedAt);
|
||||
else
|
||||
{
|
||||
var res_json = JsonConvert.SerializeObject(res);
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
bool viaSms = codeType == "smsCode";
|
||||
bool viaAuthenticator = codeType == "authenticatorCode";
|
||||
bool viaTFA = viaSms || viaAuthenticator;
|
||||
DateTime? expiration = ViewData["Expiration"] is DateTime _expiration ? _expiration : null;
|
||||
DateTime? smsExpiration = ViewData["SmsExpiration"] is DateTime _smsExpiration ? _smsExpiration : null;
|
||||
bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled;
|
||||
bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber;
|
||||
}
|
||||
@ -58,7 +58,7 @@
|
||||
<label class="form-check-label" for="flexSwitchCheckChecked">2FA per SMS</label>
|
||||
</div>
|
||||
}
|
||||
@if (expiration is not null)
|
||||
@if (smsExpiration is not null)
|
||||
{
|
||||
<div id="sms-timer" class="alert alert-primary" role="alert">00:00</div>
|
||||
}
|
||||
@ -81,7 +81,7 @@
|
||||
</section>
|
||||
</div>
|
||||
<script nonce="@nonce">
|
||||
var expiration = new Date(@Html.Raw(JsonConvert.SerializeObject(expiration)));
|
||||
var expiration = new Date(@Html.Raw(JsonConvert.SerializeObject(smsExpiration)));
|
||||
|
||||
const element = document.getElementById("sms-timer");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user