118 lines
5.3 KiB
Plaintext
118 lines
5.3 KiB
Plaintext
@page "/mixes/{Id:long}"
|
|
@using DeepDrftPublic.Client.Controls
|
|
@inherits ReleaseDetailBase
|
|
|
|
<PageTitle>@(ViewModel.Release?.Title ?? "Mix") - DeepDrft</PageTitle>
|
|
|
|
@if (ViewModel.IsLoading)
|
|
{
|
|
<div class="deepdrft-track-detail-container">
|
|
<div class="deepdrft-track-detail-masthead">
|
|
<MudSkeleton SkeletonType="SkeletonType.Text" Width="70%" Height="56px" />
|
|
<MudSkeleton SkeletonType="SkeletonType.Text" Width="40%" Height="32px" />
|
|
</div>
|
|
</div>
|
|
}
|
|
else if (ViewModel.NotFound || ViewModel.Release is null)
|
|
{
|
|
<div class="deepdrft-track-detail-container">
|
|
<div class="deepdrft-track-detail-masthead">
|
|
<MudText Typo="Typo.h4" Align="Align.Center">Mix not found.</MudText>
|
|
<div class="d-flex justify-center mt-4">
|
|
<MudButton Href="/mixes"
|
|
Variant="Variant.Text"
|
|
StartIcon="@Icons.Material.Filled.ArrowBack">
|
|
All mixes
|
|
</MudButton>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
var release = ViewModel.Release;
|
|
var hasGenre = release.Genre is not null;
|
|
var hasDate = release.ReleaseDate is not null;
|
|
|
|
@* Full-page waveform sits behind the scaffold content. The scaffold's container is positioned
|
|
above it via the mix-detail-foreground stacking context. TrackId lets the visualizer couple to
|
|
playback only when the player is on this mix's track. *@
|
|
<MixWaveformVisualizer ReleaseId="@release.Id" TrackId="@ViewModel.Track?.Id" />
|
|
|
|
<div class="mix-detail-foreground">
|
|
<MudContainer MaxWidth="MaxWidth.Large" Class="mix-detail-container">
|
|
<ReleaseDetailScaffold Title="@release.Title"
|
|
Artist="@release.Artist"
|
|
Track="@ViewModel.Track"
|
|
BackHref="/mixes"
|
|
BackLabel="All mixes"
|
|
ShowMeta="@(hasGenre || hasDate)">
|
|
<TopRightAction>
|
|
@* Lava-lamp button top-right, across from the back link. Toggles the INLINE seven-knob
|
|
control bar that animates open/closed in place below it (lava reframe §7b) — not a
|
|
popover or drawer. The icon swaps to its FILLED variant while the bar is expanded
|
|
(§7f / Part B). The controls bar mutates the shared MixVisualizerControlState; the
|
|
backdrop bridge pushes the dials. A knob drag does not collapse the bar — the toggle
|
|
only flips on this button's click, never on a drag landing in the bar. *@
|
|
<div class="mix-visualizer-controls-anchor">
|
|
<MudTooltip Text="Visualizer settings">
|
|
<MudIconButton Icon="@(_controlsExpanded ? DDIcons.LavaLampFilled : DDIcons.LavaLamp)"
|
|
Size="Size.Large"
|
|
Color="Color.Secondary"
|
|
Disabled="@(!RendererInfo.IsInteractive)"
|
|
OnClick="@ToggleSettings"
|
|
aria-label="Visualizer settings"
|
|
aria-expanded="@_controlsExpanded" />
|
|
</MudTooltip>
|
|
|
|
<MixVisualizerControls Expanded="@_controlsExpanded" />
|
|
</div>
|
|
</TopRightAction>
|
|
<Hero>
|
|
<div class="mix-detail-cover">
|
|
@if (!string.IsNullOrEmpty(release.ImagePath))
|
|
{
|
|
<MudPaper Elevation="2" Class="deepdrft-track-detail-cover-art"
|
|
Style="@($"background-image: url('api/image/{Uri.EscapeDataString(release.ImagePath)}');")" />
|
|
}
|
|
else
|
|
{
|
|
<MudPaper Elevation="2" Class="deepdrft-track-detail-cover-placeholder deepdrft-gradient-soft-secondary">
|
|
<MudIcon Icon="@Icons.Material.Filled.Album" Color="Color.Primary" />
|
|
</MudPaper>
|
|
}
|
|
</div>
|
|
</Hero>
|
|
<MetaContent>
|
|
@if (hasGenre)
|
|
{
|
|
<div>
|
|
<MudChip T="string" Variant="Variant.Outlined" Color="Color.Tertiary" Class="deepdrft-genre-chip">
|
|
@release.Genre
|
|
</MudChip>
|
|
</div>
|
|
}
|
|
@if (hasDate)
|
|
{
|
|
<div>
|
|
<MudText Typo="Typo.overline">Released</MudText>
|
|
<MudText Typo="Typo.body1">@release.ReleaseDate!.Value.ToString("MMMM yyyy")</MudText>
|
|
</div>
|
|
}
|
|
</MetaContent>
|
|
</ReleaseDetailScaffold>
|
|
</MudContainer>
|
|
</div>
|
|
}
|
|
|
|
@code {
|
|
protected override string PersistKey => "mix-detail";
|
|
|
|
// Lava-lamp inline knob-bar expanded state. Pure presentation over MixVisualizerControlState — the
|
|
// bar discloses the seven knobs and animates open/closed; toggling it touches no control value or
|
|
// bridge push. The lava-lamp button's filled/outline glyph is driven off this same flag.
|
|
private bool _controlsExpanded;
|
|
|
|
private void ToggleSettings() => _controlsExpanded = !_controlsExpanded;
|
|
}
|