Fix keys editor blocking render after save of new game. Do full page redirect after adding game. Fixes #13
This commit is contained in:
parent
44644b7ac9
commit
b28f4f78b1
2 changed files with 50 additions and 45 deletions
|
@ -1,19 +1,21 @@
|
||||||
@inject KeyService KeyService
|
@inject KeyService KeyService
|
||||||
@inject IMessageService MessageService
|
@inject IMessageService MessageService
|
||||||
|
|
||||||
<Row>
|
@if (Keys != null)
|
||||||
<Col Span="8">
|
{
|
||||||
|
<GridRow>
|
||||||
|
<GridCol Span="8">
|
||||||
<Statistic Title="Available" Value="Keys.Count - AllocatedKeys" Style="text-align: center;" />
|
<Statistic Title="Available" Value="Keys.Count - AllocatedKeys" Style="text-align: center;" />
|
||||||
</Col>
|
</GridCol>
|
||||||
<Col Span="8">
|
<GridCol Span="8">
|
||||||
<Statistic Title="Allocated" Value="AllocatedKeys" Style="text-align: center;" />
|
<Statistic Title="Allocated" Value="AllocatedKeys" Style="text-align: center;" />
|
||||||
</Col>
|
</GridCol>
|
||||||
<Col Span="8">
|
<GridCol Span="8">
|
||||||
<Statistic Title="Total" Value="Keys.Count" Style="text-align: center;" />
|
<Statistic Title="Total" Value="Keys.Count" Style="text-align: center;" />
|
||||||
</Col>
|
</GridCol>
|
||||||
</Row>
|
</GridRow>
|
||||||
|
|
||||||
<Modal Title="View Keys" Visible="ViewModalVisible" Maximizable="false" DefaultMaximized="true" OnCancel="() => ViewModalVisible = false" OnOk="() => ViewModalVisible = false">
|
<Modal Title="View Keys" Visible="ViewModalVisible" Maximizable="false" DefaultMaximized="true" OnCancel="() => ViewModalVisible = false" OnOk="() => ViewModalVisible = false">
|
||||||
<Table TItem="Key" DataSource="@Keys" Bordered>
|
<Table TItem="Key" DataSource="@Keys" Bordered>
|
||||||
<PropertyColumn Property="k => k.Value">
|
<PropertyColumn Property="k => k.Value">
|
||||||
<InputPassword @bind-Value="@context.Value" />
|
<InputPassword @bind-Value="@context.Value" />
|
||||||
|
@ -43,11 +45,14 @@
|
||||||
</Space>
|
</Space>
|
||||||
</ActionColumn>
|
</ActionColumn>
|
||||||
</Table>
|
</Table>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Modal Title="Edit Keys" Visible="EditModalVisible" Maximizable="false" DefaultMaximized="true" OnCancel="() => EditModalVisible = false" OnOk="Save">
|
<Modal Title="Edit Keys" Visible="EditModalVisible" Maximizable="false" DefaultMaximized="true" OnCancel="() => EditModalVisible = false" OnOk="Save">
|
||||||
<StandaloneCodeEditor @ref="Editor" Id="editor" ConstructionOptions="EditorConstructionOptions" />
|
<StandaloneCodeEditor @ref="Editor" Id="editor" ConstructionOptions="EditorConstructionOptions" />
|
||||||
</Modal>
|
</Modal>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.monaco-editor-container {
|
.monaco-editor-container {
|
||||||
|
|
|
@ -197,7 +197,7 @@
|
||||||
|
|
||||||
await MessageService.Success("Game added!");
|
await MessageService.Success("Game added!");
|
||||||
|
|
||||||
NavigationManager.NavigateTo($"/Games/{Game.Id}/Edit");
|
NavigationManager.NavigateTo($"/Games/{Game.Id}/Edit", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
Loading…
Add table
Reference in a new issue