LANCommander/LANCommander.Launcher/UI/Library/Components/GameMetadata.razor
Pat Hartl e7653cb33e Clean up selected library item main view
The library view was constructed to be a monolithic component. It has been split out to multiple components, with the potential for expansion into other library items types in the future (other than just a game). The handler for failed installs has also been moved to the queue.
2025-10-05 19:30:32 -05:00

55 lines
No EOL
1.9 KiB
Text

@inject LocalizationService LocalizationService
<div class="game-metadata">
@if (CurrentGame is not null)
{
if (!String.IsNullOrWhiteSpace(CurrentGame.Description))
{
<div class="game-metadata-description">@CurrentGame.Description</div>
}
if (CurrentGame.ReleasedOn.HasValue)
{
<div class="game-metadata-released-on">
<h3>@LocalizationService.GetString("ReleasedOn")</h3>
<span>@CurrentGame.ReleasedOn.Value.ToString("MMMM d, yyyy")</span>
</div>
}
if (CurrentGame.Developers != null && CurrentGame.Developers.Any())
{
<div class="game-metadata-developers">
<h3>@LocalizationService.GetString("Developers")</h3>
<span>@(String.Join(", ", CurrentGame.Developers.Select(c => c.Name)))</span>
</div>
}
if (CurrentGame.Publishers != null && CurrentGame.Publishers.Any())
{
<div class="game-metadata-publishers">
<h3>@LocalizationService.GetString("Publishers")</h3>
<span>@(String.Join(", ", CurrentGame.Publishers.Select(c => c.Name)))</span>
</div>
}
if (CurrentGame.Genres != null && CurrentGame.Genres.Any())
{
<div class="game-metadata-genres">
<h3>@LocalizationService.GetString("Genres")</h3>
<span>@(String.Join(", ", CurrentGame.Genres.Select(g => g.Name)))</span>
</div>
}
if (CurrentGame.Tags != null && CurrentGame.Tags.Any())
{
<div class="game-metadata-tags">
<h3>@LocalizationService.GetString("Tags")</h3>
<span>@(String.Join(", ", CurrentGame.Tags.Select(t => t.Name)))</span>
</div>
}
}
</div>
@code {
[CascadingParameter] public Data.Models.Game? CurrentGame { get; set; }
}