diff --git a/Wave/Components/Account/Pages/ForgotPassword.razor b/Wave/Components/Account/Pages/ForgotPassword.razor index 87ed0a4..7066ba3 100644 --- a/Wave/Components/Account/Pages/ForgotPassword.razor +++ b/Wave/Components/Account/Pages/ForgotPassword.razor @@ -11,46 +11,42 @@ @inject IEmailSender EmailSender @inject NavigationManager NavigationManager @inject IdentityRedirectManager RedirectManager +@inject IStringLocalizer Localizer -Forgot your password? +@Localizer["Title"] -

Forgot your password?

-

Enter your email.

-
-
-
+ + +

@Localizer["Introduction"]

- -
- - - -
- + + + + +
-
-
+ + @code { [SupplyParameterFromForm] private InputModel Input { get; set; } = new(); - private async Task OnValidSubmitAsync() - { + private async Task OnValidSubmitAsync() { var user = await UserManager.FindByEmailAsync(Input.Email); - if (user is null || !(await UserManager.IsEmailConfirmedAsync(user))) - { + if (user is null || !(await UserManager.IsEmailConfirmedAsync(user))) { // Don't reveal that the user does not exist or is not confirmed RedirectManager.RedirectTo("Account/ForgotPasswordConfirmation"); } // For more information on how to enable account confirmation and password reset please // visit https://go.microsoft.com/fwlink/?LinkID=532713 - var code = await UserManager.GeneratePasswordResetTokenAsync(user); + string code = await UserManager.GeneratePasswordResetTokenAsync(user); code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code)); - var callbackUrl = NavigationManager.GetUriWithQueryParameters( + string callbackUrl = NavigationManager.GetUriWithQueryParameters( NavigationManager.ToAbsoluteUri("Account/ResetPassword").AbsoluteUri, new Dictionary { ["code"] = code }); @@ -59,8 +55,7 @@ RedirectManager.RedirectTo("Account/ForgotPasswordConfirmation"); } - private sealed class InputModel - { + private sealed class InputModel { [Required] [EmailAddress] public string Email { get; set; } = ""; diff --git a/Wave/Components/Account/Pages/ForgotPasswordConfirmation.razor b/Wave/Components/Account/Pages/ForgotPasswordConfirmation.razor index 38de01d..73d8caf 100644 --- a/Wave/Components/Account/Pages/ForgotPasswordConfirmation.razor +++ b/Wave/Components/Account/Pages/ForgotPasswordConfirmation.razor @@ -1,8 +1,11 @@ @page "/Account/ForgotPasswordConfirmation" +@inject IStringLocalizer Localizer -Forgot password confirmation +@Localizer["Title"] -

Forgot password confirmation

-

- Please check your email to reset your password. -

+ + +

@Localizer["Message"]

+ @Localizer["BackToLogin_Label"] +
+
diff --git a/Wave/Resources/Components/Account/Pages/ForgotPassword.de-DE.resx b/Wave/Resources/Components/Account/Pages/ForgotPassword.de-DE.resx new file mode 100644 index 0000000..31fff0d --- /dev/null +++ b/Wave/Resources/Components/Account/Pages/ForgotPassword.de-DE.resx @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + E-Mail + + + Geben Sie ihre Mailadresse ein. + + + Passwort Vergessen? + + + Passwort Zurücksetzen + + \ No newline at end of file diff --git a/Wave/Resources/Components/Account/Pages/ForgotPassword.en-GB.resx b/Wave/Resources/Components/Account/Pages/ForgotPassword.en-GB.resx new file mode 100644 index 0000000..4fdb1b6 --- /dev/null +++ b/Wave/Resources/Components/Account/Pages/ForgotPassword.en-GB.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Wave/Resources/Components/Account/Pages/ForgotPassword.resx b/Wave/Resources/Components/Account/Pages/ForgotPassword.resx new file mode 100644 index 0000000..eba4eed --- /dev/null +++ b/Wave/Resources/Components/Account/Pages/ForgotPassword.resx @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Forgot Your Password? + + + Enter your email. + + + Email + + + name@example.com + + + Reset password + + \ No newline at end of file diff --git a/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.de-DE.resx b/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.de-DE.resx new file mode 100644 index 0000000..5c034f5 --- /dev/null +++ b/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.de-DE.resx @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Passwort Zurücksetzen + + + Bitte überprüfen Sie ihr Mailpostfach um ihr Passwort zurückzusetzen. + + + Zurück zur Anmeldung + + \ No newline at end of file diff --git a/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.en-GB.resx b/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.en-GB.resx new file mode 100644 index 0000000..4fdb1b6 --- /dev/null +++ b/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.en-GB.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.resx b/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.resx new file mode 100644 index 0000000..50adb08 --- /dev/null +++ b/Wave/Resources/Components/Account/Pages/ForgotPasswordConfirmation.resx @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Reset Password + + + Please check your email to reset your password. + + + Back to log in + + \ No newline at end of file