Merge p16-embed-newwindow into dev (embed: new-tab title link + queue skip buttons)

This commit is contained in:
daniel-c-harvey
2026-06-19 13:17:36 -04:00
4 changed files with 25 additions and 9 deletions
@@ -30,7 +30,7 @@ else
<VolumeZone Volume="@Volume" VolumeChanged="@OnVolumeChange"/> <VolumeZone Volume="@Volume" VolumeChanged="@OnVolumeChange"/>
<div class="meta-zone"> <div class="meta-zone">
<TrackMetaLabel Track="CurrentTrack"/> <TrackMetaLabel Track="CurrentTrack" Fixed="Fixed"/>
</div> </div>
<PlayerSeekZone OnSeekStart="@OnSeekStart" <PlayerSeekZone OnSeekStart="@OnSeekStart"
@@ -2,7 +2,7 @@
@using DeepDrftPublic.Client.Controls @using DeepDrftPublic.Client.Controls
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2"> <MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
@if (!Fixed) @if (!Fixed || HasPrevious || HasNext)
{ {
<MudIconButton Icon="@Icons.Material.Filled.SkipPrevious" <MudIconButton Icon="@Icons.Material.Filled.SkipPrevious"
Color="Color.Primary" Color="Color.Primary"
@@ -14,13 +14,16 @@
Color="Color.Primary" Color="Color.Primary"
Disabled="!CanPlay" Disabled="!CanPlay"
OnToggle="@TogglePlayPause"/> OnToggle="@TogglePlayPause"/>
@if (!Fixed) @if (!Fixed || HasPrevious || HasNext)
{ {
<MudIconButton Icon="@Icons.Material.Filled.SkipNext" <MudIconButton Icon="@Icons.Material.Filled.SkipNext"
Color="Color.Primary" Color="Color.Primary"
Size="Size.Large" Size="Size.Large"
OnClick="@SkipNext" OnClick="@SkipNext"
Disabled="!HasNext"/> Disabled="!HasNext"/>
}
@if (!Fixed)
{
<MudIconButton Icon="@Icons.Material.Filled.Stop" <MudIconButton Icon="@Icons.Material.Filled.Stop"
Color="Color.Primary" Color="Color.Primary"
Size="Size.Large" Size="Size.Large"
@@ -8,14 +8,26 @@
<div class="track-meta-identity"> <div class="track-meta-identity">
@* Title links to the release's dedicated detail page via the shared resolver (§2): the @* Title links to the release's dedicated detail page via the shared resolver (§2): the
TrackDto already carries Release { Id, Medium }, so no round-trip is needed. When no TrackDto already carries Release { Id, Medium }, so no round-trip is needed. When no
release is attached there is no medium to resolve, so the title renders unlinked. *@ release is attached there is no medium to resolve, so the title renders unlinked.
When Fixed (embedded iframe), the link opens in a new tab so the iframe keeps playing. *@
@if (Track.Release is not null) @if (Track.Release is not null)
{ {
<a href="@ReleaseRoutes.DetailHref(Track.Release)" style="text-decoration: none;"> @if (Fixed)
<MudText Typo="Typo.subtitle2" Class="track-meta-title text-truncate"> {
@Track.TrackName <a href="@ReleaseRoutes.DetailHref(Track.Release)" target="_blank" rel="noopener noreferrer" style="text-decoration: none;">
</MudText> <MudText Typo="Typo.subtitle2" Class="track-meta-title text-truncate">
</a> @Track.TrackName
</MudText>
</a>
}
else
{
<a href="@ReleaseRoutes.DetailHref(Track.Release)" style="text-decoration: none;">
<MudText Typo="Typo.subtitle2" Class="track-meta-title text-truncate">
@Track.TrackName
</MudText>
</a>
}
} }
else else
{ {
@@ -11,4 +11,5 @@ namespace DeepDrftPublic.Client.Controls.AudioPlayerBar;
public partial class TrackMetaLabel : ComponentBase public partial class TrackMetaLabel : ComponentBase
{ {
[Parameter] public TrackDto? Track { get; set; } [Parameter] public TrackDto? Track { get; set; }
[Parameter] public bool Fixed { get; set; }
} }