Merge pull request #93 from Moonlight-Panel/NewLoginSequenceAnimation
Add checking user status to login sequence where login form is currently
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
@using Moonlight.Shared.Components.ErrorBoundaries
|
||||
@using Moonlight.Shared.Components.Partials
|
||||
@using Moonlight.Shared.Components.Alerts
|
||||
@using Moonlight.Shared.Components.Auth
|
||||
@using Moonlight.App.Database.Entities
|
||||
@using Moonlight.App.Extensions
|
||||
@@ -8,7 +6,6 @@
|
||||
@using Moonlight.App.Services
|
||||
@using Moonlight.App.Services.Interop
|
||||
@using Moonlight.App.Services.Sessions
|
||||
@using Logging.Net
|
||||
@using Moonlight.App.Events
|
||||
|
||||
@layout ThemeInit
|
||||
@@ -21,6 +18,7 @@
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject EventSystem Event
|
||||
@inject ToastService ToastService
|
||||
@inject SmartTranslateService SmartTranslateService
|
||||
|
||||
<GlobalErrorBoundary>
|
||||
@{
|
||||
@@ -61,6 +59,8 @@
|
||||
<div id="kt_app_content_container" class="app-container container-fluid">
|
||||
<div class="mt-10">
|
||||
<SoftErrorBoundary>
|
||||
@if (UserProcessed)
|
||||
{
|
||||
@if (uri.LocalPath != "/login" &&
|
||||
uri.LocalPath != "/passwordreset" &&
|
||||
uri.LocalPath != "/register")
|
||||
@@ -108,6 +108,21 @@
|
||||
<PasswordReset></PasswordReset>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="modal d-block">
|
||||
<div class="modal-dialog modal-dialog-centered mw-900px">
|
||||
<div class="modal-content">
|
||||
<div class="pt-2 modal-body py-lg-10 px-lg-10">
|
||||
|
||||
<h2>@(SmartTranslateService.Translate("Authenticating"))...</h2>
|
||||
<p class="mt-3 fw-normal fs-6">@(SmartTranslateService.Translate("Verifying token, loading user data"))</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</SoftErrorBoundary>
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,6 +139,7 @@
|
||||
@code
|
||||
{
|
||||
private User? User;
|
||||
private bool UserProcessed = false;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
@@ -154,6 +170,7 @@
|
||||
try
|
||||
{
|
||||
User = await IdentityService.Get();
|
||||
UserProcessed = true;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
|
||||
await JsRuntime.InvokeVoidAsync("document.body.removeAttribute", "data-kt-app-reset-transition");
|
||||
|
||||
Reference in New Issue
Block a user