diff --git a/ProjectLighthouse.Localization/StringLists/TwoFactorStrings.cs b/ProjectLighthouse.Localization/StringLists/TwoFactorStrings.cs index 307ad97d5..799588003 100644 --- a/ProjectLighthouse.Localization/StringLists/TwoFactorStrings.cs +++ b/ProjectLighthouse.Localization/StringLists/TwoFactorStrings.cs @@ -24,6 +24,10 @@ public static class TwoFactorStrings public static readonly TranslatableString QrTitle = create("qr_title"); public static readonly TranslatableString QrDescription = create("qr_description"); + public static readonly TranslatableString QrAlternativeDescription = create("qr_alternative"); + public static readonly TranslatableString QrAlternativeCopy = create("qr_alternative_copy"); + public static readonly TranslatableString QrAlternativeCopySuccess = create("qr_alternative_copy_success"); + public static readonly TranslatableString QrAlternativeCopyFail = create("qr_alternative_copy_success"); private static TranslatableString create(string key) => new(TranslationAreas.TwoFactor, key); } \ No newline at end of file diff --git a/ProjectLighthouse.Localization/TwoFactor.resx b/ProjectLighthouse.Localization/TwoFactor.resx index 21d78ec4e..45845e8f5 100644 --- a/ProjectLighthouse.Localization/TwoFactor.resx +++ b/ProjectLighthouse.Localization/TwoFactor.resx @@ -66,4 +66,16 @@ Invalid Backup Code + + Can't use the QR code? You can use this secret key instead: + + + Copy secret code + + + Copied to clipboard + + + Failed to copy to clipboard + \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/TwoFactor/SetupTwoFactorPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/TwoFactor/SetupTwoFactorPage.cshtml index 736e258e7..6bda7213f 100644 --- a/ProjectLighthouse.Servers.Website/Pages/TwoFactor/SetupTwoFactorPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/TwoFactor/SetupTwoFactorPage.cshtml @@ -18,6 +18,9 @@

@Model.Translate(TwoFactorStrings.QrTitle)

2 Factor QR Code

@Model.Translate(TwoFactorStrings.QrDescription)

+

@Model.Translate(TwoFactorStrings.QrAlternativeDescription)

+ @Model.User?.TwoFactorSecret + @await Html.PartialAsync("Partials/TwoFactorPartial", new ViewDataDictionary(ViewData) { { @@ -31,6 +34,28 @@ }, }) + } else {