Fixes the action, custom field, multiplayer mode, and save path editors from clearing out taxonomies when saving. Also passes the Game/Server/Redistributable ID as a cascading parameter.
37 lines
No EOL
1.4 KiB
Text
37 lines
No EOL
1.4 KiB
Text
@page "/Servers/{id:guid}/Scripts"
|
|
@using LANCommander.SDK.Enums
|
|
@using LANCommander.Server.UI.Pages.Servers.Components
|
|
|
|
<ServerEditView Id="Id" Title="Scripts">
|
|
<TitleExtraTemplate>
|
|
@if (context != null && context.Id != Guid.Empty)
|
|
{
|
|
<Flex Align="FlexAlign.Center" Justify="FlexJustify.End" Wrap="FlexWrap.NoWrap" Gap="FlexGap.Small">
|
|
<ServerControl ServerId="context.Id" />
|
|
|
|
<Dropdown Trigger="@(new Trigger[] { Trigger.Click })">
|
|
<Overlay>
|
|
<Menu>
|
|
<MenuItem>
|
|
<a href="/Server/@(context.Id)/Export/Full" target="_blank">Full</a>
|
|
</MenuItem>
|
|
</Menu>
|
|
</Overlay>
|
|
<ChildContent>
|
|
<Button>Export</Button>
|
|
</ChildContent>
|
|
</Dropdown>
|
|
</Flex>
|
|
}
|
|
</TitleExtraTemplate>
|
|
|
|
<ChildContent>
|
|
<CascadingValue Name="ServerId" Value="context.Id">
|
|
<ScriptEditor ArchiveId="@context.Game.Archives.OrderByDescending(a => a.CreatedOn).FirstOrDefault().Id" AllowedTypes="new[] { ScriptType.BeforeStart, ScriptType.AfterStop, ScriptType.GameStarted, ScriptType.GameStopped }"/>
|
|
</CascadingValue>
|
|
</ChildContent>
|
|
</ServerEditView>
|
|
|
|
@code {
|
|
[Parameter] public Guid Id { get; set; }
|
|
} |