diff --git a/Moonlight/App/Models/Misc/LoginDataModel.cs b/Moonlight/App/Models/Misc/LoginDataModel.cs new file mode 100644 index 00000000..d6c00204 --- /dev/null +++ b/Moonlight/App/Models/Misc/LoginDataModel.cs @@ -0,0 +1,14 @@ +using System.ComponentModel.DataAnnotations; + +namespace Moonlight.App.Models.Misc; + +public class LoginDataModel +{ + [Required(ErrorMessage = "You need to enter an email address")] + [EmailAddress(ErrorMessage = "You need to enter a valid email address")] + public string Email { get; set; } + + [Required(ErrorMessage = "You need to enter a password")] + [MinLength(8, ErrorMessage = "You need to enter a password with minimum 8 characters in lenght")] + public string Password { get; set; } +} \ No newline at end of file diff --git a/Moonlight/Shared/Components/Auth/Login.razor b/Moonlight/Shared/Components/Auth/Login.razor index f9b27e7f..28ca0ce0 100644 --- a/Moonlight/Shared/Components/Auth/Login.razor +++ b/Moonlight/Shared/Components/Auth/Login.razor @@ -10,6 +10,7 @@ @using Moonlight.App.Exceptions @using Logging.Net @using Moonlight.App.Database.Entities +@using Moonlight.App.Models.Misc @using Moonlight.App.Services.OAuth2 @using Moonlight.App.Services.Sessions @@ -113,7 +114,7 @@ @code { - private User User = new(); + private LoginDataModel User = new(); private bool TotpRequired = false; private string TotpCode = ""; diff --git a/Moonlight/resources/lang/de_de.lang b/Moonlight/resources/lang/de_de.lang index c520cf72..bc1ff821 100644 --- a/Moonlight/resources/lang/de_de.lang +++ b/Moonlight/resources/lang/de_de.lang @@ -421,3 +421,6 @@ If you have trouble using the QR Code, select manual input in the app and enter Finish activation;Finish activation New password;New password Enable;Enable +Your account is secured with 2fa;Your account is secured with 2fa +anyone write a fancy text here?;anyone write a fancy text here? +Disable;Disable