PlotDirector/PlotLine/Views/ManageAccount/EnableTwoFactor.cshtml
Nick Beckley e48889ac05 Complete desktop workspaces, context menus and plot health
Commit the pending application, help and browser regression work. Pin the patched PKCS dependency for the production release.
2026-10-31 09:27:04 +00:00

50 lines
1.8 KiB
Plaintext

@model EnableTwoFactorViewModel
@{
ViewData["DesktopLayout"] = "compact";
ViewData["Title"] = "Enable Two Factor";
}
<div class="page-heading compact">
<div>
<p class="eyebrow">Account</p>
<h1>Enable Two Factor Authentication</h1>
<p class="lead-text">Scan the QR code with Microsoft Authenticator, Google Authenticator, Authy or another compatible app.</p>
</div>
</div>
<section class="edit-panel">
@if (!string.IsNullOrWhiteSpace(Model.QrCodeImageDataUri))
{
<img src="@Model.QrCodeImageDataUri" alt="Two-factor QR code" class="img-fluid mb-3" style="max-width:220px;" />
}
else
{
<div class="alert alert-warning">QR code generation was not available. Enter the manual secret below in your authenticator app.</div>
}
<p><strong>Manual secret:</strong> <code>@Model.SecretKey</code></p>
<form asp-action="EnableTwoFactor" method="post" class="asset-create-form">
<input asp-for="SecretKey" type="hidden" />
<input asp-for="QrCodeUri" type="hidden" />
<div asp-validation-summary="ModelOnly" class="alert alert-warning"></div>
<div class="row g-3">
<div class="col-md-6">
<label class="form-label" asp-for="Code">Verification code</label>
<input class="form-control" asp-for="Code" autocomplete="one-time-code" />
<span class="text-danger" asp-validation-for="Code"></span>
</div>
</div>
<div class="button-row mt-3">
<button class="btn btn-primary" type="submit">Enable Two Factor</button>
<a class="btn btn-outline-secondary" asp-action="Index">Cancel</a>
</div>
</form>
</section>
@section Scripts {
<partial name="_ValidationScriptsPartial" />
}