feat(routing): add ReleaseRoutes.DetailHref resolver; repoint release click sites and add /tracks/{id} redirect (P11 W2 §2)

This commit is contained in:
daniel-c-harvey
2026-06-16 10:56:28 -04:00
parent 74b9c02722
commit 55515981a9
8 changed files with 128 additions and 18 deletions
@@ -115,16 +115,6 @@ public partial class ArchiveView : ComponentBase, IDisposable
await LoadReleases();
}
// Per-medium detail target. Session/Mix open their own detail page; a Cut has no single-release
// detail page, so it opens the track gallery filtered to its release title — the same destination
// AlbumsView's Cut cards use, preserving the established navigation.
private static string DetailHref(ReleaseDto release) => release.Medium switch
{
ReleaseMedium.Session => $"/sessions/{release.Id}",
ReleaseMedium.Mix => $"/mixes/{release.Id}",
_ => $"/tracks?album={Uri.EscapeDataString(release.Title)}",
};
// Display label for a medium filter chip. Centralised so a new medium's label is one entry, not a
// markup change. "DJ Mix" matches the CMS Type-chip wording (§8.D).
private static string MediumLabel(ReleaseMedium medium) => medium switch