34 lines
933 B
Text
34 lines
933 B
Text
|
|
@page "/Redistributables/{id:guid}/Options"
|
||
|
|
@using LANCommander.Server.UI.Pages.Redistributables.Components
|
||
|
|
@attribute [Authorize(Roles = RoleService.AdministratorRoleName)]
|
||
|
|
@inject NavigationManager NavigationManager
|
||
|
|
|
||
|
|
<RedistributableEditView @ref="EditView" Id="Id">
|
||
|
|
<TitleTemplate>
|
||
|
|
<Text>Options</Text>
|
||
|
|
</TitleTemplate>
|
||
|
|
<TitleExtraTemplate>
|
||
|
|
<Button Type="ButtonType.Primary" OnClick="EditView.Save">Save</Button>
|
||
|
|
</TitleExtraTemplate>
|
||
|
|
<ChildContent>
|
||
|
|
<OptionSchemaEditor @bind-Value="context.OptionSchema" OnSave="Save" />
|
||
|
|
</ChildContent>
|
||
|
|
</RedistributableEditView>
|
||
|
|
|
||
|
|
@code {
|
||
|
|
[Parameter] public Guid Id { get; set; }
|
||
|
|
|
||
|
|
RedistributableEditView EditView;
|
||
|
|
|
||
|
|
protected override void OnInitialized()
|
||
|
|
{
|
||
|
|
if (Id == Guid.Empty)
|
||
|
|
NavigationManager.NavigateTo("/Redistributables", true);
|
||
|
|
}
|
||
|
|
|
||
|
|
async Task Save()
|
||
|
|
{
|
||
|
|
await EditView.Save();
|
||
|
|
}
|
||
|
|
}
|