feat(routing): add ReleaseRoutes.DetailHref resolver; repoint release click sites and add /tracks/{id} redirect (P11 W2 §2)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using DeepDrftModels.DTOs;
|
||||
using DeepDrftModels.Enums;
|
||||
using DeepDrftPublic.Client.Common;
|
||||
using DeepDrftPublic.Client.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Models.Common;
|
||||
@@ -9,8 +10,8 @@ namespace DeepDrftPublic.Client.Pages;
|
||||
/// <summary>
|
||||
/// Medium-filtered release gallery. Routed at <c>/cuts</c> (Cut releases) and parameterized by
|
||||
/// <see cref="Medium"/> so the same component can back any medium's card grid without a fork.
|
||||
/// Cards open the track gallery filtered to that release's album title, preserving the original
|
||||
/// /albums ergonomics.
|
||||
/// Cards open the release's dedicated detail page via <see cref="ReleaseRoutes.DetailHref(ReleaseDto)"/>
|
||||
/// (a Cut routes to <c>/cuts/{id}</c>), the single source for medium→route resolution (Phase 11 §2).
|
||||
/// </summary>
|
||||
public partial class AlbumsView : ComponentBase, IDisposable
|
||||
{
|
||||
@@ -58,8 +59,8 @@ public partial class AlbumsView : ComponentBase, IDisposable
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void OpenAlbum(string album)
|
||||
=> Navigation.NavigateTo($"/tracks?album={Uri.EscapeDataString(album)}");
|
||||
private void OpenAlbum(ReleaseDto album)
|
||||
=> Navigation.NavigateTo(ReleaseRoutes.DetailHref(album));
|
||||
|
||||
public void Dispose() => _persistingSubscription.Dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user