|
|
|
|
@ -5,7 +5,7 @@
@@ -5,7 +5,7 @@
|
|
|
|
|
<div class="@((ContainerClass ?? "media-card-container mr-6") + " pb-3")"> |
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Link)) |
|
|
|
|
{ |
|
|
|
|
<div style="position: relative"> |
|
|
|
|
<div class="@(IsSelected ? "media-card-selected" : "")" style="position: relative; border-radius: 4px;"> |
|
|
|
|
<MudPaper Class="@($"media-card {CardClass}")" Style="@ArtworkForItem()"> |
|
|
|
|
@if (string.IsNullOrWhiteSpace(Data.Poster)) |
|
|
|
|
{ |
|
|
|
|
@ -14,17 +14,34 @@
@@ -14,17 +14,34 @@
|
|
|
|
|
</MudText> |
|
|
|
|
} |
|
|
|
|
</MudPaper> |
|
|
|
|
@if (IsSelected) |
|
|
|
|
{ |
|
|
|
|
<div style="height: 48px; width: 48px; top: 0; left: 0; position: absolute; display: flex"> |
|
|
|
|
<MudIcon Color="Color.Tertiary" |
|
|
|
|
Icon="@Icons.Material.Filled.CheckBox" |
|
|
|
|
Style="margin: auto"/> |
|
|
|
|
</div> |
|
|
|
|
} |
|
|
|
|
<div class="media-card-overlay" style=""> |
|
|
|
|
<MudButton Link="@Link" Style="height: 100%; width: 100%"> |
|
|
|
|
<MudButton Link="@(IsSelectMode ? null : Link)" |
|
|
|
|
Style="height: 100%; width: 100%" |
|
|
|
|
OnClick="@(e => IsSelectMode ? SelectClicked.InvokeAsync(e) : Task.CompletedTask)"> |
|
|
|
|
</MudButton> |
|
|
|
|
@if (AddToCollectionClicked.HasDelegate) |
|
|
|
|
@if (SelectClicked.HasDelegate) |
|
|
|
|
{ |
|
|
|
|
<MudIconButton Color="Color.Tertiary" |
|
|
|
|
Icon="@(IsSelected ? Icons.Material.Filled.CheckBox : Icons.Material.Filled.CheckBoxOutlineBlank)" |
|
|
|
|
Style="top: 0; left: 0; position: absolute;" |
|
|
|
|
OnClick="@(e => SelectClicked.InvokeAsync(e))"/> |
|
|
|
|
} |
|
|
|
|
@if (AddToCollectionClicked.HasDelegate && !IsSelectMode) |
|
|
|
|
{ |
|
|
|
|
<MudIconButton Color="Color.Tertiary" |
|
|
|
|
Icon="@Icons.Material.Filled.PlaylistAdd" |
|
|
|
|
Style="bottom: 0; left: 0; position: absolute;" |
|
|
|
|
OnClick="@(() => AddToCollectionClicked.InvokeAsync(Data))"/> |
|
|
|
|
} |
|
|
|
|
@if (DeleteClicked.HasDelegate) |
|
|
|
|
@if (DeleteClicked.HasDelegate && !IsSelectMode) |
|
|
|
|
{ |
|
|
|
|
<MudIconButton Color="Color.Tertiary" |
|
|
|
|
Icon="@Icons.Material.Filled.Delete" |
|
|
|
|
@ -88,6 +105,15 @@
@@ -88,6 +105,15 @@
|
|
|
|
|
[Parameter] |
|
|
|
|
public EventCallback<MediaCardViewModel> AddToCollectionClicked { get; set; } |
|
|
|
|
|
|
|
|
|
[Parameter] |
|
|
|
|
public EventCallback<MouseEventArgs> SelectClicked { get; set; } |
|
|
|
|
|
|
|
|
|
[Parameter] |
|
|
|
|
public bool IsSelectMode { get; set; } |
|
|
|
|
|
|
|
|
|
[Parameter] |
|
|
|
|
public bool IsSelected { get; set; } |
|
|
|
|
|
|
|
|
|
private string GetPlaceholder(string sortTitle) |
|
|
|
|
{ |
|
|
|
|
if (Placeholder != null) |
|
|
|
|
|