LANCommander/LANCommander.Server/UI/Pages/Tools/Edit/Scripts.razor
Pat Hartl 120e14d40c Add Tools section to server app
Allows users to upload additional tools and tie them to games. This can be useful for software like map editors, trainers, etc.
2026-02-08 02:24:53 -06:00

20 lines
No EOL
668 B
Text

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