Manager Cleanup
This commit is contained in:
@@ -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
|
|
||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
@page "/cms"
|
@page "/"
|
||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
|
@layout Layout.CmsLayout
|
||||||
|
|
||||||
|
|
||||||
<PageTitle>DeepDrft CMS</PageTitle>
|
<PageTitle>DeepDrft CMS</PageTitle>
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
@page "/cms/tracks/{Id:long}"
|
@page "/tracks/{Id:long}"
|
||||||
@using DeepDrftManager.Services
|
@using DeepDrftManager.Services
|
||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
@inject ICmsTrackService CmsTrackService
|
@inject ICmsTrackService CmsTrackService
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<MudContainer MaxWidth="MaxWidth.Medium" Class="mt-8">
|
<MudContainer MaxWidth="MaxWidth.Medium" Class="mt-8">
|
||||||
<MudButton Variant="Variant.Text"
|
<MudButton Variant="Variant.Text"
|
||||||
StartIcon="@Icons.Material.Filled.ArrowBack"
|
StartIcon="@Icons.Material.Filled.ArrowBack"
|
||||||
Href="/cms/tracks"
|
Href="/tracks"
|
||||||
Class="mb-4">
|
Class="mb-4">
|
||||||
Back to tracks
|
Back to tracks
|
||||||
</MudButton>
|
</MudButton>
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
if (result.Success)
|
if (result.Success)
|
||||||
{
|
{
|
||||||
Snackbar.Add("Track deleted.", Severity.Success);
|
Snackbar.Add("Track deleted.", Severity.Success);
|
||||||
Nav.NavigateTo("/cms/tracks");
|
Nav.NavigateTo("/tracks");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@page "/cms/tracks"
|
@page "/tracks"
|
||||||
@using System.Net
|
@using System.Net
|
||||||
@using DeepDrftManager.Services
|
@using DeepDrftManager.Services
|
||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<MudButton Variant="Variant.Filled"
|
<MudButton Variant="Variant.Filled"
|
||||||
Color="Color.Primary"
|
Color="Color.Primary"
|
||||||
StartIcon="@Icons.Material.Filled.Add"
|
StartIcon="@Icons.Material.Filled.Add"
|
||||||
Href="/cms/tracks/new">
|
Href="/tracks/new">
|
||||||
Add Track
|
Add Track
|
||||||
</MudButton>
|
</MudButton>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<MudIconButton Icon="@Icons.Material.Filled.Edit"
|
<MudIconButton Icon="@Icons.Material.Filled.Edit"
|
||||||
Size="Size.Small"
|
Size="Size.Small"
|
||||||
Color="Color.Primary"
|
Color="Color.Primary"
|
||||||
Href="@($"/cms/tracks/{context.Id}")" />
|
Href="@($"/tracks/{context.Id}")" />
|
||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
<MudTooltip Text="Delete">
|
<MudTooltip Text="Delete">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
<MudIconButton Icon="@Icons.Material.Filled.Delete"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@page "/cms/tracks/new"
|
@page "/tracks/new"
|
||||||
@using System.Security.Claims
|
@using System.Security.Claims
|
||||||
@using DeepDrftManager.Services
|
@using DeepDrftManager.Services
|
||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
if (result.Success)
|
if (result.Success)
|
||||||
{
|
{
|
||||||
Snackbar.Add($"Uploaded '{_trackName}'.", Severity.Success);
|
Snackbar.Add($"Uploaded '{_trackName}'.", Severity.Success);
|
||||||
Navigation.NavigateTo("/cms/tracks");
|
Navigation.NavigateTo("/tracks");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
|
|
||||||
private void Cancel()
|
private void Cancel()
|
||||||
{
|
{
|
||||||
Navigation.NavigateTo("/cms/tracks");
|
Navigation.NavigateTo("/tracks");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string FormatBytes(long bytes)
|
private static string FormatBytes(long bytes)
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
@layout DeepDrftManager.Components.Layout.CmsLayout
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
<Router AppAssembly="typeof(App).Assembly"
|
<Router AppAssembly="typeof(App).Assembly"
|
||||||
AdditionalAssemblies="new[] { typeof(AuthBlocksWeb._Imports).Assembly }">
|
AdditionalAssemblies="new[] { typeof(AuthBlocksWeb._Imports).Assembly }"
|
||||||
|
NotFoundPage="typeof(NotFound)">
|
||||||
<Found Context="routeData">
|
<Found Context="routeData">
|
||||||
<AuthorizeRouteView RouteData="routeData">
|
<AuthorizeRouteView RouteData="routeData"
|
||||||
|
DefaultLayout="typeof(Layout.CmsLayout)">
|
||||||
<NotAuthorized Context="authState">
|
<NotAuthorized Context="authState">
|
||||||
@if (authState.User.Identity?.IsAuthenticated == true)
|
@if (authState.User.Identity?.IsAuthenticated == true)
|
||||||
{
|
{
|
||||||
@@ -15,8 +17,4 @@
|
|||||||
</AuthorizeRouteView>
|
</AuthorizeRouteView>
|
||||||
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
||||||
</Found>
|
</Found>
|
||||||
<NotFound>
|
|
||||||
<PageTitle>Not found</PageTitle>
|
|
||||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
|
||||||
</NotFound>
|
|
||||||
</Router>
|
</Router>
|
||||||
|
|||||||
Reference in New Issue
Block a user