more add to playlist buttons; fix playlist preview (#1693)
This commit is contained in:
@@ -62,6 +62,13 @@
|
||||
OnClick="@AddToCollection">
|
||||
Add To Collection
|
||||
</MudButton>
|
||||
<MudButton Class="ml-3"
|
||||
Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.PlaylistAdd"
|
||||
OnClick="@AddToPlaylist">
|
||||
Add To Playlist
|
||||
</MudButton>
|
||||
<MudButton Class="ml-3"
|
||||
Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
@@ -220,6 +227,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
private async Task AddToPlaylist()
|
||||
{
|
||||
var parameters = new DialogParameters { { "EntityType", "show" }, { "EntityName", _show.Title } };
|
||||
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
|
||||
|
||||
IDialogReference dialog = await _dialog.ShowAsync<AddToPlaylistDialog>("Add To Playlist", parameters, options);
|
||||
DialogResult result = await dialog.Result;
|
||||
if (!result.Canceled && result.Data is PlaylistViewModel playlist)
|
||||
{
|
||||
await _mediator.Send(new AddShowToPlaylist(playlist.Id, ShowId), _cts.Token);
|
||||
_navigationManager.NavigateTo($"media/playlists/{playlist.Id}");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task AddToSchedule()
|
||||
{
|
||||
var parameters = new DialogParameters { { "EntityType", "show" }, { "EntityName", _show.Title } };
|
||||
|
||||
Reference in New Issue
Block a user