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"/>
<div class="meta-zone">
<TrackMetaLabel Track="CurrentTrack"/>
<TrackMetaLabel Track="CurrentTrack" Fixed="Fixed"/>
</div>
<PlayerSeekZone OnSeekStart="@OnSeekStart"
@@ -2,7 +2,7 @@
@using DeepDrftPublic.Client.Controls
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
@if (!Fixed)
@if (!Fixed || HasPrevious || HasNext)
{
<MudIconButton Icon="@Icons.Material.Filled.SkipPrevious"
Color="Color.Primary"
@@ -14,13 +14,16 @@
Color="Color.Primary"
Disabled="!CanPlay"
OnToggle="@TogglePlayPause"/>
@if (!Fixed)
@if (!Fixed || HasPrevious || HasNext)
{
<MudIconButton Icon="@Icons.Material.Filled.SkipNext"
Color="Color.Primary"
Size="Size.Large"
OnClick="@SkipNext"
Disabled="!HasNext"/>
}
@if (!Fixed)
{
<MudIconButton Icon="@Icons.Material.Filled.Stop"
Color="Color.Primary"
Size="Size.Large"
@@ -8,14 +8,26 @@
<div class="track-meta-identity">
@* 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
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)
{
<a href="@ReleaseRoutes.DetailHref(Track.Release)" style="text-decoration: none;">
<MudText Typo="Typo.subtitle2" Class="track-meta-title text-truncate">
@Track.TrackName
</MudText>
</a>
@if (Fixed)
{
<a href="@ReleaseRoutes.DetailHref(Track.Release)" target="_blank" rel="noopener noreferrer" style="text-decoration: none;">
<MudText Typo="Typo.subtitle2" Class="track-meta-title text-truncate">
@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
{
@@ -11,4 +11,5 @@ namespace DeepDrftPublic.Client.Controls.AudioPlayerBar;
public partial class TrackMetaLabel : ComponentBase
{
[Parameter] public TrackDto? Track { get; set; }
[Parameter] public bool Fixed { get; set; }
}