Добавлена подсветка воспроизводимой песни
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
@using PlaylistShared.Pwa.Extensions
|
||||
@using PlaylistShared.Shared.Yandex
|
||||
|
||||
<MudStack Row AlignItems="AlignItems.Center">
|
||||
<MudStack Row AlignItems="AlignItems.Center" Class="@(IsCurrentTrack ? "current-track" : "")">
|
||||
<!-- Обложка с фиксированной шириной -->
|
||||
<MudItem>
|
||||
<TrackCoverWithPlay TrackId="@Track.TrackId"
|
||||
@@ -31,13 +31,26 @@
|
||||
|
||||
<!-- Длительность (фиксированная ширина по содержимому) -->
|
||||
<MudItem>
|
||||
<MudText Typo="Typo.body2">@Track.DurationMs.FormatDuration()</MudText>
|
||||
@if (IsCurrentTrack)
|
||||
{
|
||||
<MudIcon Icon="@Icons.Material.Filled.GraphicEq" Color="Color.Primary" Size="Size.Small" Class="mr-1 eq-animate" Style="vertical-align: middle;" />
|
||||
}
|
||||
<MudText Typo="Typo.body2" Inline Color="@(IsCurrentTrack ? Color.Primary : Color.Default)">@Track.DurationMs.FormatDuration()</MudText>
|
||||
</MudItem>
|
||||
</MudStack>
|
||||
|
||||
<style>
|
||||
.current-track {
|
||||
background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
|
||||
border-radius: 6px;
|
||||
box-shadow: inset 2px 0 0 var(--mud-palette-primary);
|
||||
}
|
||||
</style>
|
||||
|
||||
@code {
|
||||
[Parameter] public YandexTrack Track { get; set; } = null!;
|
||||
[Parameter] public string PlaylistShareToken { get; set; } = string.Empty;
|
||||
[Parameter] public bool CanPlay { get; set; } = true;
|
||||
[Parameter] public string? AddedByName { get; set; }
|
||||
[Parameter] public bool IsCurrentTrack { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user