feat(cms): Release Archive medium tab strip (ALL · CUTS · SESSIONS · MIXES), retire navigate-away cards
Replace the navigate-away ReleaseArchiveBrowser cards and the redundant top-level Releases toggle with an in-page MudTabs strip under the Releases mode: ALL (CmsAllReleasesGrid) plus one enum-driven tab per ReleaseMedium. Sessions/Mixes browsers gain an Embedded flag that suppresses standalone page chrome when hosted as tab content; CmsCutBrowser is the new Cut-filtered grid. /tracks/sessions, /tracks/mixes, /tracks/archive stay reachable by URL.
This commit is contained in:
@@ -6,25 +6,58 @@
|
||||
@attribute [Authorize]
|
||||
@inject ILogger<CmsSessionBrowser> Logger
|
||||
|
||||
<PageTitle>Sessions — DeepDrft CMS</PageTitle>
|
||||
@* Embedded as the SESSIONS tab content of the Release Archive (Phase 9 §8.A), and still routable at
|
||||
/tracks/sessions for direct-URL access. When embedded, the page chrome (title, container, the now-
|
||||
meaningless "Back to Release Archive" button) is suppressed — the host tab strip owns that frame; only
|
||||
the grid renders. The standalone route keeps the full page chrome. The per-row hero affordance (9.5.E)
|
||||
is preserved in both contexts. *@
|
||||
@if (Embedded)
|
||||
{
|
||||
@GridContent
|
||||
}
|
||||
else
|
||||
{
|
||||
<PageTitle>Sessions — DeepDrft CMS</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="mt-8">
|
||||
<MudButton Variant="Variant.Text"
|
||||
StartIcon="@Icons.Material.Filled.ArrowBack"
|
||||
Href="/tracks/archive"
|
||||
Class="mb-4">
|
||||
Back to Release Archive
|
||||
</MudButton>
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="mt-8">
|
||||
<MudButton Variant="Variant.Text"
|
||||
StartIcon="@Icons.Material.Filled.ArrowBack"
|
||||
Href="/tracks/archive"
|
||||
Class="mb-4">
|
||||
Back to Release Archive
|
||||
</MudButton>
|
||||
|
||||
<MudText Typo="Typo.h4" GutterBottom="true">Sessions</MudText>
|
||||
<MudText Typo="Typo.h4" GutterBottom="true">Sessions</MudText>
|
||||
|
||||
<CmsMediumTable TRow="SessionRow"
|
||||
Rows="Rows"
|
||||
Loading="Loading"
|
||||
ReleaseAccessor="@(row => row.Release)"
|
||||
ThumbUrl="@(key => ThumbUrl(key))"
|
||||
TitleHeader="Session"
|
||||
EmptyMessage="No sessions found.">
|
||||
@GridContent
|
||||
</MudContainer>
|
||||
}
|
||||
|
||||
@code {
|
||||
/// <summary>
|
||||
/// True when rendered as tab content inside the Release Archive; suppresses the standalone page
|
||||
/// chrome (title, container, back button). False (default) renders the full routable page.
|
||||
/// </summary>
|
||||
[Parameter] public bool Embedded { get; set; }
|
||||
|
||||
protected override ReleaseMedium Medium => ReleaseMedium.Session;
|
||||
protected override string MediumNoun => "sessions";
|
||||
|
||||
protected override SessionRow ToRow(ReleaseDto release) => new()
|
||||
{
|
||||
Release = release,
|
||||
HeroImageEntryKey = release.SessionMetadata?.HeroImageEntryKey
|
||||
};
|
||||
|
||||
// The grid itself — identical in the embedded and standalone contexts. Defined once as a fragment so
|
||||
// both branches above render the same markup without duplication.
|
||||
private RenderFragment GridContent => @<CmsMediumTable TRow="SessionRow"
|
||||
Rows="Rows"
|
||||
Loading="Loading"
|
||||
ReleaseAccessor="@(row => row.Release)"
|
||||
ThumbUrl="@(key => ThumbUrl(key))"
|
||||
TitleHeader="Session"
|
||||
EmptyMessage="No sessions found.">
|
||||
<ActionContent Context="row">
|
||||
@if (row.HeroImageEntryKey is { Length: > 0 } heroKey)
|
||||
{
|
||||
@@ -56,18 +89,7 @@
|
||||
</ActivatorContent>
|
||||
</MudFileUpload>
|
||||
</ActionContent>
|
||||
</CmsMediumTable>
|
||||
</MudContainer>
|
||||
|
||||
@code {
|
||||
protected override ReleaseMedium Medium => ReleaseMedium.Session;
|
||||
protected override string MediumNoun => "sessions";
|
||||
|
||||
protected override SessionRow ToRow(ReleaseDto release) => new()
|
||||
{
|
||||
Release = release,
|
||||
HeroImageEntryKey = release.SessionMetadata?.HeroImageEntryKey
|
||||
};
|
||||
</CmsMediumTable>;
|
||||
|
||||
private async Task UploadHeroAsync(SessionRow row, IBrowserFile? file)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user