From 6cb1331f29bade86d3deaab9b14f726ba269824b Mon Sep 17 00:00:00 2001 From: Licho Date: Sun, 12 Apr 2026 14:23:06 +0200 Subject: [PATCH] fix web ui --- .../Views/Planetwars/PwMatchMaker.cshtml | 4 +-- ZeroKLobby/Notifications/PwBar.cs | 25 +++++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Zero-K.info/Views/Planetwars/PwMatchMaker.cshtml b/Zero-K.info/Views/Planetwars/PwMatchMaker.cshtml index 4815f8dfa5..85ce5ba16c 100644 --- a/Zero-K.info/Views/Planetwars/PwMatchMaker.cshtml +++ b/Zero-K.info/Views/Planetwars/PwMatchMaker.cshtml @@ -13,8 +13,8 @@ } else { - PwMatchCommand.VoteOption opt = pw.Options.First(); - text = string.Format("{0} attacks planet {2}, {1} defends", pw.AttackerFaction, string.Join(",", pw.DefenderFactions), opt.PlanetName); + var planetNames = string.Join(", ", pw.Options.Select(o => o.PlanetName)); + text = string.Format("{0} attacks {2}, {1} defends", pw.AttackerFaction, string.Join(",", pw.DefenderFactions), planetNames); } bool canClick = (pw.Mode == PwMatchCommand.ModeType.Attack && pw.AttackerFaction == Global.Account.Faction.Shortcut) || (pw.Mode == PwMatchCommand.ModeType.Defend && pw.DefenderFactions.Contains(Global.Account.Faction.Shortcut)); diff --git a/ZeroKLobby/Notifications/PwBar.cs b/ZeroKLobby/Notifications/PwBar.cs index 7c1abd5296..c346b9df17 100644 --- a/ZeroKLobby/Notifications/PwBar.cs +++ b/ZeroKLobby/Notifications/PwBar.cs @@ -82,23 +82,26 @@ void UpdateGui() } else if (pw.Mode == PwMatchCommand.ModeType.Defend) { - PwMatchCommand.VoteOption opt = pw.Options.First(); - headerLabel.Text = string.Format("{0} attacks planet {2}, {1} defends", + headerLabel.Text = string.Format("{0} attacks, {1} defends", pw.AttackerFaction, - string.Join(",", pw.DefenderFactions), - opt.PlanetName); + string.Join(",", pw.DefenderFactions)); foreach (Button c in pnl.Controls.OfType