@using GmRelay.Shared.Domain @using GmRelay.Web.Services.Portfolio
@foreach (var game in Games) { @if (!string.IsNullOrWhiteSpace(game.CoverPath)) {
} else {
Без обложки
}

@game.Title

Завершено @game.CompletedAt.ToLocalTime().FormatMoscowShort()
@if (!string.IsNullOrWhiteSpace(game.System) || !string.IsNullOrWhiteSpace(game.Format)) {
@if (!string.IsNullOrWhiteSpace(game.System)) { @GetSystemDisplayName(game.System) } @if (!string.IsNullOrWhiteSpace(game.Format)) { @TranslateFormat(game.Format) }
}
}
@code { [Parameter, EditorRequired] public IReadOnlyList Games { get; set; } = []; private static string GetSystemDisplayName(string? system) { if (string.IsNullOrWhiteSpace(system)) return system ?? string.Empty; if (Enum.TryParse(system, out var gs)) return gs.ToDisplayName(); return system; } private static string TranslateFormat(string format) => format switch { "Online" => "Онлайн", "Offline" => "Офлайн", "Hybrid" => "Гибрид", _ => format }; }