From 7a5b6545a30894ca2ca89391ba3b193ea9e6fcc5 Mon Sep 17 00:00:00 2001 From: Masterjun Date: Sun, 3 Nov 2024 02:42:27 +0100 Subject: [PATCH] Add a comma separator between multiple GameGroups in the Search (#2024) --- TASVideos/Pages/Search/Index.cshtml | 4 ++-- TASVideos/Pages/Search/Index.cshtml.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TASVideos/Pages/Search/Index.cshtml b/TASVideos/Pages/Search/Index.cshtml index 2b006cacf..70cc5b039 100644 --- a/TASVideos/Pages/Search/Index.cshtml +++ b/TASVideos/Pages/Search/Index.cshtml @@ -64,11 +64,11 @@ @result.DisplayName - @string.Join(",", result.Systems.Distinct()) + @string.Join(", ", result.Systems.Distinct()) @foreach (var group in result.Groups) { - @group.Name + @group.Name, } diff --git a/TASVideos/Pages/Search/Index.cshtml.cs b/TASVideos/Pages/Search/Index.cshtml.cs index 4020f7c8d..936c01668 100644 --- a/TASVideos/Pages/Search/Index.cshtml.cs +++ b/TASVideos/Pages/Search/Index.cshtml.cs @@ -70,7 +70,7 @@ public async Task OnGet() g.Id, g.DisplayName, g.GameVersions.Select(v => v.System!.Code), - g.GameGroups.Select(gg => new GameGroupEntry(gg.GameGroupId, gg.GameGroup!.Name)))) + g.GameGroups.Select(gg => new GameGroupEntry(gg.GameGroupId, gg.GameGroup!.Name)).ToList())) .ToListAsync(); PublicationResults = await db.Publications @@ -91,7 +91,7 @@ public async Task OnGet() public record PageSearch(string Highlight, string PageName); public record PostSearch(string Highlight, string TopicName, int PostId); - public record GameSearch(int Id, string DisplayName, IEnumerable Systems, IEnumerable Groups); + public record GameSearch(int Id, string DisplayName, IEnumerable Systems, List Groups); public record GameGroupEntry(int Id, string Name); public record PublicationSearch(int Id, string Title, bool IsObsolete); }