|
|
|
@ -7,351 +7,365 @@
@@ -7,351 +7,365 @@
|
|
|
|
|
@inject NavigationManager NavigationManager |
|
|
|
|
@inject PersistentComponentState ApplicationState |
|
|
|
|
|
|
|
|
|
<MudPaper Square="true" Style="display: flex; height: 64px; width: 100%; z-index: 100;"> |
|
|
|
|
<div style="display: flex; flex-direction: row; margin-bottom: auto; margin-top: auto; width: 100%" class="ml-6 mr-6"> |
|
|
|
|
@if (IsSelectMode()) |
|
|
|
|
{ |
|
|
|
|
<MudText Typo="Typo.h6" Color="Color.Primary">@SelectionLabel()</MudText> |
|
|
|
|
<div style="margin-left: auto"> |
|
|
|
|
<MudButton Variant="Variant.Filled" |
|
|
|
|
Color="Color.Error" |
|
|
|
|
StartIcon="@Icons.Material.Filled.Delete" |
|
|
|
|
OnClick="@(_ => DeleteFromDatabase())"> |
|
|
|
|
Delete From Database |
|
|
|
|
</MudButton> |
|
|
|
|
<MudButton Class="ml-3" |
|
|
|
|
Variant="Variant.Filled" |
|
|
|
|
Color="Color.Secondary" |
|
|
|
|
StartIcon="@Icons.Material.Filled.Check" |
|
|
|
|
OnClick="@(_ => ClearSelection())"> |
|
|
|
|
Clear Selection |
|
|
|
|
</MudButton> |
|
|
|
|
</div> |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (_movies?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#movies")" Style="margin-bottom: auto; margin-top: auto">@_movies.Count Movies</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_shows?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#shows")" Style="margin-bottom: auto; margin-top: auto">@_shows.Count Shows</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_seasons?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#seasons")" Style="margin-bottom: auto; margin-top: auto">@_seasons.Count Seasons</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_episodes?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#episodes")" Style="margin-bottom: auto; margin-top: auto">@_episodes.Count Episodes</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_artists?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#artists")" Style="margin-bottom: auto; margin-top: auto">@_artists.Count Artists</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_musicVideos?.Cards.Count > 0) |
|
|
|
|
<MudForm Style="max-height: 100%"> |
|
|
|
|
<MudPaper Square="true" Style="display: flex; height: 64px; min-height: 64px; width: 100%; z-index: 100;"> |
|
|
|
|
<div style="display: flex; flex-direction: row; margin-bottom: auto; margin-top: auto; width: 100%; align-items: center" class="ml-6 mr-6"> |
|
|
|
|
@if (IsSelectMode()) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#music_videos")" Style="margin-bottom: auto; margin-top: auto">@_musicVideos.Count Music Videos</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_otherVideos?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#other_videos")" Style="margin-bottom: auto; margin-top: auto">@_otherVideos.Count Other Videos</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_songs?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#songs")" Style="margin-bottom: auto; margin-top: auto">@_songs.Count Songs</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_images?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#images")" Style="margin-bottom: auto; margin-top: auto">@_images.Count Images</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (IsNotEmpty) |
|
|
|
|
{ |
|
|
|
|
<div style="margin-left: auto"> |
|
|
|
|
<MudButton Variant="@Variant.Filled" |
|
|
|
|
Color="@Color.Error" |
|
|
|
|
StartIcon="@Icons.Material.Filled.DeleteForever" |
|
|
|
|
OnClick="@(_ => EmptyTrash())"> |
|
|
|
|
Empty Trash |
|
|
|
|
<div class="flex-grow-1"> |
|
|
|
|
<MudText Typo="Typo.h6" Color="Color.Primary">@SelectionLabel()</MudText> |
|
|
|
|
</div> |
|
|
|
|
<div style="margin-left: auto" class="d-none d-md-flex"> |
|
|
|
|
<MudButton Variant="Variant.Filled" |
|
|
|
|
Color="Color.Error" |
|
|
|
|
StartIcon="@Icons.Material.Filled.Delete" |
|
|
|
|
OnClick="@(_ => DeleteFromDatabase())"> |
|
|
|
|
Delete From Database |
|
|
|
|
</MudButton> |
|
|
|
|
<MudButton Class="ml-3" |
|
|
|
|
Variant="Variant.Filled" |
|
|
|
|
Color="Color.Secondary" |
|
|
|
|
StartIcon="@Icons.Material.Filled.Check" |
|
|
|
|
OnClick="@(_ => ClearSelection())"> |
|
|
|
|
Clear Selection |
|
|
|
|
</MudButton> |
|
|
|
|
</div> |
|
|
|
|
<div style="align-items: center; display: flex; margin-left: auto;" class="d-md-none"> |
|
|
|
|
<div class="flex-grow-1"></div> |
|
|
|
|
<MudMenu Icon="@Icons.Material.Filled.MoreVert"> |
|
|
|
|
<MudMenuItem Icon="@Icons.Material.Filled.Delete" Label="Delete From Database" OnClick="DeleteFromDatabase"/> |
|
|
|
|
<MudMenuItem Icon="@Icons.Material.Filled.Check" Label="Clear Selection" OnClick="ClearSelection"/> |
|
|
|
|
</MudMenu> |
|
|
|
|
</div> |
|
|
|
|
} |
|
|
|
|
else if (IsNotEmpty) |
|
|
|
|
{ |
|
|
|
|
<div style="align-items: center; display: flex; width: 100%" class="d-none d-md-flex"> |
|
|
|
|
@if (_movies?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#movies")" Style="margin-bottom: auto; margin-top: auto">@_movies.Count Movies</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_shows?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#shows")" Style="margin-bottom: auto; margin-top: auto">@_shows.Count Shows</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_seasons?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#seasons")" Style="margin-bottom: auto; margin-top: auto">@_seasons.Count Seasons</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_episodes?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#episodes")" Style="margin-bottom: auto; margin-top: auto">@_episodes.Count Episodes</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_artists?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#artists")" Style="margin-bottom: auto; margin-top: auto">@_artists.Count Artists</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_musicVideos?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#music_videos")" Style="margin-bottom: auto; margin-top: auto">@_musicVideos.Count Music Videos</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_otherVideos?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#other_videos")" Style="margin-bottom: auto; margin-top: auto">@_otherVideos.Count Other Videos</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_songs?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#songs")" Style="margin-bottom: auto; margin-top: auto">@_songs.Count Songs</MudLink> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_images?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<MudLink Class="ml-4" Href="@(NavigationManager.Uri.Split("#").Head() + "#images")" Style="margin-bottom: auto; margin-top: auto">@_images.Count Images</MudLink> |
|
|
|
|
} |
|
|
|
|
<div class="flex-grow-1 d-none d-md-flex"></div> |
|
|
|
|
<div> |
|
|
|
|
<MudButton Variant="@Variant.Filled" |
|
|
|
|
Color="@Color.Error" |
|
|
|
|
StartIcon="@Icons.Material.Filled.DeleteForever" |
|
|
|
|
OnClick="@(_ => EmptyTrash())"> |
|
|
|
|
Empty Trash |
|
|
|
|
</MudButton> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div style="align-items: center; display: flex; width: 100%" class="d-md-none"> |
|
|
|
|
<div class="flex-grow-1"></div> |
|
|
|
|
<div> |
|
|
|
|
<MudButton Variant="@Variant.Filled" |
|
|
|
|
Color="@Color.Error" |
|
|
|
|
StartIcon="@Icons.Material.Filled.DeleteForever" |
|
|
|
|
OnClick="@(_ => EmptyTrash())"> |
|
|
|
|
Empty Trash |
|
|
|
|
</MudButton> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
<MudText>Nothing to see here...</MudText> |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
</MudPaper> |
|
|
|
|
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Style="margin-top: 96px"> |
|
|
|
|
@if (_movies?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "movies" } })"> |
|
|
|
|
Movies |
|
|
|
|
</MudText> |
|
|
|
|
@if (_movies.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetMoviesLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (MovieCardViewModel card in _movies.Cards.OrderBy(m => m.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/movies/{card.MovieId}")" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_shows?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "shows" } })"> |
|
|
|
|
Shows |
|
|
|
|
</MudText> |
|
|
|
|
@if (_shows.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetShowsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (TelevisionShowCardViewModel card in _shows.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/tv/shows/{card.TelevisionShowId}")" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_seasons?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "seasons" } })"> |
|
|
|
|
Seasons |
|
|
|
|
</MudText> |
|
|
|
|
@if (_seasons.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetSeasonsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (TelevisionSeasonCardViewModel card in _seasons.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/tv/seasons/{card.TelevisionSeasonId}")" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_episodes?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "episodes" } })"> |
|
|
|
|
Episodes |
|
|
|
|
</MudText> |
|
|
|
|
@if (_episodes.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetEpisodesLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (TelevisionEpisodeCardViewModel card in _episodes.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
Href="@($"media/tv/seasons/{card.SeasonId}#episode-{card.EpisodeId}")" |
|
|
|
|
Subtitle="@($"{card.ShowTitle} - S{card.Season} E{card.Episode}")" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_artists?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "artists" } })"> |
|
|
|
|
Artists |
|
|
|
|
</MudText> |
|
|
|
|
@if (_artists.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetArtistsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (ArtistCardViewModel card in _artists.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/music/artists/{card.ArtistId}")" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_musicVideos?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "music_videos" } })"> |
|
|
|
|
Music Videos |
|
|
|
|
</MudText> |
|
|
|
|
@if (_musicVideos.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetMusicVideosLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (MusicVideoCardViewModel card in _musicVideos.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_otherVideos?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "other_videos" } })"> |
|
|
|
|
Other Videos |
|
|
|
|
</MudText> |
|
|
|
|
@if (_otherVideos.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetOtherVideosLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (OtherVideoCardViewModel card in _otherVideos.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_songs?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "songs" } })"> |
|
|
|
|
Songs |
|
|
|
|
</MudText> |
|
|
|
|
@if (_songs.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetSongsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (SongCardViewModel card in _songs.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_images?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" |
|
|
|
|
Style="scroll-margin-top: 160px" |
|
|
|
|
UserAttributes="@(new Dictionary<string, object> { { "id", "images" } })"> |
|
|
|
|
Songs |
|
|
|
|
</MudText> |
|
|
|
|
@if (_images.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetImagesLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<MudContainer MaxWidth="MaxWidth.False" Class="media-card-grid"> |
|
|
|
|
@foreach (ImageCardViewModel card in _images.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
</MudPaper> |
|
|
|
|
<div class="d-flex flex-column" style="height: 100vh; overflow-x: auto"> |
|
|
|
|
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8"> |
|
|
|
|
@if (_movies?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "movies" } })"> |
|
|
|
|
Movies |
|
|
|
|
</MudText> |
|
|
|
|
@if (_movies.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetMoviesLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (MovieCardViewModel card in _movies.Cards.OrderBy(m => m.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/movies/{card.MovieId}")" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_shows?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "shows" } })"> |
|
|
|
|
Shows |
|
|
|
|
</MudText> |
|
|
|
|
@if (_shows.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetShowsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (TelevisionShowCardViewModel card in _shows.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/tv/shows/{card.TelevisionShowId}")" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_seasons?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "seasons" } })"> |
|
|
|
|
Seasons |
|
|
|
|
</MudText> |
|
|
|
|
@if (_seasons.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetSeasonsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (TelevisionSeasonCardViewModel card in _seasons.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/tv/seasons/{card.TelevisionSeasonId}")" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_episodes?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "episodes" } })"> |
|
|
|
|
Episodes |
|
|
|
|
</MudText> |
|
|
|
|
@if (_episodes.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetEpisodesLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (TelevisionEpisodeCardViewModel card in _episodes.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
Href="@($"media/tv/seasons/{card.SeasonId}#episode-{card.EpisodeId}")" |
|
|
|
|
Subtitle="@($"{card.ShowTitle} - S{card.Season} E{card.Episode}")" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_artists?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "artists" } })"> |
|
|
|
|
Artists |
|
|
|
|
</MudText> |
|
|
|
|
@if (_artists.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetArtistsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (ArtistCardViewModel card in _artists.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="@($"media/music/artists/{card.ArtistId}")" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_musicVideos?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "music_videos" } })"> |
|
|
|
|
Music Videos |
|
|
|
|
</MudText> |
|
|
|
|
@if (_musicVideos.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetMusicVideosLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (MusicVideoCardViewModel card in _musicVideos.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_otherVideos?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "other_videos" } })"> |
|
|
|
|
Other Videos |
|
|
|
|
</MudText> |
|
|
|
|
@if (_otherVideos.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetOtherVideosLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (OtherVideoCardViewModel card in _otherVideos.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_songs?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "songs" } })"> |
|
|
|
|
Songs |
|
|
|
|
</MudText> |
|
|
|
|
@if (_songs.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetSongsLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (SongCardViewModel card in _songs.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@if (_images?.Cards.Count > 0) |
|
|
|
|
{ |
|
|
|
|
<div class="mb-4" style="align-items: baseline; display: flex; flex-direction: row;"> |
|
|
|
|
<MudText Typo="Typo.h4" UserAttributes="@(new Dictionary<string, object> { { "id", "images" } })"> |
|
|
|
|
Songs |
|
|
|
|
</MudText> |
|
|
|
|
@if (_images.Count > 50) |
|
|
|
|
{ |
|
|
|
|
<MudLink Href="@GetImagesLink()" Class="ml-4">See All >></MudLink> |
|
|
|
|
} |
|
|
|
|
</div> |
|
|
|
|
<MudDivider Class="mb-6"/> |
|
|
|
|
|
|
|
|
|
<MudStack Row="true" Wrap="Wrap.Wrap" Class="mb-10"> |
|
|
|
|
@foreach (ImageCardViewModel card in _images.Cards.OrderBy(s => s.SortTitle)) |
|
|
|
|
{ |
|
|
|
|
<MediaCard Data="@card" |
|
|
|
|
Href="" |
|
|
|
|
ArtworkKind="ArtworkKind.Thumbnail" |
|
|
|
|
DeleteClicked="@DeleteItemFromDatabase" |
|
|
|
|
SelectColor="@Color.Error" |
|
|
|
|
SelectClicked="@(e => SelectClicked(card, e))" |
|
|
|
|
IsSelected="@IsSelected(card)" |
|
|
|
|
IsSelectMode="@IsSelectMode()"/> |
|
|
|
|
} |
|
|
|
|
</MudStack> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
} |
|
|
|
|
</MudContainer> |
|
|
|
|
</div> |
|
|
|
|
</MudForm> |
|
|
|
|
|
|
|
|
|
@code { |
|
|
|
|
private readonly CancellationTokenSource _cts = new(); |
|
|
|
@ -660,39 +674,39 @@
@@ -660,39 +674,39 @@
|
|
|
|
|
switch (vm) |
|
|
|
|
{ |
|
|
|
|
case MovieCardViewModel movie: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { movie.MovieId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([movie.MovieId]); |
|
|
|
|
await DeleteItemsWithConfirmation("movie", $"{movie.Title} ({movie.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case TelevisionShowCardViewModel show: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { show.TelevisionShowId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([show.TelevisionShowId]); |
|
|
|
|
await DeleteItemsWithConfirmation("show", $"{show.Title} ({show.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case TelevisionSeasonCardViewModel season: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { season.TelevisionSeasonId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([season.TelevisionSeasonId]); |
|
|
|
|
await DeleteItemsWithConfirmation("season", $"{season.Title} ({season.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case TelevisionEpisodeCardViewModel episode: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { episode.EpisodeId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([episode.EpisodeId]); |
|
|
|
|
await DeleteItemsWithConfirmation("episode", $"{episode.Title} ({episode.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case ArtistCardViewModel artist: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { artist.ArtistId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([artist.ArtistId]); |
|
|
|
|
await DeleteItemsWithConfirmation("artist", $"{artist.Title} ({artist.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case MusicVideoCardViewModel musicVideo: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { musicVideo.MusicVideoId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([musicVideo.MusicVideoId]); |
|
|
|
|
await DeleteItemsWithConfirmation("music video", $"{musicVideo.Title} ({musicVideo.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case OtherVideoCardViewModel otherVideo: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { otherVideo.OtherVideoId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([otherVideo.OtherVideoId]); |
|
|
|
|
await DeleteItemsWithConfirmation("other video", $"{otherVideo.Title} ({otherVideo.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case SongCardViewModel song: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { song.SongId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([song.SongId]); |
|
|
|
|
await DeleteItemsWithConfirmation("song", $"{song.Title} ({song.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
case ImageCardViewModel image: |
|
|
|
|
request = new DeleteItemsFromDatabase(new List<int> { image.ImageId }); |
|
|
|
|
request = new DeleteItemsFromDatabase([image.ImageId]); |
|
|
|
|
await DeleteItemsWithConfirmation("image", $"{image.Title} ({image.Subtitle})", request); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|