diff --git a/LANCommander/Pages/Games/Edit.razor b/LANCommander/Pages/Games/Edit.razor index c98f809..e9cf115 100644 --- a/LANCommander/Pages/Games/Edit.razor +++ b/LANCommander/Pages/Games/Edit.razor @@ -1,5 +1,5 @@ -@page "/Games/{id:guid}/Edit" -@page "/Games/{id:guid}/Edit/{panel}" +@page "/Games/{id:guid}" +@page "/Games/{id:guid}/{panel}" @page "/Games/Add" @using LANCommander.Models; @using LANCommander.Pages.Games.Components @@ -18,23 +18,36 @@ - General + General @if (Game != null && Game.Id != Guid.Empty) { - Actions - Multiplayer - Saves - Keys - Scripts - Archives + Actions + Multiplayer + Save Paths + Keys + Scripts + Archives } - @Panel + + @if (Panel == null) + { + Add New Game + } + else if (PanelDisplayNames.ContainsKey(Panel)) + { + @PanelDisplayNames[Panel] + } + else + { + @Panel + } + @@ -93,7 +106,7 @@ -
+
@@ -172,6 +185,11 @@ else private KeysEditor? KeysEditor; private GameMetadataLookup? GameMetadataLookup; + private Dictionary PanelDisplayNames = new Dictionary + { + { "SavePaths", "Save Paths" } + }; + private Guid LatestArchiveId { get @@ -220,7 +238,7 @@ else await MessageService.Success("Game added!"); - NavigationManager.NavigateTo($"/Games/{Game.Id}/Edit", true); + NavigationManager.NavigateTo($"/Games/{Game.Id}"); } } catch (Exception ex)