From b28f4f78b1b9bc119c66e62288105d0507b19519 Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Sun, 2 Apr 2023 13:37:05 -0500 Subject: [PATCH] Fix keys editor blocking render after save of new game. Do full page redirect after adding game. Fixes #13 --- LANCommander/Components/KeysEditor.razor | 93 +++++++++++++----------- LANCommander/Pages/Games/Edit.razor | 2 +- 2 files changed, 50 insertions(+), 45 deletions(-) diff --git a/LANCommander/Components/KeysEditor.razor b/LANCommander/Components/KeysEditor.razor index cc8dc5c..8c9f1f7 100644 --- a/LANCommander/Components/KeysEditor.razor +++ b/LANCommander/Components/KeysEditor.razor @@ -1,53 +1,58 @@ @inject KeyService KeyService @inject IMessageService MessageService - - - - - - - - - - - +@if (Keys != null) +{ + + + + + + + + + + + - - - - - - - - @switch (context.AllocationMethod) - { - case KeyAllocationMethod.MacAddress: - @context.ClaimedByMacAddress - break; + +
+ + + + + + @switch (context.AllocationMethod) + { + case KeyAllocationMethod.MacAddress: + @context.ClaimedByMacAddress + break; + + case KeyAllocationMethod.UserAccount: + @context.ClaimedByUser?.UserName + break; + } + + + + + + @if (context.IsAllocated()) + { + + } + + + +
+
+ + + + +} - case KeyAllocationMethod.UserAccount: - @context.ClaimedByUser?.UserName - break; - } - - - - - - @if (context.IsAllocated()) - { - - } - - - - - - - -