Merge pull request #174 from Moonlight-Panel/SomeHotfixes
Fixed cleanup, error handling missing and missing gif
This commit is contained in:
@@ -46,13 +46,11 @@ public class CleanupService
|
|||||||
|
|
||||||
var config = ConfigService.GetSection("Moonlight").GetSection("Cleanup");
|
var config = ConfigService.GetSection("Moonlight").GetSection("Cleanup");
|
||||||
|
|
||||||
/*
|
if (!config.GetValue<bool>("Enable") || ConfigService.DebugMode)
|
||||||
* if (!config.GetValue<bool>("Enable") || ConfigService.DebugMode)
|
|
||||||
{
|
{
|
||||||
Logger.Info("Disabling cleanup service");
|
Logger.Info("Disabling cleanup service");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
Timer = new(TimeSpan.FromMinutes(config.GetValue<int>("Wait")));
|
Timer = new(TimeSpan.FromMinutes(config.GetValue<int>("Wait")));
|
||||||
|
|
||||||
|
|||||||
@@ -40,116 +40,120 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<CascadingValue Value="User">
|
<GlobalErrorBoundary>
|
||||||
<PageTitle>@(string.IsNullOrEmpty(title) ? "Dashboard - " : title)Moonlight</PageTitle>
|
<CascadingValue Value="User">
|
||||||
|
<PageTitle>@(string.IsNullOrEmpty(title) ? "Dashboard - " : title)Moonlight</PageTitle>
|
||||||
|
|
||||||
<div class="d-flex flex-column flex-root app-root" id="kt_app_root">
|
<div class="d-flex flex-column flex-root app-root" id="kt_app_root">
|
||||||
<div class="app-page flex-column flex-column-fluid" id="kt_app_page">
|
<div class="app-page flex-column flex-column-fluid" id="kt_app_page">
|
||||||
<canvas id="snow" class="snow-canvas"></canvas>
|
<canvas id="snow" class="snow-canvas"></canvas>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
//TODO: Add a way to disable the snow
|
//TODO: Add a way to disable the snow
|
||||||
}
|
}
|
||||||
|
|
||||||
<PageHeader></PageHeader>
|
<PageHeader></PageHeader>
|
||||||
<div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
|
<div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
|
||||||
<Sidebar></Sidebar>
|
<Sidebar></Sidebar>
|
||||||
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
|
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
|
||||||
<div class="d-flex flex-column flex-column-fluid">
|
<div class="d-flex flex-column flex-column-fluid">
|
||||||
<div id="kt_app_content" class="app-content flex-column-fluid" style="background-position: center; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-image: url('@(DynamicBackgroundService.BackgroundImageUrl)')">
|
<div id="kt_app_content" class="app-content flex-column-fluid" style="background-position: center; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-image: url('@(DynamicBackgroundService.BackgroundImageUrl)')">
|
||||||
<div id="kt_app_content_container" class="app-container container-fluid">
|
<div id="kt_app_content_container" class="app-container container-fluid">
|
||||||
<div class="mt-10">
|
<div class="mt-10">
|
||||||
@if (!IsIpBanned)
|
<SoftErrorBoundary>
|
||||||
{
|
@if (!IsIpBanned)
|
||||||
if (UserProcessed)
|
|
||||||
{
|
|
||||||
if (uri.LocalPath != "/login" &&
|
|
||||||
uri.LocalPath != "/passwordreset" &&
|
|
||||||
uri.LocalPath != "/register")
|
|
||||||
{
|
{
|
||||||
if (User == null)
|
if (UserProcessed)
|
||||||
{
|
{
|
||||||
<Login></Login>
|
if (uri.LocalPath != "/login" &&
|
||||||
}
|
uri.LocalPath != "/passwordreset" &&
|
||||||
else
|
uri.LocalPath != "/register")
|
||||||
{
|
|
||||||
if (User.Status == UserStatus.Banned)
|
|
||||||
{
|
{
|
||||||
<BannedAlert></BannedAlert>
|
if (User == null)
|
||||||
}
|
{
|
||||||
else if (User.Status == UserStatus.Disabled)
|
<Login></Login>
|
||||||
{
|
}
|
||||||
<DisabledAlert></DisabledAlert>
|
else
|
||||||
}
|
{
|
||||||
else if (User.Status == UserStatus.PasswordPending)
|
if (User.Status == UserStatus.Banned)
|
||||||
{
|
{
|
||||||
<PasswordChangeView></PasswordChangeView>
|
<BannedAlert></BannedAlert>
|
||||||
}
|
}
|
||||||
else if (User.Status == UserStatus.DataPending)
|
else if (User.Status == UserStatus.Disabled)
|
||||||
{
|
{
|
||||||
<UserDataSetView></UserDataSetView>
|
<DisabledAlert></DisabledAlert>
|
||||||
|
}
|
||||||
|
else if (User.Status == UserStatus.PasswordPending)
|
||||||
|
{
|
||||||
|
<PasswordChangeView></PasswordChangeView>
|
||||||
|
}
|
||||||
|
else if (User.Status == UserStatus.DataPending)
|
||||||
|
{
|
||||||
|
<UserDataSetView></UserDataSetView>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@Body
|
||||||
|
|
||||||
|
<RatingPopup/>
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@Body
|
if (uri.LocalPath == "/login")
|
||||||
|
{
|
||||||
<RatingPopup/>
|
<Login></Login>
|
||||||
|
}
|
||||||
|
else if (uri.LocalPath == "/register")
|
||||||
|
{
|
||||||
|
<Register></Register>
|
||||||
|
}
|
||||||
|
else if (uri.LocalPath == "/passwordreset")
|
||||||
|
{
|
||||||
|
<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>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (uri.LocalPath == "/login")
|
<div class="modal d-block">
|
||||||
{
|
<div class="modal-dialog modal-dialog-centered mw-900px">
|
||||||
<Login></Login>
|
<div class="modal-content">
|
||||||
}
|
<div class="pt-2 modal-body py-lg-10 px-lg-10">
|
||||||
else if (uri.LocalPath == "/register")
|
<h2>@(SmartTranslateService.Translate("Your ip has been banned"))</h2>
|
||||||
{
|
<p class="mt-3 fw-normal fs-6">@(SmartTranslateService.Translate("Your ip address has been banned by an admin"))</p>
|
||||||
<Register></Register>
|
</div>
|
||||||
}
|
|
||||||
else if (uri.LocalPath == "/passwordreset")
|
|
||||||
{
|
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
}
|
||||||
}
|
</SoftErrorBoundary>
|
||||||
}
|
</div>
|
||||||
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("Your ip has been banned"))</h2>
|
|
||||||
<p class="mt-3 fw-normal fs-6">@(SmartTranslateService.Translate("Your ip address has been banned by an admin"))</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Footer></Footer>
|
||||||
</div>
|
</div>
|
||||||
<Footer></Footer>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</CascadingValue>
|
||||||
</CascadingValue>
|
</GlobalErrorBoundary>
|
||||||
|
|
||||||
@code
|
@code
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
Moonlight/wwwroot/assets/media/gif/loading.gif
Normal file
BIN
Moonlight/wwwroot/assets/media/gif/loading.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user