Add descriptiive text for HTTP paths and add a button to get the URL for a path

save-path-regex
Pat Hartl 2023-11-04 20:02:09 -05:00
parent 4fb11c1dd7
commit 78fb812a74
2 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,7 @@
@using LANCommander.Data.Enums
@using LANCommander.Data.Models
@using LANCommander.Extensions;
@inject NavigationManager NavigationManager
<Space Direction="DirectionVHType.Vertical" Size="@("large")" Style="width: 100%">
@if (Values == null || Values.Count == 0)
@ -20,6 +21,11 @@
</PropertyColumn>
<ActionColumn>
<Space Style="display: flex; justify-content: end">
<SpaceItem>
<a class="ant-btn ant-btn-text ant-btn-icon-only" href="@NavigationManager.ToAbsoluteUri($"Server/{ServerId}/{context.Path.TrimStart('/')}")" target="_blank">
<Icon Type="@IconType.Outline.Eye" />
</a>
</SpaceItem>
<SpaceItem>
<Button OnClick="() => Remove(context)" Type="@ButtonType.Text" Danger Icon="@IconType.Outline.Close" />
</SpaceItem>

View File

@ -118,6 +118,7 @@
@if (Panel == "HTTP")
{
<Text>HTTP paths are a way to host static files such as maps and other assets. Engines such as Source, id Tech 3, and Unreal can utilize HTTP for faster downloads when connecting to a server.</Text>
<ServerHttpPathEditor @bind-Values="Server.HttpPaths" ServerId="Id" WorkingDirectory="@Server.WorkingDirectory" />
<Button Type="@ButtonType.Primary" OnClick="Save" Icon="@IconType.Fill.Save">Save</Button>