Refactored ui. Improved console experience. Added command endpoint

This commit is contained in:
2025-07-18 21:16:52 +02:00
parent f8c11b2dd8
commit 265a4b280b
43 changed files with 479 additions and 149 deletions

View File

@@ -1,6 +1,7 @@
using MoonCore.Attributes;
using MoonCore.Helpers;
using MoonCore.Models;
using MoonlightServers.Shared.Http.Requests.Client.Servers;
using MoonlightServers.Shared.Http.Requests.Client.Servers.Variables;
using MoonlightServers.Shared.Http.Responses.Client.Servers;
using MoonlightServers.Shared.Http.Responses.Client.Servers.Variables;
@@ -59,6 +60,17 @@ public class ServerService
);
}
public async Task RunCommand(int serverId, string command)
{
await HttpApiClient.Post(
$"api/client/servers/{serverId}/command",
new ServerCommandRequest()
{
Command = command
}
);
}
public async Task<ServerWebSocketResponse> GetWebSocket(int serverId)
{
return await HttpApiClient.GetJson<ServerWebSocketResponse>(