improvements, fixes...
This commit is contained in:
parent
1d88ab484f
commit
d7acc9fffe
|
|
@ -1,37 +1,37 @@
|
||||||
@using TIAMWebApp.Shared.Application.Models.PageModels;
|
@using TIAMWebApp.Shared.Application.Models.PageModels;
|
||||||
<EditForm Model="@loginModel" OnValidSubmit="GoToNextStep">
|
<EditForm Model="@LoginModel" OnValidSubmit="GoToNextStep">
|
||||||
<DataAnnotationsValidator />
|
@* <DataAnnotationsValidator /> *@
|
||||||
|
|
||||||
|
|
||||||
<div class="form-field d-flex align-items-center">
|
<div class="form-field d-flex align-items-center">
|
||||||
|
|
||||||
|
|
||||||
<DxMaskedInput @bind-Value="@loginModel.Email"
|
|
||||||
Id="Email"
|
<DxMaskedInput @bind-Value="@LoginModel.Email"
|
||||||
CssClass="cw-320"
|
Id="Email"
|
||||||
Mask="@EmailMask"
|
CssClass="cw-320"
|
||||||
MaskMode="MaskMode.RegEx">
|
Mask="@EmailMask"
|
||||||
<DxRegExMaskProperties MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)"
|
MaskMode="MaskMode.RegEx">
|
||||||
Placeholder="Placeholder"
|
<DxRegExMaskProperties MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)"
|
||||||
PlaceholdersVisible="PlaceholderVisible" />
|
Placeholder="Placeholder"
|
||||||
</DxMaskedInput>
|
PlaceholdersVisible="PlaceholderVisible" />
|
||||||
|
</DxMaskedInput>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<ValidationMessage For="@(() => loginModel.Email)" />
|
<ValidationMessage For="@(() => LoginModel.Email)" />
|
||||||
|
|
||||||
<button class="btn btn-primary mt-3" type="submit">
|
<button class="btn btn-primary mt-3" type="submit">
|
||||||
<span class="@spinnerClass"></span>
|
<span class="@spinnerClass"></span>
|
||||||
Next
|
Next
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</EditForm>
|
</EditForm>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public LoginModel loginModel { get; set; }
|
public LoginModel LoginModel { get; set; }
|
||||||
|
|
||||||
//[Parameter]
|
//[Parameter]
|
||||||
//public string Email { get; set; }
|
//public string Email { get; set; }
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
spinnerClass = "spinner-border spinner-border-sm";
|
spinnerClass = "spinner-border spinner-border-sm";
|
||||||
await Task.Delay(500);
|
await Task.Delay(500);
|
||||||
spinnerClass = "";
|
spinnerClass = "";
|
||||||
await LoginModelChanged.InvokeAsync(loginModel);
|
await LoginModelChanged.InvokeAsync(LoginModel);
|
||||||
await onLoginNext.InvokeAsync();
|
await onLoginNext.InvokeAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,64 +9,63 @@
|
||||||
<div class="text-center m-5">
|
<div class="text-center m-5">
|
||||||
<h1>Login</h1>
|
<h1>Login</h1>
|
||||||
<h2 style="font-size:small">Good to see you again!</h2>
|
<h2 style="font-size:small">Good to see you again!</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="container mt-3">
|
<div class="container mt-3">
|
||||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||||
<div class="col-12 col-sm-6 px-5">
|
<div class="col-12 col-sm-6 px-5">
|
||||||
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||||
<div class="card glass inputwizardwrapper my-5">
|
<div class="card glass inputwizardwrapper my-5">
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="my-logo">
|
<div class="my-logo">
|
||||||
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
|
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
|
||||||
</div>
|
|
||||||
<div class="text-center mt-4 name">
|
|
||||||
@localizer["LoginTitleText"]
|
|
||||||
</div>
|
|
||||||
<form class="p-3 mt-3">
|
|
||||||
<div>
|
|
||||||
@switch (currentStep)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
<LoginStep1 @bind-LoginModel="_loginModel" onLoginNext="GoToNextStep" />
|
|
||||||
;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
<LoginStep3 @bind-LoginModel="_loginModel" onSubmit="SubmitLogin" onPrev="GoToPreviousStep" />
|
|
||||||
;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-center mt-4 name">
|
||||||
|
@localizer["LoginTitleText"]
|
||||||
</form>
|
</div>
|
||||||
<p>@currentStep</p>
|
<form class="p-3 mt-3">
|
||||||
@{
|
|
||||||
if (!loggedIn)
|
|
||||||
{
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@switch (_currentStep)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
<LoginStep1 @bind-LoginModel="_loginModel" onLoginNext="GoToNextStep" />
|
||||||
|
;
|
||||||
|
break;
|
||||||
|
|
||||||
<p>@localizer["LoginEmail"]: @_loginModel.Email</p>
|
case 2:
|
||||||
|
<LoginStep3 @bind-LoginModel="_loginModel" onSubmit="SubmitLogin" onPrev="GoToPreviousStep" />
|
||||||
<p>@_loginModel.Password</p>
|
;
|
||||||
|
break;
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<p>@_currentStep</p>
|
||||||
|
@{
|
||||||
|
if (!_loggedIn)
|
||||||
|
{
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p>@localizer["LoginEmail"]: @_loginModel.Email</p>
|
||||||
|
|
||||||
|
<p>@_loginModel.Password</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
<div class="text-center fs-6">
|
||||||
<div class="text-center fs-6">
|
No account yet? <a href="register">Sign up here!</a>
|
||||||
No account yet? <a href="register">Sign up here!</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</Animation>
|
</Animation>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 px-5">
|
<div class="col-12 col-sm-6 px-5">
|
||||||
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
Welcome back to Budapest Airport Transfer Services! We're delighted to have you return to our platform. Please sign in to access your account and manage your bookings effortlessly. If you're new here, feel free to create an account to unlock exclusive benefits and enjoy a seamless booking experience.
|
Welcome back to Budapest Airport Transfer Services! We're delighted to have you return to our platform. Please sign in to access your account and manage your bookings effortlessly. If you're new here, feel free to create an account to unlock exclusive benefits and enjoy a seamless booking experience.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -76,7 +75,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
LoginModel _loginModel = new LoginModel("test@tiam.hu", "test1234");
|
//LoginModel _loginModel = new LoginModel("test@tiam.hu", "test1234");
|
||||||
|
LoginModel _loginModel = new LoginModel("", "");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -43,23 +43,23 @@ namespace TIAMSharedUI.Pages
|
||||||
|
|
||||||
//[Display(Name = "LoginTitleText", ResourceType = typeof(MyResources))]
|
//[Display(Name = "LoginTitleText", ResourceType = typeof(MyResources))]
|
||||||
public string TitleText { get; set; } = "dda,mnd,amn,a";
|
public string TitleText { get; set; } = "dda,mnd,amn,a";
|
||||||
private int currentStep = 1;
|
private int _currentStep = 1;
|
||||||
bool loggedIn = false;
|
bool _loggedIn = false;
|
||||||
|
|
||||||
|
|
||||||
private void GoToNextStep()
|
private void GoToNextStep()
|
||||||
{
|
{
|
||||||
currentStep++;
|
_currentStep++;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GoToPreviousStep()
|
private void GoToPreviousStep()
|
||||||
{
|
{
|
||||||
currentStep--;
|
_currentStep--;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SubmitLogin()
|
private async void SubmitLogin()
|
||||||
{
|
{
|
||||||
currentStep = 1;
|
_currentStep = 1;
|
||||||
BrowserConsoleLogWriter.Info("Login started: " + "Email: " + _loginModel.Email + ", Password: " + _loginModel.Password);
|
BrowserConsoleLogWriter.Info("Login started: " + "Email: " + _loginModel.Email + ", Password: " + _loginModel.Password);
|
||||||
var response = await userDataService.AuthenticateUser(_loginModel);
|
var response = await userDataService.AuthenticateUser(_loginModel);
|
||||||
//var response = await UserDataservice.TestUserApi(30);
|
//var response = await UserDataservice.TestUserApi(30);
|
||||||
|
|
|
||||||
|
|
@ -66,11 +66,11 @@
|
||||||
|
|
||||||
|
|
||||||
private MessageGrid _messageGrid = null!;
|
private MessageGrid _messageGrid = null!;
|
||||||
private LoggerClient<MessageGridComponent> _logger = null!;
|
private LoggerClient<MessageDetailGridComponent> _logger = null!;
|
||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
_logger = new LoggerClient<MessageGridComponent>(LogWriters.ToArray());
|
_logger = new LoggerClient<MessageDetailGridComponent>(LogWriters.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CustomizeElement(GridCustomizeElementEventArgs e)
|
private void CustomizeElement(GridCustomizeElementEventArgs e)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue