Reduced css and js which was not used
This commit is contained in:
@@ -45,144 +45,100 @@
|
||||
<GlobalErrorBoundary>
|
||||
<PageTitle>@(string.IsNullOrEmpty(title) ? "Dashboard - " : title)Moonlight</PageTitle>
|
||||
|
||||
<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">
|
||||
<canvas id="snow" class="snow-canvas"></canvas>
|
||||
<DefaultLayout>
|
||||
<SoftErrorBoundary>
|
||||
@if (!IsIpBanned)
|
||||
{
|
||||
if (UserProcessed)
|
||||
{
|
||||
if (uri.LocalPath != "/login" &&
|
||||
uri.LocalPath != "/passwordreset" &&
|
||||
uri.LocalPath != "/register")
|
||||
{
|
||||
if (IdentityService.User == null)
|
||||
{
|
||||
<Login></Login>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IdentityService.User.Status == UserStatus.Banned)
|
||||
{
|
||||
<BannedAlert></BannedAlert>
|
||||
}
|
||||
else if (IdentityService.User.Status == UserStatus.Disabled)
|
||||
{
|
||||
<DisabledAlert></DisabledAlert>
|
||||
}
|
||||
else if (IdentityService.User.Status == UserStatus.PasswordPending)
|
||||
{
|
||||
<PasswordChangeView></PasswordChangeView>
|
||||
}
|
||||
else if (IdentityService.User.Status == UserStatus.DataPending)
|
||||
{
|
||||
<UserDataSetView></UserDataSetView>
|
||||
}
|
||||
else
|
||||
{
|
||||
<RenderPermissionChecker>
|
||||
@Body
|
||||
</RenderPermissionChecker>
|
||||
|
||||
@{
|
||||
//TODO: Add a way to disable the snow
|
||||
}
|
||||
|
||||
<PageHeader></PageHeader>
|
||||
<div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
|
||||
<Sidebar></Sidebar>
|
||||
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
|
||||
<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: linear-gradient(rgba(0, 0, 0, 0.55),rgba(0, 0, 0, 0.55)) ,url('@(DynamicBackgroundService.BackgroundImageUrl)');">
|
||||
<div id="kt_app_content_container" class="app-container container-fluid">
|
||||
<div class="mt-10">
|
||||
<SoftErrorBoundary>
|
||||
@if (!IsIpBanned)
|
||||
{
|
||||
if (UserProcessed)
|
||||
{
|
||||
if (uri.LocalPath != "/login" &&
|
||||
uri.LocalPath != "/passwordreset" &&
|
||||
uri.LocalPath != "/register")
|
||||
{
|
||||
if (IdentityService.User == null)
|
||||
{
|
||||
<Login></Login>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IdentityService.User.Status == UserStatus.Banned)
|
||||
{
|
||||
<BannedAlert></BannedAlert>
|
||||
}
|
||||
else if (IdentityService.User.Status == UserStatus.Disabled)
|
||||
{
|
||||
<DisabledAlert></DisabledAlert>
|
||||
}
|
||||
else if (IdentityService.User.Status == UserStatus.PasswordPending)
|
||||
{
|
||||
<PasswordChangeView></PasswordChangeView>
|
||||
}
|
||||
else if (IdentityService.User.Status == UserStatus.DataPending)
|
||||
{
|
||||
<UserDataSetView></UserDataSetView>
|
||||
}
|
||||
else
|
||||
{
|
||||
<RenderPermissionChecker>
|
||||
@Body
|
||||
</RenderPermissionChecker>
|
||||
|
||||
<RatingPopup/>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (uri.LocalPath == "/login")
|
||||
{
|
||||
<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
|
||||
{
|
||||
<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>
|
||||
}
|
||||
</SoftErrorBoundary>
|
||||
<RatingPopup/>
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (uri.LocalPath == "/login")
|
||||
{
|
||||
<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>
|
||||
<Footer></Footer>
|
||||
}
|
||||
}
|
||||
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>
|
||||
}
|
||||
</SoftErrorBoundary>
|
||||
</DefaultLayout>
|
||||
</GlobalErrorBoundary>
|
||||
|
||||
@code
|
||||
{
|
||||
private bool UserProcessed = false;
|
||||
|
||||
private bool IsIpBanned = false;
|
||||
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
AddBodyAttribute("data-kt-app-page-loading", "on");
|
||||
|
||||
//Initialize classes and attributes for layout with dark sidebar
|
||||
AddBodyAttribute("data-kt-app-reset-transition", "true");
|
||||
|
||||
AddBodyAttribute("data-kt-app-layout", "dark-sidebar");
|
||||
AddBodyAttribute("data-kt-app-header-fixed", "true");
|
||||
AddBodyAttribute("data-kt-app-sidebar-fixed", "true");
|
||||
AddBodyAttribute("data-kt-app-sidebar-hoverable", "true");
|
||||
AddBodyAttribute("data-kt-app-sidebar-push-header", "true");
|
||||
AddBodyAttribute("data-kt-app-sidebar-push-toolbar", "true");
|
||||
AddBodyAttribute("data-kt-app-sidebar-push-footer", "true");
|
||||
AddBodyAttribute("data-kt-app-toolbar-enabled", "true");
|
||||
|
||||
AddBodyClass("app-default");
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
@@ -249,8 +205,8 @@
|
||||
|
||||
if (ConfigService.Get().Moonlight.EnableLatencyCheck)
|
||||
{
|
||||
await JsRuntime.InvokeVoidAsync("moonlight.loading.checkConnection",
|
||||
ConfigService.Get().Moonlight.AppUrl,
|
||||
await JsRuntime.InvokeVoidAsync("moonlight.loading.checkConnection",
|
||||
ConfigService.Get().Moonlight.AppUrl,
|
||||
ConfigService.Get().Moonlight.LatencyCheckThreshold);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user