From ba2518cdd20d05d696131d71149a188f9e7278a0 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Wed, 11 Dec 2024 18:06:36 +0100 Subject: [PATCH] =?UTF-8?q?refactor(EnvelopeLocked):=20QRCodeExpiration=20?= =?UTF-8?q?hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EnvelopeGenerator.Web/Controllers/HomeController.cs | 2 +- EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/EnvelopeGenerator.Web/Controllers/HomeController.cs b/EnvelopeGenerator.Web/Controllers/HomeController.cs index 18b7de70..4795c7eb 100644 --- a/EnvelopeGenerator.Web/Controllers/HomeController.cs +++ b/EnvelopeGenerator.Web/Controllers/HomeController.cs @@ -205,7 +205,7 @@ namespace EnvelopeGenerator.Web.Controllers } else { - return View("EnvelopeLocked").WithData("CodeType", "authenticatorCode"); + return View("EnvelopeLocked").WithData("CodeType", "authenticatorCode").WithData("QRCodeExpiration", er_secret.Receiver?.TotpExpiration); } } diff --git a/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml b/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml index b4ee9905..419e9c70 100644 --- a/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml +++ b/EnvelopeGenerator.Web/Views/Home/EnvelopeLocked.cshtml @@ -13,6 +13,7 @@ bool viaAuthenticator = codeType == "authenticatorCode"; bool viaTFA = viaSms || viaAuthenticator; DateTime? smsExpiration = ViewData["SmsExpiration"] is DateTime _smsExpiration ? _smsExpiration : null; + DateTime? qrCodeExpiration = ViewData["QRCodeExpiration"] is DateTime _qrCodeExpiration ? _qrCodeExpiration : null; bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled; bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber; } @@ -31,7 +32,7 @@

@_localizer[WebKey.Formats.LockedTitle.Format(codeKeyName)]

-

@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value.Format("")

+

@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value.Format(qrCodeExpiration.ToString())