LANCommander/LANCommander.Server/UI/Pages/Redistributables/Edit/Scripts.razor

22 lines
No EOL
880 B
Text

@page "/Redistributables/{id:guid}/Scripts"
@using LANCommander.SDK.Enums
@using LANCommander.Server.UI.Pages.Redistributables.Components
@attribute [Authorize(Roles = RoleService.AdministratorRoleName)]
@inject NavigationManager NavigationManager
<RedistributableEditView Id="Id">
<CascadingValue Name="RedistributableId" Value="context.Id">
<ScriptEditor AllowedTypes="new[] { ScriptType.Install, ScriptType.DetectInstall, ScriptType.NameChange, ScriptType.BeforeStart, ScriptType.AfterStop, ScriptType.Package, ScriptType.RunWrapper }" />
</CascadingValue>
</RedistributableEditView>
@code {
[Parameter] public Guid Id { get; set; }
[Parameter] public string Panel { get; set; }
protected override async Task OnInitializedAsync()
{
if (Id == Guid.Empty)
NavigationManager.NavigateTo($"/Redistributables", true);
}
}