Manager Cleanup

This commit is contained in:
Daniel Harvey
2026-05-25 10:17:21 -04:00
parent 2574ed9af8
commit 98b2c8d744
8 changed files with 23 additions and 18 deletions
@@ -0,0 +1,7 @@
@page "/404"
<PageTitle>SkipperHaven - Page Not Found</PageTitle>
<MudText Typo="Typo.h1" Color="Color.Primary">
404 - Resource Not Found
</MudText>
@@ -1 +0,0 @@
@layout DeepDrftManager.Components.Layout.CmsLayout
@@ -1,5 +1,7 @@
@page "/cms"
@page "/"
@attribute [Authorize]
@layout Layout.CmsLayout
<PageTitle>DeepDrft CMS</PageTitle>
@@ -1,4 +1,4 @@
@page "/cms/tracks/{Id:long}"
@page "/tracks/{Id:long}"
@using DeepDrftManager.Services
@attribute [Authorize]
@inject ICmsTrackService CmsTrackService
@@ -12,7 +12,7 @@
<MudContainer MaxWidth="MaxWidth.Medium" Class="mt-8">
<MudButton Variant="Variant.Text"
StartIcon="@Icons.Material.Filled.ArrowBack"
Href="/cms/tracks"
Href="/tracks"
Class="mb-4">
Back to tracks
</MudButton>
@@ -172,7 +172,7 @@
if (result.Success)
{
Snackbar.Add("Track deleted.", Severity.Success);
Nav.NavigateTo("/cms/tracks");
Nav.NavigateTo("/tracks");
}
else
{
@@ -1,4 +1,4 @@
@page "/cms/tracks"
@page "/tracks"
@using System.Net
@using DeepDrftManager.Services
@attribute [Authorize]
@@ -15,7 +15,7 @@
<MudButton Variant="Variant.Filled"
Color="Color.Primary"
StartIcon="@Icons.Material.Filled.Add"
Href="/cms/tracks/new">
Href="/tracks/new">
Add Track
</MudButton>
</MudStack>
@@ -57,7 +57,7 @@
<MudIconButton Icon="@Icons.Material.Filled.Edit"
Size="Size.Small"
Color="Color.Primary"
Href="@($"/cms/tracks/{context.Id}")" />
Href="@($"/tracks/{context.Id}")" />
</MudTooltip>
<MudTooltip Text="Delete">
<MudIconButton Icon="@Icons.Material.Filled.Delete"
@@ -1,4 +1,4 @@
@page "/cms/tracks/new"
@page "/tracks/new"
@using System.Security.Claims
@using DeepDrftManager.Services
@attribute [Authorize]
@@ -149,7 +149,7 @@
if (result.Success)
{
Snackbar.Add($"Uploaded '{_trackName}'.", Severity.Success);
Navigation.NavigateTo("/cms/tracks");
Navigation.NavigateTo("/tracks");
return;
}
@@ -170,7 +170,7 @@
private void Cancel()
{
Navigation.NavigateTo("/cms/tracks");
Navigation.NavigateTo("/tracks");
}
private static string FormatBytes(long bytes)
@@ -1 +0,0 @@
@layout DeepDrftManager.Components.Layout.CmsLayout
+4 -6
View File
@@ -1,7 +1,9 @@
<Router AppAssembly="typeof(App).Assembly"
AdditionalAssemblies="new[] { typeof(AuthBlocksWeb._Imports).Assembly }">
AdditionalAssemblies="new[] { typeof(AuthBlocksWeb._Imports).Assembly }"
NotFoundPage="typeof(NotFound)">
<Found Context="routeData">
<AuthorizeRouteView RouteData="routeData">
<AuthorizeRouteView RouteData="routeData"
DefaultLayout="typeof(Layout.CmsLayout)">
<NotAuthorized Context="authState">
@if (authState.User.Identity?.IsAuthenticated == true)
{
@@ -15,8 +17,4 @@
</AuthorizeRouteView>
<FocusOnNavigate RouteData="routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<p role="alert">Sorry, there's nothing at this address.</p>
</NotFound>
</Router>