Front End
- MudBlazor Theme Manager tryout - Navigation bar rework - Icons and styles rework - Track Gallery & Card layout redesign for SPA - Track Player bottom bar
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using DeepDrftModels.Entities;
|
||||
using DeepDrftWeb.Client.Clients;
|
||||
using MudBlazor;
|
||||
|
||||
namespace DeepDrftWeb.Client.Controls;
|
||||
|
||||
public partial class TrackCard : ComponentBase
|
||||
{
|
||||
[Parameter] public required TrackEntity TrackModel { get; set; }
|
||||
[Parameter] public EventCallback<TrackEntity> OnPlay { get; set; }
|
||||
|
||||
private bool _isPlaying = false;
|
||||
private string PlayPauseIcon => _isPlaying ? Icons.Material.Filled.MusicNote : Icons.Material.Filled.PlayArrow;
|
||||
|
||||
private async Task PlayClick()
|
||||
{
|
||||
if (!_isPlaying)
|
||||
{
|
||||
_isPlaying = true;
|
||||
await OnPlay.InvokeAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user