af724ce570
Replaces flat RELEASES/SESSIONS/MIXES nav with ARCHIVE dropdown (PageRoute.Children,
one-level cap, dual-role node). Adds /archive overview, /cuts (AlbumsView + medium
filter; /albums redirects), /sessions + /sessions/{id} (hero-dominant), /mixes +
/mixes/{id} (MixWaveformVisualizer full-page background). Extracts ReleaseDetailScaffold
from TrackDetail (invariant trio). PersistentComponentState bridge on all new pages.
Click-to-seek seam designed on MixWaveformVisualizer (inert until wired).
42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using MudBlazor;
|
|
|
|
namespace DeepDrftPublic.Client.Layout;
|
|
|
|
public class PageRoute
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Route { get; set; } = string.Empty;
|
|
public string? Icon { get; set; } = null;
|
|
|
|
// Optional one-level fan-out. A node with children is a dual-role node: its own Route is a
|
|
// real destination (desktop click / mobile tap navigate to it), and Children render as a
|
|
// hover dropdown on desktop and an indented sub-list on mobile. Depth is capped at one level
|
|
// by convention — children are not themselves expected to carry children.
|
|
public IReadOnlyList<PageRoute> Children { get; set; } = [];
|
|
|
|
public bool HasChildren => Children.Count > 0;
|
|
}
|
|
|
|
public static class Pages
|
|
{
|
|
public static readonly List<PageRoute> MenuPages =
|
|
[
|
|
new()
|
|
{
|
|
Name = "Archive", Route = "/archive", Icon = Icons.Material.Filled.Inventory2,
|
|
Children =
|
|
[
|
|
new() { Name = "Cuts", Route = "/cuts", Icon = Icons.Material.Filled.Album },
|
|
new() { Name = "Sessions", Route = "/sessions", Icon = Icons.Material.Filled.Piano },
|
|
new() { Name = "Mixes", Route = "/mixes", Icon = Icons.Material.Filled.GraphicEq },
|
|
],
|
|
},
|
|
new() { Name = "Genres", Route = "/genres", Icon = Icons.Material.Filled.Category },
|
|
];
|
|
|
|
public static readonly List<PageRoute> AllPages =
|
|
new List<PageRoute>
|
|
{
|
|
new() { Name = "Home", Route = "/", Icon = Icons.Material.Filled.Home }
|
|
}.Concat(MenuPages).ToList();
|
|
} |