diff --git a/MoonlightServers.ApiServer.Runtime/MoonlightServers.ApiServer.Runtime.csproj b/MoonlightServers.ApiServer.Runtime/MoonlightServers.ApiServer.Runtime.csproj index ea514a0..d14c8a7 100644 --- a/MoonlightServers.ApiServer.Runtime/MoonlightServers.ApiServer.Runtime.csproj +++ b/MoonlightServers.ApiServer.Runtime/MoonlightServers.ApiServer.Runtime.csproj @@ -9,13 +9,23 @@ + - + - + + + + + Never + + + + + diff --git a/MoonlightServers.ApiServer/Properties/launchSettings.json b/MoonlightServers.ApiServer.Runtime/Properties/launchSettings.json similarity index 100% rename from MoonlightServers.ApiServer/Properties/launchSettings.json rename to MoonlightServers.ApiServer.Runtime/Properties/launchSettings.json diff --git a/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodeAllocationsController.cs b/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodeAllocationsController.cs index e6eacd8..1b4f755 100644 --- a/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodeAllocationsController.cs +++ b/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodeAllocationsController.cs @@ -13,7 +13,7 @@ using MoonlightServers.Shared.Http.Responses.Admin.NodeAllocations; namespace MoonlightServers.ApiServer.Http.Controllers.Admin.Nodes; [ApiController] -[Route("api/admin/servers/nodes")] +[Route("api/admin/servers/nodes/{nodeId:int}/allocations")] public class NodeAllocationsController : Controller { private readonly DatabaseRepository NodeRepository; @@ -28,7 +28,7 @@ public class NodeAllocationsController : Controller AllocationRepository = allocationRepository; } - [HttpGet("{nodeId:int}/allocations")] + [HttpGet("")] [Authorize(Policy = "permissions:admin.servers.nodes.get")] public async Task> Get( [FromRoute] int nodeId, @@ -59,7 +59,7 @@ public class NodeAllocationsController : Controller }; } - [HttpGet("{nodeId:int}/allocations/{id:int}")] + [HttpGet("{id:int}")] [Authorize(Policy = "permissions:admin.servers.nodes.get")] public async Task GetSingle([FromRoute] int nodeId, [FromRoute] int id) { @@ -74,7 +74,7 @@ public class NodeAllocationsController : Controller return AllocationMapper.ToNodeAllocation(allocation); } - [HttpPost("{nodeId:int}/allocations")] + [HttpPost("")] [Authorize(Policy = "permissions:admin.servers.nodes.create")] public async Task Create( [FromRoute] int nodeId, @@ -95,7 +95,7 @@ public class NodeAllocationsController : Controller return AllocationMapper.ToNodeAllocation(finalAllocation); } - [HttpPatch("{nodeId:int}/allocations/{id:int}")] + [HttpPatch("{id:int}")] public async Task Update( [FromRoute] int nodeId, [FromRoute] int id, @@ -116,7 +116,7 @@ public class NodeAllocationsController : Controller return AllocationMapper.ToNodeAllocation(allocation); } - [HttpDelete("{nodeId:int}/allocations/{id:int}")] + [HttpDelete("{id:int}")] public async Task Delete([FromRoute] int nodeId, [FromRoute] int id) { var allocation = await AllocationRepository @@ -130,7 +130,7 @@ public class NodeAllocationsController : Controller await AllocationRepository.Remove(allocation); } - [HttpPost("{nodeId:int}/allocations/range")] + [HttpPost("range")] public async Task CreateRange([FromRoute] int nodeId, [FromBody] CreateNodeAllocationRangeRequest rangeRequest) { var node = await NodeRepository @@ -168,7 +168,7 @@ public class NodeAllocationsController : Controller await AllocationRepository.RunTransaction(async set => { await set.AddRangeAsync(allocations); }); } - [HttpDelete("{nodeId:int}/allocations/all")] + [HttpDelete("all")] public async Task DeleteAll([FromRoute] int nodeId) { var allocations = AllocationRepository @@ -179,7 +179,7 @@ public class NodeAllocationsController : Controller await AllocationRepository.RunTransaction(set => { set.RemoveRange(allocations); }); } - [HttpGet("{nodeId:int}/allocations/free")] + [HttpGet("free")] [Authorize(Policy = "permissions:admin.servers.nodes.get")] public async Task> GetFree( [FromRoute] int nodeId, diff --git a/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodesController.cs b/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodesController.cs index becf41b..3372738 100644 --- a/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodesController.cs +++ b/MoonlightServers.ApiServer/Http/Controllers/Admin/Nodes/NodesController.cs @@ -96,7 +96,7 @@ public class NodesController : Controller if (node == null) throw new HttpApiException("No node with this id found", 404); - node = NodeMapper.Merge(request, node); + NodeMapper.Merge(request, node); await NodeRepository.Update(node); return NodeMapper.ToAdminNodeResponse(node); diff --git a/MoonlightServers.ApiServer/Http/Controllers/Admin/Servers/ServersController.cs b/MoonlightServers.ApiServer/Http/Controllers/Admin/Servers/ServersController.cs index ea1eb7f..a3013a8 100644 --- a/MoonlightServers.ApiServer/Http/Controllers/Admin/Servers/ServersController.cs +++ b/MoonlightServers.ApiServer/Http/Controllers/Admin/Servers/ServersController.cs @@ -229,7 +229,7 @@ public class ServersController : Controller if (server == null) throw new HttpApiException("No server with that id found", 404); - server = ServerMapper.Merge(request, server); + ServerMapper.Merge(request, server); var allocations = new List(); diff --git a/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarDockerImagesController.cs b/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarDockerImagesController.cs index 805a386..5317a45 100644 --- a/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarDockerImagesController.cs +++ b/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarDockerImagesController.cs @@ -135,7 +135,7 @@ public class StarDockerImagesController : Controller if (dockerImage == null) throw new HttpApiException("No star docker image with this id found", 404); - dockerImage = DockerImageMapper.Merge(request, dockerImage); + DockerImageMapper.Merge(request, dockerImage); await DockerImageRepository.Update(dockerImage); return DockerImageMapper.ToAdminResponse(dockerImage); diff --git a/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarVariablesController.cs b/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarVariablesController.cs index 5fcd762..58fdb3d 100644 --- a/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarVariablesController.cs +++ b/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarVariablesController.cs @@ -133,7 +133,7 @@ public class StarVariablesController : Controller if (starVariable == null) throw new HttpApiException("No variable with this id found", 404); - starVariable = StarVariableMapper.Merge(request, starVariable); + StarVariableMapper.Merge(request, starVariable); await VariableRepository.Update(starVariable); return StarVariableMapper.ToAdminResponse(starVariable); diff --git a/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarsController.cs b/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarsController.cs index e45c057..3738abc 100644 --- a/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarsController.cs +++ b/MoonlightServers.ApiServer/Http/Controllers/Admin/Stars/StarsController.cs @@ -106,7 +106,7 @@ public class StarsController : Controller if (star == null) throw new HttpApiException("No star with that id found", 404); - star = StarMapper.Merge(request, star); + StarMapper.Merge(request, star); await StarRepository.Update(star); return StarMapper.ToAdminResponse(star); diff --git a/MoonlightServers.ApiServer/Http/Controllers/Client/FilesController.cs b/MoonlightServers.ApiServer/Http/Controllers/Client/FilesController.cs index c208e08..ad4f698 100644 --- a/MoonlightServers.ApiServer/Http/Controllers/Client/FilesController.cs +++ b/MoonlightServers.ApiServer/Http/Controllers/Client/FilesController.cs @@ -15,7 +15,7 @@ namespace MoonlightServers.ApiServer.Http.Controllers.Client; [Authorize] [ApiController] -[Route("api/client/servers")] +[Route("api/client/servers/{serverId:int}/files")] public class FilesController : Controller { private readonly DatabaseRepository ServerRepository; @@ -36,7 +36,7 @@ public class FilesController : Controller AuthorizeService = authorizeService; } - [HttpGet("{serverId:int}/files/list")] + [HttpGet("list")] public async Task List([FromRoute] int serverId, [FromQuery] string path) { var server = await GetServerById(serverId, ServerPermissionType.Read); @@ -47,13 +47,13 @@ public class FilesController : Controller { Name = x.Name, Size = x.Size, - IsFile = x.IsFile, + IsFolder = x.IsFolder, CreatedAt = x.CreatedAt, UpdatedAt = x.UpdatedAt }).ToArray(); } - [HttpPost("{serverId:int}/files/move")] + [HttpPost("move")] public async Task Move([FromRoute] int serverId, [FromQuery] string oldPath, [FromQuery] string newPath) { var server = await GetServerById(serverId, ServerPermissionType.ReadWrite); @@ -61,7 +61,7 @@ public class FilesController : Controller await ServerFileSystemService.Move(server, oldPath, newPath); } - [HttpDelete("{serverId:int}/files/delete")] + [HttpDelete("delete")] public async Task Delete([FromRoute] int serverId, [FromQuery] string path) { var server = await GetServerById(serverId, ServerPermissionType.ReadWrite); @@ -69,15 +69,23 @@ public class FilesController : Controller await ServerFileSystemService.Delete(server, path); } - [HttpPost("{serverId:int}/files/mkdir")] + [HttpPost("mkdir")] public async Task Mkdir([FromRoute] int serverId, [FromQuery] string path) { var server = await GetServerById(serverId, ServerPermissionType.ReadWrite); await ServerFileSystemService.Mkdir(server, path); } + + [HttpPost("touch")] + public async Task Touch([FromRoute] int serverId, [FromQuery] string path) + { + var server = await GetServerById(serverId, ServerPermissionType.ReadWrite); - [HttpGet("{serverId:int}/files/upload")] + await ServerFileSystemService.Mkdir(server, path); + } + + [HttpGet("upload")] public async Task Upload([FromRoute] int serverId) { var server = await GetServerById(serverId, ServerPermissionType.ReadWrite); @@ -104,7 +112,7 @@ public class FilesController : Controller }; } - [HttpGet("{serverId:int}/files/download")] + [HttpGet("download")] public async Task Download([FromRoute] int serverId, [FromQuery] string path) { var server = await GetServerById(serverId, ServerPermissionType.Read); @@ -132,7 +140,7 @@ public class FilesController : Controller }; } - [HttpPost("{serverId:int}/files/compress")] + [HttpPost("compress")] public async Task Compress([FromRoute] int serverId, [FromBody] ServerFilesCompressRequest request) { var server = await GetServerById(serverId, ServerPermissionType.ReadWrite); @@ -143,7 +151,7 @@ public class FilesController : Controller await ServerFileSystemService.Compress(server, type, request.Items, request.Destination); } - [HttpPost("{serverId:int}/files/decompress")] + [HttpPost("decompress")] public async Task Decompress([FromRoute] int serverId, [FromBody] ServerFilesDecompressRequest request) { var server = await GetServerById(serverId, ServerPermissionType.ReadWrite); diff --git a/MoonlightServers.ApiServer/Mappers/AllocationMapper.cs b/MoonlightServers.ApiServer/Mappers/AllocationMapper.cs index 588afc5..a751110 100644 --- a/MoonlightServers.ApiServer/Mappers/AllocationMapper.cs +++ b/MoonlightServers.ApiServer/Mappers/AllocationMapper.cs @@ -10,5 +10,5 @@ public static partial class AllocationMapper { public static partial NodeAllocationResponse ToNodeAllocation(Allocation allocation); public static partial Allocation ToAllocation(CreateNodeAllocationRequest request); - public static partial Allocation Merge(UpdateNodeAllocationRequest request, Allocation allocation); + public static partial void Merge(UpdateNodeAllocationRequest request, Allocation allocation); } \ No newline at end of file diff --git a/MoonlightServers.ApiServer/Mappers/DockerImageMapper.cs b/MoonlightServers.ApiServer/Mappers/DockerImageMapper.cs index 8eaad00..0af7027 100644 --- a/MoonlightServers.ApiServer/Mappers/DockerImageMapper.cs +++ b/MoonlightServers.ApiServer/Mappers/DockerImageMapper.cs @@ -10,5 +10,5 @@ public static partial class DockerImageMapper { public static partial StarDockerImageDetailResponse ToAdminResponse(StarDockerImage dockerImage); public static partial StarDockerImage ToDockerImage(CreateStarDockerImageRequest request); - public static partial StarDockerImage Merge(UpdateStarDockerImageRequest request, StarDockerImage variable); + public static partial void Merge(UpdateStarDockerImageRequest request, StarDockerImage variable); } \ No newline at end of file diff --git a/MoonlightServers.ApiServer/Mappers/NodeMapper.cs b/MoonlightServers.ApiServer/Mappers/NodeMapper.cs index 046bcf8..bd0a5d4 100644 --- a/MoonlightServers.ApiServer/Mappers/NodeMapper.cs +++ b/MoonlightServers.ApiServer/Mappers/NodeMapper.cs @@ -10,5 +10,5 @@ public static partial class NodeMapper { public static partial NodeResponse ToAdminNodeResponse(Node node); public static partial Node ToNode(CreateNodeRequest request); - public static partial Node Merge(UpdateNodeRequest request, Node node); + public static partial void Merge(UpdateNodeRequest request, Node node); } \ No newline at end of file diff --git a/MoonlightServers.ApiServer/Mappers/ServerMapper.cs b/MoonlightServers.ApiServer/Mappers/ServerMapper.cs index 8a890a7..bc4241e 100644 --- a/MoonlightServers.ApiServer/Mappers/ServerMapper.cs +++ b/MoonlightServers.ApiServer/Mappers/ServerMapper.cs @@ -21,5 +21,5 @@ public static partial class ServerMapper private static partial ServerResponse ToAdminServerResponse_Internal(Server server); public static partial Server ToServer(CreateServerRequest request); - public static partial Server Merge(UpdateServerRequest request, Server server); + public static partial void Merge(UpdateServerRequest request, Server server); } \ No newline at end of file diff --git a/MoonlightServers.ApiServer/Mappers/StarMapper.cs b/MoonlightServers.ApiServer/Mappers/StarMapper.cs index 92d1009..9a61485 100644 --- a/MoonlightServers.ApiServer/Mappers/StarMapper.cs +++ b/MoonlightServers.ApiServer/Mappers/StarMapper.cs @@ -11,5 +11,5 @@ public static partial class StarMapper { public static partial StarDetailResponse ToAdminResponse(Star star); public static partial Star ToStar(CreateStarRequest request); - public static partial Star Merge(UpdateStarRequest request, Star star); + public static partial void Merge(UpdateStarRequest request, Star star); } \ No newline at end of file diff --git a/MoonlightServers.ApiServer/Mappers/StarVariableMapper.cs b/MoonlightServers.ApiServer/Mappers/StarVariableMapper.cs index b368787..6b16817 100644 --- a/MoonlightServers.ApiServer/Mappers/StarVariableMapper.cs +++ b/MoonlightServers.ApiServer/Mappers/StarVariableMapper.cs @@ -10,5 +10,5 @@ public static partial class StarVariableMapper { public static partial StarVariableDetailResponse ToAdminResponse(StarVariable variable); public static partial StarVariable ToStarVariable(CreateStarVariableRequest request); - public static partial StarVariable Merge(UpdateStarVariableRequest request, StarVariable variable); + public static partial void Merge(UpdateStarVariableRequest request, StarVariable variable); } \ No newline at end of file diff --git a/MoonlightServers.ApiServer/MoonlightServers.ApiServer.csproj b/MoonlightServers.ApiServer/MoonlightServers.ApiServer.csproj index de03d3d..50ceb26 100644 --- a/MoonlightServers.ApiServer/MoonlightServers.ApiServer.csproj +++ b/MoonlightServers.ApiServer/MoonlightServers.ApiServer.csproj @@ -47,4 +47,8 @@ + + <_ContentIncludedByDefault Remove="Properties\launchSettings.json" /> + + diff --git a/MoonlightServers.ApiServer/Services/ServerFileSystemService.cs b/MoonlightServers.ApiServer/Services/ServerFileSystemService.cs index 30fc0f3..5daee51 100644 --- a/MoonlightServers.ApiServer/Services/ServerFileSystemService.cs +++ b/MoonlightServers.ApiServer/Services/ServerFileSystemService.cs @@ -59,6 +59,15 @@ public class ServerFileSystemService $"api/servers/{server.Id}/files/mkdir?path={path}" ); } + + public async Task Touch(Server server, string path) + { + using var apiClient = await GetApiClient(server); + + await apiClient.Post( + $"api/servers/{server.Id}/files/touch?path={path}" + ); + } public async Task Compress(Server server, CompressType type, string[] items, string destination) { diff --git a/MoonlightServers.ApiServer/Startup/PluginStartup.cs b/MoonlightServers.ApiServer/Startup/PluginStartup.cs index e6de9d4..c3ba11f 100644 --- a/MoonlightServers.ApiServer/Startup/PluginStartup.cs +++ b/MoonlightServers.ApiServer/Startup/PluginStartup.cs @@ -35,11 +35,11 @@ public class PluginStartup : IPluginStartup { Scripts = [ - "js/XtermBlazor.min.js", - "js/addon-fit.js", - "js/moonlightServers.js" + "/_content/MoonlightServers.Frontend/js/XtermBlazor.min.js", + "/_content/MoonlightServers.Frontend/js/addon-fit.js", + "/_content/MoonlightServers.Frontend/js/moonlightServers.js" ], - Styles = ["css/XtermBlazor.min.css"] + Styles = ["/_content/MoonlightServers.Frontend/css/XtermBlazor.min.css"] }); } diff --git a/MoonlightServers.Daemon/Helpers/ServerFileSystem.cs b/MoonlightServers.Daemon/Helpers/ServerFileSystem.cs index 389a360..952be5f 100644 --- a/MoonlightServers.Daemon/Helpers/ServerFileSystem.cs +++ b/MoonlightServers.Daemon/Helpers/ServerFileSystem.cs @@ -30,12 +30,12 @@ public class ServerFileSystem // to hide the folder shown by virtual disk volumes if (string.IsNullOrEmpty(inputPath) || inputPath == "/") entryQuery = entryQuery.Where(x => x.Name != "lost+found"); - + var result = entryQuery .Select(x => new ServerFileSystemResponse() { Name = x.Name, - IsFile = x.IsFile, + IsFolder = x.IsDirectory, Size = x.Size, UpdatedAt = x.LastChanged, CreatedAt = x.CreatedAt @@ -73,6 +73,24 @@ public class ServerFileSystem return Task.CompletedTask; } + public Task Touch(string inputPath) + { + var path = Normalize(inputPath); + + var parentDirectory = Path.GetDirectoryName(path); + + if (!string.IsNullOrEmpty(parentDirectory) && parentDirectory != "/") + FileSystem.MkdirAll(parentDirectory, FilePermissions.ACCESSPERMS); + + FileSystem.OpenFileWrite( + path, + _ => { }, + OpenFlags.O_CREAT + ); // We use these custom flags to ensure we aren't overwriting the file + + return Task.CompletedTask; + } + public Task CreateChunk(string inputPath, long totalSize, long positionToSkip, Stream chunkStream) { var path = Normalize(inputPath); @@ -81,14 +99,14 @@ public class ServerFileSystem if (!string.IsNullOrEmpty(parentDirectory) && parentDirectory != "/") FileSystem.MkdirAll(parentDirectory, FilePermissions.ACCESSPERMS); - + FileSystem.OpenFileWrite(path, fileStream => { if (fileStream.Length != totalSize) fileStream.SetLength(totalSize); fileStream.Position = positionToSkip; - + chunkStream.CopyTo(fileStream); fileStream.Flush(); }, OpenFlags.O_CREAT | OpenFlags.O_RDWR); // We use these custom flags to ensure we aren't overwriting the file @@ -183,7 +201,7 @@ public class ServerFileSystem FileSystem.OpenFileRead(path, fileStream => { var zipInputStream = new ZipInputStream(fileStream); - + ExtractZip(zipInputStream, destination); }); } @@ -193,11 +211,11 @@ public class ServerFileSystem { var gzInputStream = new GZipInputStream(fileStream); var zipInputStream = new TarInputStream(gzInputStream, Encoding.UTF8); - + ExtractTar(zipInputStream, destination); }); } - + return Task.CompletedTask; } @@ -259,10 +277,7 @@ public class ServerFileSystem outputStream.PutNextEntry(entry); - FileSystem.OpenFileRead(path, stream => - { - stream.CopyTo(outputStream); - }); + FileSystem.OpenFileRead(path, stream => { stream.CopyTo(outputStream); }); outputStream.CloseEntry(); } @@ -273,54 +288,54 @@ public class ServerFileSystem while (true) { var entry = inputStream.GetNextEntry(); - - if(entry == null) + + if (entry == null) break; - - if(entry.IsDirectory) + + if (entry.IsDirectory) continue; var fileDestination = Path.Combine(destination, entry.Name); - + var parentDirectory = Path.GetDirectoryName(fileDestination); if (!string.IsNullOrEmpty(parentDirectory) && parentDirectory != "/") FileSystem.MkdirAll(parentDirectory, FilePermissions.ACCESSPERMS); - + FileSystem.OpenFileWrite(fileDestination, stream => { stream.Position = 0; - + inputStream.CopyTo(stream); stream.Flush(); }); // This will override the file if it exists } } - + private void ExtractTar(TarInputStream inputStream, string destination) { while (true) { var entry = inputStream.GetNextEntry(); - - if(entry == null) + + if (entry == null) break; - - if(entry.IsDirectory) + + if (entry.IsDirectory) continue; var fileDestination = Path.Combine(destination, entry.Name); - + var parentDirectory = Path.GetDirectoryName(fileDestination); if (!string.IsNullOrEmpty(parentDirectory) && parentDirectory != "/") FileSystem.MkdirAll(parentDirectory, FilePermissions.ACCESSPERMS); - + FileSystem.OpenFileWrite(fileDestination, stream => { stream.Position = 0; - + inputStream.CopyTo(stream); stream.Flush(); diff --git a/MoonlightServers.Daemon/Http/Controllers/Servers/ServerFileSystemController.cs b/MoonlightServers.Daemon/Http/Controllers/Servers/ServerFileSystemController.cs index ae4be8b..8c7d5e2 100644 --- a/MoonlightServers.Daemon/Http/Controllers/Servers/ServerFileSystemController.cs +++ b/MoonlightServers.Daemon/Http/Controllers/Servers/ServerFileSystemController.cs @@ -11,7 +11,7 @@ namespace MoonlightServers.Daemon.Http.Controllers.Servers; [Authorize] [ApiController] -[Route("api/servers")] +[Route("api/servers/{id:int}/files")] public class ServerFileSystemController : Controller { private readonly ServerService ServerService; @@ -21,7 +21,7 @@ public class ServerFileSystemController : Controller ServerService = serverService; } - [HttpGet("{id:int}/files/list")] + [HttpGet("list")] public async Task List([FromRoute] int id, [FromQuery] string path = "") { var fileSystem = await GetFileSystemById(id); @@ -29,7 +29,7 @@ public class ServerFileSystemController : Controller return await fileSystem.List(path); } - [HttpPost("{id:int}/files/move")] + [HttpPost("move")] public async Task Move([FromRoute] int id, [FromQuery] string oldPath, [FromQuery] string newPath) { var fileSystem = await GetFileSystemById(id); @@ -37,7 +37,7 @@ public class ServerFileSystemController : Controller await fileSystem.Move(oldPath, newPath); } - [HttpDelete("{id:int}/files/delete")] + [HttpDelete("delete")] public async Task Delete([FromRoute] int id, [FromQuery] string path) { var fileSystem = await GetFileSystemById(id); @@ -45,15 +45,23 @@ public class ServerFileSystemController : Controller await fileSystem.Delete(path); } - [HttpPost("{id:int}/files/mkdir")] + [HttpPost("mkdir")] public async Task Mkdir([FromRoute] int id, [FromQuery] string path) { var fileSystem = await GetFileSystemById(id); await fileSystem.Mkdir(path); } + + [HttpPost("touch")] + public async Task Touch([FromRoute] int id, [FromQuery] string path) + { + var fileSystem = await GetFileSystemById(id); - [HttpPost("{id:int}/files/compress")] + await fileSystem.Touch(path); + } + + [HttpPost("compress")] public async Task Compress([FromRoute] int id, [FromBody] ServerFilesCompressRequest request) { var fileSystem = await GetFileSystemById(id); @@ -65,7 +73,7 @@ public class ServerFileSystemController : Controller ); } - [HttpPost("{id:int}/files/decompress")] + [HttpPost("decompress")] public async Task Decompress([FromRoute] int id, [FromBody] ServerFilesDecompressRequest request) { var fileSystem = await GetFileSystemById(id); diff --git a/MoonlightServers.DaemonShared/DaemonSide/Http/Responses/Servers/ServerFileSystemResponse.cs b/MoonlightServers.DaemonShared/DaemonSide/Http/Responses/Servers/ServerFileSystemResponse.cs index 8126590..d6ebd02 100644 --- a/MoonlightServers.DaemonShared/DaemonSide/Http/Responses/Servers/ServerFileSystemResponse.cs +++ b/MoonlightServers.DaemonShared/DaemonSide/Http/Responses/Servers/ServerFileSystemResponse.cs @@ -3,7 +3,7 @@ namespace MoonlightServers.DaemonShared.DaemonSide.Http.Responses.Servers; public class ServerFileSystemResponse { public string Name { get; set; } - public bool IsFile { get; set; } + public bool IsFolder { get; set; } public long Size { get; set; } public DateTime CreatedAt { get; set; } diff --git a/MoonlightServers.Frontend.Runtime/MoonlightServers.Frontend.Runtime.csproj b/MoonlightServers.Frontend.Runtime/MoonlightServers.Frontend.Runtime.csproj index a21e3f5..00bc28e 100644 --- a/MoonlightServers.Frontend.Runtime/MoonlightServers.Frontend.Runtime.csproj +++ b/MoonlightServers.Frontend.Runtime/MoonlightServers.Frontend.Runtime.csproj @@ -7,9 +7,10 @@ + + - diff --git a/MoonlightServers.Frontend.Runtime/Styles/extract-classes.js b/MoonlightServers.Frontend.Runtime/Styles/extract-classes.js new file mode 100644 index 0000000..2bae324 --- /dev/null +++ b/MoonlightServers.Frontend.Runtime/Styles/extract-classes.js @@ -0,0 +1,30 @@ +// extract-classes.js +const fs = require('fs'); + +module.exports = (opts = {}) => { + const classSet = new Set(); + + return { + postcssPlugin: 'extract-tailwind-classes', + Rule(rule) { + const selectorParser = require('postcss-selector-parser'); + selectorParser(selectors => { + selectors.walkClasses(node => { + classSet.add(node.value); + }); + }).processSync(rule.selector); + }, + OnceExit() { + const classArray = Array.from(classSet).sort(); + + if (!fs.existsSync("../../MoonlightServers.Frontend/Styles/mappings")){ + fs.mkdirSync("../../MoonlightServers.Frontend/Styles/mappings"); + } + + fs.writeFileSync('../../MoonlightServers.Frontend/mappings/classes.map', classArray.join('\n')); + console.log(`✅ Extracted ${classArray.length} Tailwind classes to tailwind-classes.txt`); + } + }; +}; + +module.exports.postcss = true; \ No newline at end of file diff --git a/MoonlightServers.Frontend.Runtime/Styles/package-lock.json b/MoonlightServers.Frontend.Runtime/Styles/package-lock.json new file mode 100644 index 0000000..5fedb79 --- /dev/null +++ b/MoonlightServers.Frontend.Runtime/Styles/package-lock.json @@ -0,0 +1,1347 @@ +{ + "name": "styles", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "styles", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@tailwindcss/postcss": "^4.1.11", + "flyonui": "^2.2.0", + "postcss": "^8.5.6", + "postcss-cli": "^11.0.1", + "postcss-selector-parser": "^7.1.0", + "tailwindcss": "^4.1.11" + }, + "devDependencies": {} + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.2.tgz", + "integrity": "sha512-wNB5ooIKHQc+Kui96jE/n69rHFWAVoxn5CAzL1Xdd8FG03cgY3MLO+GF9U3W737fYDSgPWA6MReKhBQBop6Pcw==", + "dependencies": { + "@floating-ui/utils": "^0.2.10" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.2.tgz", + "integrity": "sha512-7cfaOQuCS27HD7DX+6ib2OrnW+b4ZBwDNnCcT0uTyidcmyWb03FnQqJybDBoCnpdxwBSfA94UAYlRCt7mV+TbA==", + "dependencies": { + "@floating-ui/core": "^1.7.2", + "@floating-ui/utils": "^0.2.10" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", + "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==" + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.11.tgz", + "integrity": "sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "enhanced-resolve": "^5.18.1", + "jiti": "^2.4.2", + "lightningcss": "1.30.1", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.11" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.11.tgz", + "integrity": "sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==", + "hasInstallScript": true, + "dependencies": { + "detect-libc": "^2.0.4", + "tar": "^7.4.3" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.11", + "@tailwindcss/oxide-darwin-arm64": "4.1.11", + "@tailwindcss/oxide-darwin-x64": "4.1.11", + "@tailwindcss/oxide-freebsd-x64": "4.1.11", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.11", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.11", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-x64-musl": "4.1.11", + "@tailwindcss/oxide-wasm32-wasi": "4.1.11", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.11", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.11" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.11.tgz", + "integrity": "sha512-3IfFuATVRUMZZprEIx9OGDjG3Ou3jG4xQzNTvjDoKmU9JdmoCohQJ83MYd0GPnQIu89YoJqvMM0G3uqLRFtetg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.11.tgz", + "integrity": "sha512-ESgStEOEsyg8J5YcMb1xl8WFOXfeBmrhAwGsFxxB2CxY9evy63+AtpbDLAyRkJnxLy2WsD1qF13E97uQyP1lfQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.11.tgz", + "integrity": "sha512-EgnK8kRchgmgzG6jE10UQNaH9Mwi2n+yw1jWmof9Vyg2lpKNX2ioe7CJdf9M5f8V9uaQxInenZkOxnTVL3fhAw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.11.tgz", + "integrity": "sha512-xdqKtbpHs7pQhIKmqVpxStnY1skuNh4CtbcyOHeX1YBE0hArj2romsFGb6yUmzkq/6M24nkxDqU8GYrKrz+UcA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.11.tgz", + "integrity": "sha512-ryHQK2eyDYYMwB5wZL46uoxz2zzDZsFBwfjssgB7pzytAeCCa6glsiJGjhTEddq/4OsIjsLNMAiMlHNYnkEEeg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.11.tgz", + "integrity": "sha512-mYwqheq4BXF83j/w75ewkPJmPZIqqP1nhoghS9D57CLjsh3Nfq0m4ftTotRYtGnZd3eCztgbSPJ9QhfC91gDZQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.11.tgz", + "integrity": "sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.11.tgz", + "integrity": "sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.11.tgz", + "integrity": "sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.11.tgz", + "integrity": "sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@emnapi/wasi-threads": "^1.0.2", + "@napi-rs/wasm-runtime": "^0.2.11", + "@tybys/wasm-util": "^0.9.0", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.11.tgz", + "integrity": "sha512-UgKYx5PwEKrac3GPNPf6HVMNhUIGuUh4wlDFR2jYYdkX6pL/rn73zTq/4pzUm8fOjAn5L8zDeHp9iXmUGOXZ+w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.11.tgz", + "integrity": "sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/postcss": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.11.tgz", + "integrity": "sha512-q/EAIIpF6WpLhKEuQSEVMZNMIY8KhWoAemZ9eylNAih9jxMGAYPPWBn3I9QL/2jZ+e7OEz/tZkX5HwbBR4HohA==", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "@tailwindcss/node": "4.1.11", + "@tailwindcss/oxide": "4.1.11", + "postcss": "^8.4.41", + "tailwindcss": "4.1.11" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "engines": { + "node": ">=18" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/dependency-graph": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-1.0.0.tgz", + "integrity": "sha512-cW3gggJ28HZ/LExwxP2B++aiKxhJXMSIt9K48FOXQkm+vuG5gyatXnLsONRJdzO/7VfjDIiaOOa/bs4l464Lwg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/enhanced-resolve": { + "version": "5.18.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", + "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flyonui": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/flyonui/-/flyonui-2.2.0.tgz", + "integrity": "sha512-Gncal89zwklAYpqV8IjSgN/1edsXnbTlxhfKRcYa2WgeY8jBSuoNBQWqdL1DSLuXarxYluimwIv34YaRKNuSzg==", + "dependencies": { + "@floating-ui/dom": "^1.6.13" + } + }, + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lightningcss": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", + "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.30.1", + "lightningcss-darwin-x64": "1.30.1", + "lightningcss-freebsd-x64": "1.30.1", + "lightningcss-linux-arm-gnueabihf": "1.30.1", + "lightningcss-linux-arm64-gnu": "1.30.1", + "lightningcss-linux-arm64-musl": "1.30.1", + "lightningcss-linux-x64-gnu": "1.30.1", + "lightningcss-linux-x64-musl": "1.30.1", + "lightningcss-win32-arm64-msvc": "1.30.1", + "lightningcss-win32-x64-msvc": "1.30.1" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.1.tgz", + "integrity": "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.1.tgz", + "integrity": "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.1.tgz", + "integrity": "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.1.tgz", + "integrity": "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.1.tgz", + "integrity": "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.1.tgz", + "integrity": "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.1.tgz", + "integrity": "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.1.tgz", + "integrity": "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.1.tgz", + "integrity": "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.1.tgz", + "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-cli": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-11.0.1.tgz", + "integrity": "sha512-0UnkNPSayHKRe/tc2YGW6XnSqqOA9eqpiRMgRlV1S6HdGi16vwJBx7lviARzbV1HpQHqLLRH3o8vTcB0cLc+5g==", + "dependencies": { + "chokidar": "^3.3.0", + "dependency-graph": "^1.0.0", + "fs-extra": "^11.0.0", + "picocolors": "^1.0.0", + "postcss-load-config": "^5.0.0", + "postcss-reporter": "^7.0.0", + "pretty-hrtime": "^1.0.3", + "read-cache": "^1.0.0", + "slash": "^5.0.0", + "tinyglobby": "^0.2.12", + "yargs": "^17.0.0" + }, + "bin": { + "postcss": "index.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-load-config": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-5.1.0.tgz", + "integrity": "sha512-G5AJ+IX0aD0dygOE0yFZQ/huFFMSNneyfp0e3/bT05a8OfPC5FUoZRPfGijUdGOJNMewJiwzcHJXFafFzeKFVA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.1.1", + "yaml": "^2.4.2" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + } + } + }, + "node_modules/postcss-reporter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-7.1.0.tgz", + "integrity": "sha512-/eoEylGWyy6/DOiMP5lmFRdmDKThqgn7D6hP2dXKJI/0rJSO1ADFNngZfDzxL0YAxFvws+Rtpuji1YIHj4mySA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "picocolors": "^1.0.0", + "thenby": "^1.3.4" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tailwindcss": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.11.tgz", + "integrity": "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==" + }, + "node_modules/tapable": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/thenby": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz", + "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "engines": { + "node": ">=18" + } + }, + "node_modules/yaml": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/MoonlightServers.Frontend.Runtime/Styles/package.json b/MoonlightServers.Frontend.Runtime/Styles/package.json new file mode 100644 index 0000000..d528236 --- /dev/null +++ b/MoonlightServers.Frontend.Runtime/Styles/package.json @@ -0,0 +1,23 @@ +{ + "name": "styles", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "tailwind": "npx postcss styles.css -o ../wwwroot/css/style.min.css --watch", + "tailwind-build": "npx postcss styles.css -o ../wwwroot/css/style.min.css", + "mappings": "EXTRACT_CLASSES=true npx postcss styles.css -o ../wwwroot/css/style.min.css " + }, + "author": "", + "license": "ISC", + "dependencies": { + "@tailwindcss/postcss": "^4.1.11", + "flyonui": "^2.2.0", + "tailwindcss": "^4.1.11", + "postcss": "^8.5.6", + "postcss-cli": "^11.0.1", + "postcss-selector-parser": "^7.1.0" + }, + "devDependencies": { + } +} diff --git a/MoonlightServers.Frontend.Runtime/Styles/postcss.config.js b/MoonlightServers.Frontend.Runtime/Styles/postcss.config.js new file mode 100644 index 0000000..82078a3 --- /dev/null +++ b/MoonlightServers.Frontend.Runtime/Styles/postcss.config.js @@ -0,0 +1,11 @@ +const tailwindcss = require('@tailwindcss/postcss'); +const extractClasses = require('./extract-classes'); + +module.exports = { + plugins: [ + tailwindcss + ], +}; + +if(process.env.EXTRACT_CLASSES === "true") + module.exports.plugins.push(extractClasses); \ No newline at end of file diff --git a/MoonlightServers.Frontend.Runtime/Styles/styles.css b/MoonlightServers.Frontend.Runtime/Styles/styles.css new file mode 100644 index 0000000..f3c834c --- /dev/null +++ b/MoonlightServers.Frontend.Runtime/Styles/styles.css @@ -0,0 +1,113 @@ +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=fallback') layer(base); +@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap') layer(base); +@import url("https://cdn.jsdelivr.net/npm/lucide-static/font/lucide.css") layer(base); + +@import "tailwindcss"; +@import "./node_modules/flyonui/variants.css"; +@import "./theme.css"; + +@theme { + --font-inter: "Inter", var(--font-sans); + --font-scp: "Source Code Pro", var(--font-mono); + + --color-background: var(--mooncore-color-background); + --color-base-150: var(--mooncore-color-base-150); + --color-base-250: var(--mooncore-color-base-250); +} + +@plugin "flyonui" { + themes: mooncore --default; +} + +@source "./node_modules/flyonui/dist/index.js"; + +@source "../**/*.razor"; +@source "../**/*.cs"; +@source "../**/*.html"; +@source "./mappings/*.map"; + +@source "../../MoonlightServers.Frontend/**/*.cs"; +@source "../../MoonlightServers.Frontend/**/*.html"; +@source "../../MoonlightServers.Frontend/**/*.razor"; +@source "../../MoonlightServers.Frontend/Styles/**/*.map"; + +@source "../../MoonlightServers.ApiServer/**/*.razor"; + +#blazor-error-ui { + display: none; +} + +#blazor-loader-label:after { + content: var(--blazor-load-percentage-text, "Loading"); +} + +#blazor-loader-progress { + width: var(--blazor-load-percentage, 0%); +} + +@plugin "flyonui/theme" { + name: "mooncore"; + default: true; + prefersdark: true; + color-scheme: "dark"; + --color-base-100: var(--mooncore-color-base-100); + --color-base-200: var(--mooncore-color-base-200); + --color-base-300: var(--mooncore-color-base-300); + --color-base-content: var(--mooncore-color-base-content); + --color-primary: var(--mooncore-color-primary); + --color-primary-content: var(--mooncore-color-primary-content); + --color-secondary: var(--mooncore-color-secondary); + --color-secondary-content: var(--mooncore-color-secondary-content); + --color-accent: var(--mooncore-color-accent); + --color-accent-content: var(--mooncore-color-accent-content); + --color-neutral: var(--mooncore-color-neutral); + --color-neutral-content: var(--mooncore-color-neutral-content); + --color-info: var(--mooncore-color-info); + --color-info-content: var(--mooncore-color-info-content); + --color-success: var(--mooncore-color-success); + --color-success-content: var(--mooncore-color-success-content); + --color-warning: var(--mooncore-color-warning); + --color-warning-content: var(--mooncore-color-warning-content); + --color-error: var(--mooncore-color-error); + --color-error-content: var(--mooncore-color-error-content); + --radius-selector: var(--mooncore-radius-selector); + --radius-field: var(--mooncore-radius-field); + --radius-box: var(--mooncore-radius-box); + --size-selector: var(--mooncore-size-selector); + --size-field: var(--mooncore-size-field); + --border: var(--mooncore-border); + --depth: var(--mooncore-depth); + --noise: var(--mooncore-noise); +} + +@layer utilities { + .btn { + @apply text-sm font-medium inline-flex items-center justify-center; + } + + .checkbox { + @apply border-base-content/30 bg-base-100; + } + + .input { + @apply !border-base-content/20 border-2 ring-0! outline-0! focus:border-primary! focus-within:border-primary! bg-base-200/50; + } + + .advance-select-toggle { + @apply !border-base-content/20 border-2 ring-0! outline-0! focus:border-primary! focus-within:border-primary! bg-base-200/50; + } + + .table { + :where(th, td) { + @apply py-1.5; + } + } + + .dropdown-item { + @apply px-2.5 py-1.5 text-sm; + } + + .dropdown-menu { + @apply bg-base-150; + } +} \ No newline at end of file diff --git a/MoonlightServers.Frontend.Runtime/Styles/theme.css b/MoonlightServers.Frontend.Runtime/Styles/theme.css new file mode 100644 index 0000000..4401a5f --- /dev/null +++ b/MoonlightServers.Frontend.Runtime/Styles/theme.css @@ -0,0 +1,33 @@ +@theme { + --mooncore-color-background: #0c0f18; + --mooncore-color-base-100: #1e2b47; + --mooncore-color-base-150: #1a2640; + --mooncore-color-base-200: #101a2e; + --mooncore-color-base-250: #0f1729; + --mooncore-color-base-300: #0c1221; + --mooncore-color-base-content: #dde5f5; + --mooncore-color-primary: oklch(.511 .262 276.966); + --mooncore-color-primary-content: #dde5f5; + --mooncore-color-secondary: oklch(37% 0.034 259.733); + --mooncore-color-secondary-content: #dde5f5; + --mooncore-color-accent: oklch(.627 .265 303.9); + --mooncore-color-accent-content: #dde5f5; + --mooncore-color-neutral: #dde5f5; + --mooncore-color-neutral-content: oklch(14% 0.005 285.823); + --mooncore-color-info: oklch(.546 .245 262.881); + --mooncore-color-info-content: #dde5f5; + --mooncore-color-success: oklch(.627 .194 149.214); + --mooncore-color-success-content: #dde5f5; + --mooncore-color-warning: oklch(.828 .189 84.429); + --mooncore-color-warning-content: #dde5f5; + --mooncore-color-error: oklch(.586 .253 17.585); + --mooncore-color-error-content: #dde5f5; + --mooncore-radius-selector: 0.25rem; + --mooncore-radius-field: 0.5rem; + --mooncore-radius-box: 0.5rem; + --mooncore-size-selector: 0.25rem; + --mooncore-size-field: 0.25rem; + --mooncore-border: 1px; + --mooncore-depth: 0; + --mooncore-noise: 0; +} \ No newline at end of file diff --git a/MoonlightServers.Frontend/Helpers/ServerFileSystemProvider.cs b/MoonlightServers.Frontend/Helpers/ServerFileSystemProvider.cs index f188bf2..10357df 100644 --- a/MoonlightServers.Frontend/Helpers/ServerFileSystemProvider.cs +++ b/MoonlightServers.Frontend/Helpers/ServerFileSystemProvider.cs @@ -1,8 +1,6 @@ +/* using System.IO.Enumeration; using MoonCore.Blazor.FlyonUi.Helpers; -using MoonCore.Blazor.Tailwind.Fm; -using MoonCore.Blazor.Tailwind.Fm.Models; -using MoonCore.Blazor.Tailwind.Services; using MoonCore.Helpers; using MoonlightServers.Frontend.Services; @@ -146,4 +144,4 @@ public class ServerFileSystemProvider : IFileSystemProvider, ICompressFileSystem destination ); } -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/MoonlightServers.Frontend/Helpers/ServerFsAccess.cs b/MoonlightServers.Frontend/Helpers/ServerFsAccess.cs new file mode 100644 index 0000000..3cbe3d6 --- /dev/null +++ b/MoonlightServers.Frontend/Helpers/ServerFsAccess.cs @@ -0,0 +1,63 @@ +using MoonCore.Blazor.FlyonUi.Files; +using MoonCore.Blazor.FlyonUi.Files.Manager; +using MoonlightServers.Frontend.Services; + +namespace MoonlightServers.Frontend.Helpers; + +public class ServerFsAccess : IFsAccess +{ + private readonly int Id; + private readonly ServerFileSystemService FileSystemService; + + public ServerFsAccess(int id, ServerFileSystemService fileSystemService) + { + Id = id; + FileSystemService = fileSystemService; + } + + public Task CreateFile(string path) + => FileSystemService.Touch(Id, path); + + public Task CreateDirectory(string path) + => FileSystemService.Mkdir(Id, path); + + public async Task List(string path) + { + var entries = await FileSystemService.List(Id, path); + + return entries.Select(x => new FsEntry() + { + Name = x.Name, + Size = x.Size, + CreatedAt = x.CreatedAt, + IsFolder = x.IsFolder, + UpdatedAt = x.UpdatedAt + }).ToArray(); + } + + public Task Move(string oldPath, string newPath) + => FileSystemService.Move(Id, oldPath, newPath); + + public Task Read(string path, Func onHandleData) + { + throw new NotImplementedException(); + } + + public Task Write(string path, Stream dataStream) + { + throw new NotImplementedException(); + } + + public Task Delete(string path) + => FileSystemService.Delete(Id, path); + + public Task UploadChunk(string path, int chunkId, long chunkSize, long totalSize, byte[] data) + { + throw new NotImplementedException(); + } + + public Task DownloadChunk(string path, int chunkId, long chunkSize) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/MoonlightServers.Frontend/MoonlightServers.Frontend.csproj b/MoonlightServers.Frontend/MoonlightServers.Frontend.csproj index e5ba353..370781b 100644 --- a/MoonlightServers.Frontend/MoonlightServers.Frontend.csproj +++ b/MoonlightServers.Frontend/MoonlightServers.Frontend.csproj @@ -1,4 +1,4 @@ - + net9.0 @@ -16,21 +16,11 @@ - - - <_ContentIncludedByDefault Remove="wwwroot\css\app.css"/> - <_ContentIncludedByDefault Remove="Pages\Home.razor"/> - - - - - - @@ -57,4 +47,8 @@ + + + + diff --git a/MoonlightServers.Frontend/Program.cs b/MoonlightServers.Frontend/Program.cs deleted file mode 100644 index 6f19c1a..0000000 --- a/MoonlightServers.Frontend/Program.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Moonlight.Client; -using Moonlight.Client.Startup; -using MoonlightServers.Frontend.Startup; - -// Development Client Startup - -// This file is a small helper for development instances for moonlight. -// It calls the moonlight startup with the current project loaded as a plugin. -// This allows you to develop and debug projects without any hassle - -// !!! DO NOT HARDCORE ANY SECRETS HERE !!! - -var startup = new Startup(); - -await startup.Run(args, [ - new PluginStartup() -]); \ No newline at end of file diff --git a/MoonlightServers.Frontend/Services/ServerFileSystemService.cs b/MoonlightServers.Frontend/Services/ServerFileSystemService.cs index cb6f0d2..dc0cbcc 100644 --- a/MoonlightServers.Frontend/Services/ServerFileSystemService.cs +++ b/MoonlightServers.Frontend/Services/ServerFileSystemService.cs @@ -43,6 +43,13 @@ public class ServerFileSystemService $"api/client/servers/{serverId}/files/mkdir?path={path}" ); } + + public async Task Touch(int serverId, string path) + { + await ApiClient.Post( + $"api/client/servers/{serverId}/files/touch?path={path}" + ); + } public async Task Upload(int serverId) { diff --git a/MoonlightServers.Frontend/Startup/PluginStartup.cs b/MoonlightServers.Frontend/Startup/PluginStartup.cs index eabd632..f228d4f 100644 --- a/MoonlightServers.Frontend/Startup/PluginStartup.cs +++ b/MoonlightServers.Frontend/Startup/PluginStartup.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Components.WebAssembly.Hosting; +using Microsoft.Extensions.DependencyInjection; using MoonCore.Extensions; using Moonlight.Client.Interfaces; using Moonlight.Client.Plugins; @@ -7,7 +8,6 @@ using MoonlightServers.Frontend.Interfaces; namespace MoonlightServers.Frontend.Startup; -[PluginStartup] public class PluginStartup : IPluginStartup { public Task BuildApplication(IServiceProvider serviceProvider, WebAssemblyHostBuilder builder) diff --git a/MoonlightServers.Frontend/Styles/Moonlight.Client/classes.map b/MoonlightServers.Frontend/Styles/Moonlight.Client/classes.map new file mode 100755 index 0000000..99c34ee --- /dev/null +++ b/MoonlightServers.Frontend/Styles/Moonlight.Client/classes.map @@ -0,0 +1,612 @@ +!bg-base-100 +!border-base-content/40 +!border-none +!flex +!font-medium +!font-semibold +!h-2.5 +!justify-between +!me-1.5 +!ms-auto +!px-2.5 +!rounded-full +!text-sm +!w-2.5 +*:[grid-area:1/1] +*:first:rounded-tl-lg +*:last:rounded-tr-lg +-left-4 +-ml-4 +-translate-x-full +-translate-y-1/2 +absolute +accordion +accordion-bordered +accordion-toggle +active +active-tab:bg-primary +active-tab:text-base-content +advance-select-menu +advance-select-option +advance-select-tag +advance-select-toggle +alert +alert-error +alert-outline +alert-soft +align-bottom +align-middle +animate-bounce +animate-ping +aria-[current='page']:text-bg-soft-primary +avatar +avatar-away-bottom +avatar-away-top +avatar-busy-bottom +avatar-busy-top +avatar-offline-bottom +avatar-offline-top +avatar-online-bottom +avatar-online-top +avatar-placeholder +badge +badge-error +badge-info +badge-outline +badge-primary +badge-soft +badge-success +bg-background +bg-background/60 +bg-base-100 +bg-base-150 +bg-base-200 +bg-base-200/50 +bg-base-300 +bg-base-300/45 +bg-base-300/50 +bg-base-300/60 +bg-clip-text +bg-error +bg-gradient-to-r +bg-gray-800 +bg-gray-900 +bg-indigo-600 +bg-info +bg-primary +bg-primary/5 +bg-red-500 +bg-success +bg-transparent +bg-warning +bg-white/5 +block +blur +border +border-0 +border-2 +border-accent +border-b +border-base-content +border-base-content/20 +border-base-content/40 +border-base-content/5 +border-base-content/70 +border-dashed +border-l-4 +border-primary +border-success +border-t +border-transparent +bottom-0 +bottom-full +break-words +btn +btn-accent +btn-active +btn-circle +btn-disabled +btn-error +btn-gradient +btn-info +btn-outline +btn-primary +btn-secondary +btn-sm +btn-soft +btn-square +btn-success +btn-text +btn-warning +card +card-alert +card-body +card-border +card-footer +card-header +card-title +carousel +carousel-body +carousel-next +carousel-prev +carousel-slide +chat +chat-avatar +chat-bubble +chat-footer +chat-header +chat-receiver +chat-sender +checkbox +checkbox-primary +checkbox-xs +col-span-1 +col-span-12 +col-span-2 +collapse +combo-box-selected:block +combo-box-selected:dropdown-active +complete +container +contents +cursor-default +cursor-not-allowed +cursor-pointer +diff +disabled +divide-base-150/60 +divide-y +drop-shadow +dropdown +dropdown-disabled +dropdown-item +dropdown-menu +dropdown-open:opacity-100 +dropdown-open:rotate-180 +dropdown-toggle +duration-300 +duration-500 +ease-in-out +ease-linear +end-3 +error-message +file-upload-complete:progress-success +fill-black +filter +filter-reset +fixed +flex +flex-1 +flex-col +flex-grow +flex-nowrap +flex-row +flex-shrink-0 +flex-wrap +focus-visible:outline +focus-visible:outline-2 +focus-visible:outline-indigo-600 +focus-visible:outline-none +focus-visible:outline-offset-2 +focus-within:border-primary +focus:border-primary +focus:outline-1 +focus:outline-none +focus:outline-primary +focus:ring-0 +focus:ring-2 +focus:ring-indigo-600 +focus:ring-inset +font-bold +font-inter +font-medium +font-normal +font-semibold +from-violet-400 +gap-0.5 +gap-1 +gap-1.5 +gap-2 +gap-3 +gap-4 +gap-5 +gap-6 +gap-x-1 +gap-x-2 +gap-x-3 +gap-x-6 +gap-y-1 +gap-y-2 +gap-y-3 +gap-y-8 +grid +grid-cols-1 +grid-cols-12 +grid-cols-2 +grid-flow-col +grow +grow-0 +h-12 +h-14 +h-2 +h-3 +h-32 +h-64 +h-8 +h-auto +h-full +h-screen +helper-text +hidden +hover:bg-indigo-500 +hover:bg-primary/5 +hover:bg-transparent +hover:text-base-content +hover:text-base-content/60 +hover:text-indigo-500 +hover:text-primary +image-full +inline +inline-block +inline-flex +inline-grid +input +input-floating +input-floating-label +input-lg +input-md +input-sm +input-xl +input-xs +inset-0 +inset-y-0 +inset-y-2 +invisible +is-invalid +is-valid +isolate +italic +items-center +items-end +items-start +join +join-item +justify-between +justify-center +justify-end +justify-start +justify-stretch +label-text +leading-3 +leading-3.5 +leading-6 +leading-9 +leading-[1.1] +left-0 +lg:bg-base-100/20 +lg:flex +lg:gap-y-0 +lg:grid-cols-2 +lg:hidden +lg:justify-end +lg:justify-start +lg:min-w-0 +lg:p-10 +lg:pb-5 +lg:pl-64 +lg:pr-3.5 +lg:pt-5 +lg:px-8 +lg:ring-1 +lg:ring-base-content/10 +lg:rounded-lg +lg:shadow-xs +list-disc +list-inside +loading +loading-lg +loading-sm +loading-spinner +loading-xl +loading-xs +lowercase +m-10 +mask +max-lg:flex-col +max-lg:hidden +max-w-7xl +max-w-80 +max-w-full +max-w-lg +max-w-md +max-w-sm +max-w-xl +mb-0.5 +mb-1 +mb-2 +mb-3 +mb-4 +mb-5 +mb-8 +md:col-span-1 +md:col-span-6 +md:grid-cols-2 +md:min-w-md +md:table-cell +md:text-3xl +me-1 +me-1.5 +me-2 +me-5 +menu +menu-active +menu-disabled +menu-dropdown +menu-dropdown-show +menu-focus +menu-horizontal +menu-title +min-h-0 +min-h-full +min-h-svh +min-w-0 +min-w-28 +min-w-48 +min-w-60 +min-w-[100px] +min-w-sm +mix-blend-exclusion +ml-3 +ml-4 +modal +modal-content +modal-dialog +modal-middle +modal-title +mr-2 +mr-4 +ms-1 +ms-2 +ms-3 +mt-1 +mt-1.5 +mt-10 +mt-12 +mt-2 +mt-2.5 +mt-3 +mt-4 +mt-5 +mt-6 +mt-8 +mx-1 +mx-auto +my-3 +my-5 +my-auto +opacity-0 +opacity-100 +open +origin-top-left +outline +outline-0 +overflow-hidden +overflow-x-auto +overflow-y-auto +overlay-open:duration-50 +overlay-open:opacity-100 +p-0.5 +p-1 +p-2 +p-3 +p-4 +p-5 +p-6 +p-8 +pin-input +pin-input-underline +placeholder-base-content/60 +placeholder:text-gray-600 +pointer-events-auto +pointer-events-none +progress +progress-bar +progress-indeterminate +progress-primary +pt-0.5 +pt-3 +px-1.5 +px-2 +px-3 +px-4 +px-5 +px-6 +py-0.5 +py-1.5 +py-12 +py-2 +py-2.5 +py-6 +radio +range +relative +resize +ring-0 +ring-1 +ring-gray-700 +ring-inset +ring-white/10 +rounded-box +rounded-field +rounded-full +rounded-lg +rounded-md +rounded-t-lg +row-active +row-hover +rtl:!mr-0 +select +select-disabled:opacity-40 +select-disabled:pointer-events-none +select-floating +select-floating-label +select-lg +select-md +select-sm +select-xl +select-xs +selected +selected:select-active +shadow +shadow-base-300/20 +shadow-lg +shadow-sm +shadow-xs +shrink-0 +size-10 +size-4 +size-5 +size-8 +skeleton +skeleton-animated +sm:auto-cols-max +sm:col-span-2 +sm:flex +sm:gap-y-0 +sm:grid-cols-3 +sm:grid-cols-6 +sm:items-center +sm:items-end +sm:justify-between +sm:justify-end +sm:leading-6 +sm:max-w-2xl +sm:max-w-3xl +sm:max-w-4xl +sm:max-w-5xl +sm:max-w-6xl +sm:max-w-7xl +sm:max-w-[480px] +sm:max-w-lg +sm:max-w-md +sm:max-w-xl +sm:mb-0 +sm:mr-3 +sm:mt-5 +sm:mt-6 +sm:mx-auto +sm:p-6 +sm:px-12 +sm:px-6 +sm:py-2 +sm:rounded-lg +sm:text-sm +sm:text-sm/5 +sm:w-full +space-x-1 +space-y-1 +space-y-4 +space-y-6 +sr-only +static +status +status-error +sticky +success-message +switch +tab +tab-active +tab-content +table +table-pin-cols +table-pin-rows +tabs +tabs-bordered +tabs-lg +tabs-lifted +tabs-md +tabs-sm +tabs-vertical +tabs-xl +tabs-xs +text-2xl +text-3xl +text-4xl +text-accent +text-base +text-base-content +text-base-content/40 +text-base-content/50 +text-base-content/60 +text-base-content/70 +text-base-content/80 +text-base-content/90 +text-base/6 +text-center +text-error +text-error-content +text-gray-100 +text-gray-400 +text-gray-500 +text-indigo-600 +text-info +text-info-content +text-left +text-lg +text-primary +text-primary-content +text-slate-100 +text-sm +text-sm/5 +text-success +text-success-content +text-transparent +text-warning +text-warning-content +text-white +text-xl +text-xs +text-xs/5 +textarea +textarea-floating +textarea-floating-label +textarea-lg +textarea-md +textarea-sm +textarea-xl +textarea-xs +theme-controller +to-purple-400 +tooltip +tooltip-content +top-0 +top-1/2 +top-full +tracking-tight +tracking-wide +transform +transition +transition-all +transition-opacity +translate-x-0 +truncate +underline +uppercase +validate +via-sky-400 +w-0 +w-0.5 +w-12 +w-32 +w-4 +w-56 +w-64 +w-auto +w-fit +w-full +whitespace-nowrap +xl:grid-cols-3 +xl:grid-cols-4 +z-10 +z-40 +z-50 \ No newline at end of file diff --git a/MoonlightServers.Frontend/Styles/Moonlight.Client/mooncore.map b/MoonlightServers.Frontend/Styles/Moonlight.Client/mooncore.map new file mode 100755 index 0000000..e51bbd7 --- /dev/null +++ b/MoonlightServers.Frontend/Styles/Moonlight.Client/mooncore.map @@ -0,0 +1,513 @@ +!bg-base-100 +!border-base-content/40 +!border-none +!flex +!font-medium +!font-semibold +!h-2.5 +!justify-between +!me-1.5 +!ms-auto +!px-2.5 +!rounded-full +!text-sm +!w-2.5 +*:[grid-area:1/1] +*:first:rounded-tl-lg +*:last:rounded-tr-lg +-left-4 +-ml-4 +-translate-x-full +-translate-y-1/2 +absolute +accordion +accordion-bordered +accordion-toggle +active +active-tab:bg-primary +active-tab:text-base-content +advance-select-menu +advance-select-option +advance-select-tag +advance-select-toggle +alert +alert-error +alert-outline +alert-soft +align-bottom +align-middle +animate-bounce +animate-ping +aria-[current='page']:text-bg-soft-primary +avatar +avatar-away-bottom +avatar-away-top +avatar-busy-bottom +avatar-busy-top +avatar-offline-bottom +avatar-offline-top +avatar-online-bottom +avatar-online-top +avatar-placeholder +badge +badge-error +badge-info +badge-outline +badge-primary +badge-soft +badge-success +bg-background +bg-background/60 +bg-base-100 +bg-base-150 +bg-base-200 +bg-base-200/50 +bg-base-300 +bg-base-300/45 +bg-base-300/50 +bg-base-300/60 +bg-error +bg-info +bg-primary +bg-primary/5 +bg-success +bg-transparent +bg-warning +block +blur +border +border-0 +border-2 +border-b +border-base-content +border-base-content/20 +border-base-content/40 +border-base-content/5 +border-dashed +border-t +border-transparent +bottom-0 +bottom-full +break-words +btn +btn-accent +btn-active +btn-circle +btn-disabled +btn-error +btn-info +btn-outline +btn-primary +btn-secondary +btn-sm +btn-soft +btn-square +btn-success +btn-text +btn-warning +card +card-alert +card-body +card-border +card-footer +card-header +card-title +carousel +carousel-body +carousel-next +carousel-prev +carousel-slide +chat +chat-avatar +chat-bubble +chat-footer +chat-header +chat-receiver +chat-sender +checkbox +checkbox-primary +checkbox-xs +col-span-1 +collapse +combo-box-selected:block +combo-box-selected:dropdown-active +complete +container +contents +cursor-default +cursor-not-allowed +cursor-pointer +diff +disabled +divide-base-150/60 +divide-y +drop-shadow +dropdown +dropdown-disabled +dropdown-item +dropdown-menu +dropdown-open:opacity-100 +dropdown-open:rotate-180 +dropdown-toggle +duration-300 +duration-500 +ease-in-out +ease-linear +end-3 +file-upload-complete:progress-success +fill-black +filter +filter-reset +fixed +flex +flex-1 +flex-col +flex-grow +flex-nowrap +flex-row +flex-shrink-0 +flex-wrap +focus-visible:outline-none +focus-within:border-primary +focus:border-primary +focus:outline-1 +focus:outline-none +focus:outline-primary +focus:ring-0 +font-bold +font-inter +font-medium +font-normal +font-semibold +gap-0.5 +gap-1 +gap-1.5 +gap-2 +gap-3 +gap-4 +gap-5 +gap-6 +gap-x-1 +gap-x-2 +gap-x-3 +gap-y-1 +gap-y-3 +grid +grid-cols-1 +grid-flow-col +grow +grow-0 +h-12 +h-2 +h-32 +h-64 +h-8 +h-auto +h-full +h-screen +helper-text +hidden +hover:bg-primary/5 +hover:bg-transparent +hover:text-base-content +hover:text-base-content/60 +hover:text-primary +image-full +inline +inline-block +inline-flex +inline-grid +input +input-floating +input-floating-label +input-lg +input-md +input-sm +input-xl +inset-0 +inset-y-0 +inset-y-2 +invisible +is-invalid +is-valid +isolate +italic +items-center +items-end +items-start +join +join-item +justify-between +justify-center +justify-end +justify-start +justify-stretch +label-text +leading-3 +leading-3.5 +leading-6 +left-0 +lg:bg-base-100/20 +lg:flex +lg:gap-y-0 +lg:grid-cols-2 +lg:hidden +lg:justify-end +lg:justify-start +lg:min-w-0 +lg:p-10 +lg:pb-5 +lg:pl-64 +lg:pr-3.5 +lg:pt-5 +lg:ring-1 +lg:ring-base-content/10 +lg:rounded-lg +lg:shadow-xs +list-disc +list-inside +loading +loading-lg +loading-sm +loading-spinner +loading-xl +loading-xs +lowercase +m-10 +mask +max-lg:flex-col +max-lg:hidden +max-w-7xl +max-w-80 +max-w-full +max-w-lg +max-w-sm +max-w-xl +mb-0.5 +mb-1 +mb-2 +mb-3 +mb-4 +mb-5 +md:table-cell +md:text-3xl +me-1 +me-1.5 +me-2 +me-5 +menu +menu-active +menu-disabled +menu-dropdown +menu-dropdown-show +menu-focus +menu-horizontal +menu-title +min-h-0 +min-h-svh +min-w-0 +min-w-28 +min-w-48 +min-w-60 +min-w-[100px] +ml-3 +ml-4 +modal +modal-content +modal-dialog +modal-middle +modal-title +mr-4 +ms-1 +ms-2 +ms-3 +mt-1 +mt-1.5 +mt-10 +mt-12 +mt-2 +mt-2.5 +mt-3 +mt-4 +mt-5 +mt-8 +mx-1 +mx-auto +my-3 +my-auto +opacity-0 +opacity-100 +open +origin-top-left +outline +outline-0 +overflow-hidden +overflow-x-auto +overflow-y-auto +overlay-open:duration-50 +overlay-open:opacity-100 +p-0.5 +p-1 +p-2 +p-3 +p-4 +p-5 +p-6 +p-8 +pin-input +pin-input-underline +placeholder-base-content/60 +pointer-events-auto +pointer-events-none +progress +progress-bar +progress-indeterminate +progress-primary +pt-0.5 +pt-3 +px-1.5 +px-2 +px-3 +px-4 +px-5 +py-0.5 +py-1.5 +py-2 +py-2.5 +py-6 +radio +range +relative +resize +ring-0 +ring-1 +ring-white/10 +rounded-box +rounded-field +rounded-full +rounded-lg +rounded-md +rounded-t-lg +row-active +row-hover +rtl:!mr-0 +select +select-disabled:opacity-40 +select-disabled:pointer-events-none +select-floating +select-floating-label +selected +selected:select-active +shadow-base-300/20 +shadow-lg +shadow-xs +shrink-0 +size-10 +size-4 +size-5 +size-8 +skeleton +skeleton-animated +sm:auto-cols-max +sm:flex +sm:items-center +sm:items-end +sm:justify-between +sm:justify-end +sm:max-w-2xl +sm:max-w-3xl +sm:max-w-4xl +sm:max-w-5xl +sm:max-w-6xl +sm:max-w-7xl +sm:max-w-lg +sm:max-w-md +sm:max-w-xl +sm:mb-0 +sm:mt-5 +sm:mt-6 +sm:p-6 +sm:py-2 +sm:text-sm/5 +space-x-1 +space-y-1 +space-y-4 +sr-only +static +status +status-error +sticky +switch +tab +tab-active +table +table-pin-cols +table-pin-rows +tabs +tabs-bordered +tabs-lg +tabs-lifted +tabs-md +tabs-sm +tabs-xl +tabs-xs +text-2xl +text-4xl +text-accent +text-base +text-base-content +text-base-content/40 +text-base-content/50 +text-base-content/60 +text-base-content/70 +text-base-content/80 +text-base/6 +text-center +text-error +text-error-content +text-gray-400 +text-info +text-info-content +text-left +text-lg +text-primary +text-primary-content +text-sm +text-sm/5 +text-success +text-success-content +text-warning +text-warning-content +text-xl +text-xs +text-xs/5 +textarea +textarea-floating +textarea-floating-label +theme-controller +tooltip +tooltip-content +top-0 +top-1/2 +top-full +transform +transition +transition-all +transition-opacity +translate-x-0 +truncate +underline +uppercase +validate +w-0 +w-0.5 +w-12 +w-4 +w-56 +w-64 +w-fit +w-full +whitespace-nowrap +z-10 +z-40 +z-50 \ No newline at end of file diff --git a/MoonlightServers.Frontend/Styles/exports.css b/MoonlightServers.Frontend/Styles/exports.css deleted file mode 100644 index e81fa06..0000000 --- a/MoonlightServers.Frontend/Styles/exports.css +++ /dev/null @@ -1 +0,0 @@ -/* Custom styles here */ \ No newline at end of file diff --git a/MoonlightServers.Frontend/Styles/package-lock.json b/MoonlightServers.Frontend/Styles/package-lock.json deleted file mode 100644 index 5f77706..0000000 --- a/MoonlightServers.Frontend/Styles/package-lock.json +++ /dev/null @@ -1,958 +0,0 @@ -{ - "name": "Styles", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "dependencies": { - "@tailwindcss/cli": "^4.1.4", - "@tailwindcss/forms": "^0.5.10", - "tailwindcss": "^4.1.4", - "xml2js": "^0.6.2" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", - "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", - "hasInstallScript": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.1", - "@parcel/watcher-darwin-arm64": "2.5.1", - "@parcel/watcher-darwin-x64": "2.5.1", - "@parcel/watcher-freebsd-x64": "2.5.1", - "@parcel/watcher-linux-arm-glibc": "2.5.1", - "@parcel/watcher-linux-arm-musl": "2.5.1", - "@parcel/watcher-linux-arm64-glibc": "2.5.1", - "@parcel/watcher-linux-arm64-musl": "2.5.1", - "@parcel/watcher-linux-x64-glibc": "2.5.1", - "@parcel/watcher-linux-x64-musl": "2.5.1", - "@parcel/watcher-win32-arm64": "2.5.1", - "@parcel/watcher-win32-ia32": "2.5.1", - "@parcel/watcher-win32-x64": "2.5.1" - } - }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", - "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", - "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", - "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", - "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", - "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", - "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", - "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", - "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", - "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", - "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", - "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", - "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", - "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tailwindcss/cli": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.5.tgz", - "integrity": "sha512-Kr567rDwDjY1VUnfqh5/+DCpRf4B8lPs5O9flP4kri7n4AM2aubrIxGSh5GN8s+awUKw/U4+6kNlEnZbBNfUeg==", - "dependencies": { - "@parcel/watcher": "^2.5.1", - "@tailwindcss/node": "4.1.5", - "@tailwindcss/oxide": "4.1.5", - "enhanced-resolve": "^5.18.1", - "mri": "^1.2.0", - "picocolors": "^1.1.1", - "tailwindcss": "4.1.5" - }, - "bin": { - "tailwindcss": "dist/index.mjs" - } - }, - "node_modules/@tailwindcss/forms": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.10.tgz", - "integrity": "sha512-utI1ONF6uf/pPNO68kmN1b8rEwNXv3czukalo8VtJH8ksIkZXr3Q3VYudZLkCsDd4Wku120uF02hYK25XGPorw==", - "dependencies": { - "mini-svg-data-uri": "^1.2.3" - }, - "peerDependencies": { - "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" - } - }, - "node_modules/@tailwindcss/node": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.5.tgz", - "integrity": "sha512-CBhSWo0vLnWhXIvpD0qsPephiaUYfHUX3U9anwDaHZAeuGpTiB3XmsxPAN6qX7bFhipyGBqOa1QYQVVhkOUGxg==", - "dependencies": { - "enhanced-resolve": "^5.18.1", - "jiti": "^2.4.2", - "lightningcss": "1.29.2", - "tailwindcss": "4.1.5" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.5.tgz", - "integrity": "sha512-1n4br1znquEvyW/QuqMKQZlBen+jxAbvyduU87RS8R3tUSvByAkcaMTkJepNIrTlYhD+U25K4iiCIxE6BGdRYA==", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.5", - "@tailwindcss/oxide-darwin-arm64": "4.1.5", - "@tailwindcss/oxide-darwin-x64": "4.1.5", - "@tailwindcss/oxide-freebsd-x64": "4.1.5", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.5", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.5", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.5", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.5", - "@tailwindcss/oxide-linux-x64-musl": "4.1.5", - "@tailwindcss/oxide-wasm32-wasi": "4.1.5", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.5", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.5" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.5.tgz", - "integrity": "sha512-LVvM0GirXHED02j7hSECm8l9GGJ1RfgpWCW+DRn5TvSaxVsv28gRtoL4aWKGnXqwvI3zu1GABeDNDVZeDPOQrw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.5.tgz", - "integrity": "sha512-//TfCA3pNrgnw4rRJOqavW7XUk8gsg9ddi8cwcsWXp99tzdBAZW0WXrD8wDyNbqjW316Pk2hiN/NJx/KWHl8oA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.5.tgz", - "integrity": "sha512-XQorp3Q6/WzRd9OalgHgaqgEbjP3qjHrlSUb5k1EuS1Z9NE9+BbzSORraO+ecW432cbCN7RVGGL/lSnHxcd+7Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.5.tgz", - "integrity": "sha512-bPrLWbxo8gAo97ZmrCbOdtlz/Dkuy8NK97aFbVpkJ2nJ2Jo/rsCbu0TlGx8joCuA3q6vMWTSn01JY46iwG+clg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.5.tgz", - "integrity": "sha512-1gtQJY9JzMAhgAfvd/ZaVOjh/Ju/nCoAsvOVJenWZfs05wb8zq+GOTnZALWGqKIYEtyNpCzvMk+ocGpxwdvaVg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.5.tgz", - "integrity": "sha512-dtlaHU2v7MtdxBXoqhxwsWjav7oim7Whc6S9wq/i/uUMTWAzq/gijq1InSgn2yTnh43kR+SFvcSyEF0GCNu1PQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.5.tgz", - "integrity": "sha512-fg0F6nAeYcJ3CriqDT1iVrqALMwD37+sLzXs8Rjy8Z1ZHshJoYceodfyUwGJEsQoTyWbliFNRs2wMQNXtT7MVA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.5.tgz", - "integrity": "sha512-SO+F2YEIAHa1AITwc8oPwMOWhgorPzzcbhWEb+4oLi953h45FklDmM8dPSZ7hNHpIk9p/SCZKUYn35t5fjGtHA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.5.tgz", - "integrity": "sha512-6UbBBplywkk/R+PqqioskUeXfKcBht3KU7juTi1UszJLx0KPXUo10v2Ok04iBJIaDPkIFkUOVboXms5Yxvaz+g==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.5.tgz", - "integrity": "sha512-hwALf2K9FHuiXTPqmo1KeOb83fTRNbe9r/Ixv9ZNQ/R24yw8Ge1HOWDDgTdtzntIaIUJG5dfXCf4g9AD4RiyhQ==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "optional": true, - "dependencies": { - "@emnapi/core": "^1.4.3", - "@emnapi/runtime": "^1.4.3", - "@emnapi/wasi-threads": "^1.0.2", - "@napi-rs/wasm-runtime": "^0.2.9", - "@tybys/wasm-util": "^0.9.0", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.5.tgz", - "integrity": "sha512-oDKncffWzaovJbkuR7/OTNFRJQVdiw/n8HnzaCItrNQUeQgjy7oUiYpsm9HUBgpmvmDpSSbGaCa2Evzvk3eFmA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.5.tgz", - "integrity": "sha512-WiR4dtyrFdbb+ov0LK+7XsFOsG+0xs0PKZKkt41KDn9jYpO7baE3bXiudPVkTqUEwNfiglCygQHl2jklvSBi7Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", - "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/jiti": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", - "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/lightningcss": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.2.tgz", - "integrity": "sha512-6b6gd/RUXKaw5keVdSEtqFVdzWnU5jMxTUjA2bVcMNPLwSQ08Sv/UodBVtETLCn7k4S1Ibxwh7k68IwLZPgKaA==", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-darwin-arm64": "1.29.2", - "lightningcss-darwin-x64": "1.29.2", - "lightningcss-freebsd-x64": "1.29.2", - "lightningcss-linux-arm-gnueabihf": "1.29.2", - "lightningcss-linux-arm64-gnu": "1.29.2", - "lightningcss-linux-arm64-musl": "1.29.2", - "lightningcss-linux-x64-gnu": "1.29.2", - "lightningcss-linux-x64-musl": "1.29.2", - "lightningcss-win32-arm64-msvc": "1.29.2", - "lightningcss-win32-x64-msvc": "1.29.2" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.29.2.tgz", - "integrity": "sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.29.2.tgz", - "integrity": "sha512-j5qYxamyQw4kDXX5hnnCKMf3mLlHvG44f24Qyi2965/Ycz829MYqjrVg2H8BidybHBp9kom4D7DR5VqCKDXS0w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.29.2.tgz", - "integrity": "sha512-wDk7M2tM78Ii8ek9YjnY8MjV5f5JN2qNVO+/0BAGZRvXKtQrBC4/cn4ssQIpKIPP44YXw6gFdpUF+Ps+RGsCwg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.29.2.tgz", - "integrity": "sha512-IRUrOrAF2Z+KExdExe3Rz7NSTuuJ2HvCGlMKoquK5pjvo2JY4Rybr+NrKnq0U0hZnx5AnGsuFHjGnNT14w26sg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.29.2.tgz", - "integrity": "sha512-KKCpOlmhdjvUTX/mBuaKemp0oeDIBBLFiU5Fnqxh1/DZ4JPZi4evEH7TKoSBFOSOV3J7iEmmBaw/8dpiUvRKlQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.29.2.tgz", - "integrity": "sha512-Q64eM1bPlOOUgxFmoPUefqzY1yV3ctFPE6d/Vt7WzLW4rKTv7MyYNky+FWxRpLkNASTnKQUaiMJ87zNODIrrKQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.29.2.tgz", - "integrity": "sha512-0v6idDCPG6epLXtBH/RPkHvYx74CVziHo6TMYga8O2EiQApnUPZsbR9nFNrg2cgBzk1AYqEd95TlrsL7nYABQg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.2.tgz", - "integrity": "sha512-rMpz2yawkgGT8RULc5S4WiZopVMOFWjiItBT7aSfDX4NQav6M44rhn5hjtkKzB+wMTRlLLqxkeYEtQ3dd9696w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.29.2.tgz", - "integrity": "sha512-nL7zRW6evGQqYVu/bKGK+zShyz8OVzsCotFgc7judbt6wnB2KbiKKJwBE4SGoDBQ1O94RjW4asrCjQL4i8Fhbw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.29.2.tgz", - "integrity": "sha512-EdIUW3B2vLuHmv7urfzMI/h2fmlnOQBk1xlsDxkN1tCWKjNFjfLhGxYk8C8mzpSfr+A6jFFIi8fU6LbQGsRWjA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss/node_modules/detect-libc": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", - "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mini-svg-data-uri": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", - "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", - "bin": { - "mini-svg-data-uri": "cli.js" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" - }, - "node_modules/tailwindcss": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.5.tgz", - "integrity": "sha512-nYtSPfWGDiWgCkwQG/m+aX83XCwf62sBgg3bIlNiiOcggnS1x3uVRDAuyelBFL+vJdOPPCGElxv9DjHJjRHiVA==" - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/xml2js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", - "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - } - } -} diff --git a/MoonlightServers.Frontend/Styles/package.json b/MoonlightServers.Frontend/Styles/package.json deleted file mode 100644 index 192a048..0000000 --- a/MoonlightServers.Frontend/Styles/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "dependencies": { - "@tailwindcss/cli": "^4.1.4", - "@tailwindcss/forms": "^0.5.10", - "tailwindcss": "^4.1.4", - "xml2js": "^0.6.2" - }, - "scripts": { - "tailwind": "npx tailwindcss -i style.css -o ../wwwroot/css/style.min.css --watch", - "pretailwind": "node resolveNuget.js ../MoonlightServers.Frontend.csproj" - } -} diff --git a/MoonlightServers.Frontend/Styles/preTailwind.css b/MoonlightServers.Frontend/Styles/preTailwind.css deleted file mode 100644 index 44b66ba..0000000 --- a/MoonlightServers.Frontend/Styles/preTailwind.css +++ /dev/null @@ -1 +0,0 @@ -/* Import custom fonts here */ \ No newline at end of file diff --git a/MoonlightServers.Frontend/Styles/resolveNuget.js b/MoonlightServers.Frontend/Styles/resolveNuget.js deleted file mode 100644 index 4ff6f29..0000000 --- a/MoonlightServers.Frontend/Styles/resolveNuget.js +++ /dev/null @@ -1,80 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const os = require('os'); -const xml2js = require('xml2js'); - -// Helpers -function getPackageRefs(csprojPath) { - const xml = fs.readFileSync(csprojPath, 'utf8'); - const parser = new xml2js.Parser(); - - return new Promise((resolve, reject) => { - parser.parseString(xml, (err, result) => { - if (err) return reject(err); - - const itemGroups = result.Project.ItemGroup || []; - const refs = []; - - for (const group of itemGroups) { - const packages = group.PackageReference || []; - for (const pkg of packages) { - const name = pkg.$.Include; - const version = pkg.$.Version || (pkg.Version && pkg.Version[0]); - if (name && version) { - refs.push({ name: name.toLowerCase(), version }); - } - } - } - resolve(refs); - }); - }); -} - -async function main() { - const csprojPath = process.argv[2]; - if (!csprojPath || !fs.existsSync(csprojPath)) { - console.error('Usage: Missing csproj path'); - process.exit(1); - } - - const nugetPath = path.join(os.homedir(), '.nuget', 'packages'); - const moonlightDir = path.join(__dirname, 'node_modules', 'moonlight'); - fs.mkdirSync(moonlightDir, { recursive: true }); - - const refs = await getPackageRefs(csprojPath); - - var outputCss = ""; - var preOutputCss = ""; - - for (const { name, version } of refs) { - const packagePath = path.join(nugetPath, name, version); - const exportsFile = path.join(packagePath, 'styles', 'exports.css'); - const preTailwindFile = path.join(packagePath, 'styles', 'preTailwind.css'); - const sourceFolder = path.join(packagePath, 'src'); - - const rel = (p) => p.replace(/\\/g, '/'); - - if (fs.existsSync(exportsFile)) { - outputCss += `@import "${rel(exportsFile)}";\n`; - } - - if (fs.existsSync(preTailwindFile)) { - preOutputCss += `@import "${rel(preTailwindFile)}";\n`; - } - - if (fs.existsSync(sourceFolder)) { - outputCss += `@source "${rel(path.join(sourceFolder, "**", "*.razor"))}";\n`; - outputCss += `@source "${rel(path.join(sourceFolder, "**", "*.cs"))}";\n`; - outputCss += `@source "${rel(path.join(sourceFolder, "**", "*.html"))}";\n`; - } - } - - fs.writeFileSync(path.join(moonlightDir, 'nuget.css'), outputCss); - fs.writeFileSync(path.join(moonlightDir, 'preTailwind.nuget.css'), preOutputCss); - console.log(`Generated nuget.css in ${moonlightDir}`); -} - -main().catch(err => { - console.error(err); - process.exit(1); -}); \ No newline at end of file diff --git a/MoonlightServers.Frontend/Styles/style.css b/MoonlightServers.Frontend/Styles/style.css deleted file mode 100644 index 14369c3..0000000 --- a/MoonlightServers.Frontend/Styles/style.css +++ /dev/null @@ -1,15 +0,0 @@ -@import "./preTailwind.css"; -@import "moonlight/preTailwind.nuget.css"; - -@import "tailwindcss"; - -@import "./exports.css"; -@import "moonlight/nuget.css"; - -@plugin "@tailwindcss/forms" { - strategy: "base"; -} - -@source "../**/*.razor"; -@source "../**/*.cs"; -@source "../**/*.html"; \ No newline at end of file diff --git a/MoonlightServers.Frontend/UI/Components/Forms/Switch.razor b/MoonlightServers.Frontend/UI/Components/Forms/Switch.razor index 05d6f53..d95afef 100644 --- a/MoonlightServers.Frontend/UI/Components/Forms/Switch.razor +++ b/MoonlightServers.Frontend/UI/Components/Forms/Switch.razor @@ -5,26 +5,18 @@ @inherits InputBase -
-
- - -
-
+
+ +
+
@code diff --git a/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateAllocationModal.razor b/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateAllocationModal.razor index 6da11d7..97255d4 100644 --- a/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateAllocationModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateAllocationModal.razor @@ -1,6 +1,4 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Modals.Components -@using MoonCore.Blazor.Tailwind.Components @using MoonlightServers.Shared.Http.Requests.Admin.NodeAllocations @inherits MoonCore.Blazor.FlyonUi.Modals.Components.BaseModal @@ -10,13 +8,13 @@
- - + +
- - + +
diff --git a/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateMultipleAllocationModal.razor b/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateMultipleAllocationModal.razor index 65318be..40c7293 100644 --- a/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateMultipleAllocationModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Nodes/Modals/CreateMultipleAllocationModal.razor @@ -1,6 +1,4 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Modals.Components -@using MoonCore.Blazor.Tailwind.Components @using MoonlightServers.Shared.Http.Requests.Admin.NodeAllocations @inherits MoonCore.Blazor.FlyonUi.Modals.Components.BaseModal @@ -10,18 +8,18 @@
- - + +
- - + +
- - + +
diff --git a/MoonlightServers.Frontend/UI/Components/Nodes/Modals/UpdateAllocationModal.razor b/MoonlightServers.Frontend/UI/Components/Nodes/Modals/UpdateAllocationModal.razor index 4bc09c4..a2a6779 100644 --- a/MoonlightServers.Frontend/UI/Components/Nodes/Modals/UpdateAllocationModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Nodes/Modals/UpdateAllocationModal.razor @@ -1,7 +1,4 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Modals.Components -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Helpers @using MoonlightServers.Shared.Http.Requests.Admin.NodeAllocations @using MoonlightServers.Shared.Http.Responses.Admin.NodeAllocations @@ -12,13 +9,13 @@
- - + +
- - + +
@@ -38,7 +35,11 @@ protected override void OnInitialized() { - Form = Mapper.Map(Allocation); + Form = new UpdateNodeAllocationRequest() + { + IpAddress = Allocation.IpAddress, + Port = Allocation.Port + }; } private async Task OnValidSubmit() diff --git a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AdvancedNodeUpdate.razor b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AdvancedNodeUpdate.razor index 571296a..5a4ae26 100644 --- a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AdvancedNodeUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AdvancedNodeUpdate.razor @@ -2,19 +2,23 @@ @using MoonlightServers.Shared.Http.Requests.Admin.Nodes
-
+
+
- +
-
+
+
- +
diff --git a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AllocationsNodeUpdate.razor b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AllocationsNodeUpdate.razor index a6bc466..1200105 100644 --- a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AllocationsNodeUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/AllocationsNodeUpdate.razor @@ -2,11 +2,7 @@ @using MoonCore.Blazor.FlyonUi.DataTables @using MoonCore.Blazor.FlyonUi.Modals @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts @using MoonlightServers.Shared.Http.Responses.Admin.Nodes -@using MoonCore.Blazor.Tailwind.Dt -@using MoonCore.Blazor.Tailwind.Modals -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Frontend.UI.Components.Nodes.Modals @@ -21,15 +17,14 @@
-
- Actions +
+ Actions
- - - + + +
@@ -37,19 +32,21 @@
- - + + @@ -83,10 +80,7 @@ await Table.Refresh(); }; - await ModalService.Launch(parameters => - { - parameters.Add("OnSubmit", onSubmit); - }); + await ModalService.Launch(parameters => { parameters.Add("OnSubmit", onSubmit); }); } private async Task AddAllocation() @@ -133,7 +127,7 @@ } ); } - + private async Task DeleteAllAllocations() { await AlertService.ConfirmDanger( diff --git a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/GeneralNodeUpdate.razor b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/GeneralNodeUpdate.razor index 4878509..66f1ae7 100644 --- a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/GeneralNodeUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/GeneralNodeUpdate.razor @@ -2,26 +2,26 @@
- +
- +
- +
- +
- +
- +
-
+
- +
diff --git a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/OverviewNodeUpdate.razor b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/OverviewNodeUpdate.razor index df4bb62..bc8b154 100644 --- a/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/OverviewNodeUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Nodes/UpdateNodePartials/OverviewNodeUpdate.razor @@ -1,7 +1,6 @@ +@using Microsoft.Extensions.Logging @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers @using MoonlightServers.Frontend.Services @using MoonlightServers.Shared.Http.Responses.Admin.Nodes @@ -22,8 +21,8 @@
-

- @Math.Round(Statistics.Cpu.Usage, 2)% +

+ @(Math.Round(Statistics.Cpu.Usage, 2))%

@@ -36,10 +35,10 @@
-

- @Formatter.FormatSize(Statistics.Memory.Total - Statistics.Memory.Available) +

+ @(Formatter.FormatSize(Statistics.Memory.Total - Statistics.Memory.Available)) / - @Formatter.FormatSize(Statistics.Memory.Total) + @(Formatter.FormatSize(Statistics.Memory.Total))

@@ -50,10 +49,10 @@
-
- @Formatter.FormatSize(Statistics.Memory.SwapTotal - Statistics.Memory.SwapFree) +
+ @(Formatter.FormatSize(Statistics.Memory.SwapTotal - Statistics.Memory.SwapFree)) / - @Formatter.FormatSize(Statistics.Memory.SwapTotal) + @(Formatter.FormatSize(Statistics.Memory.SwapTotal))
@@ -81,9 +80,8 @@ #@(i)
-
-
+
+
@@ -105,9 +103,8 @@
-
-
+
+
@@ -134,7 +131,7 @@
-

+

@Formatter.FormatSize(DockerStatistics.ImagesUsed) (@Formatter.FormatSize(DockerStatistics.ImagesReclaimable) unused)

@@ -146,7 +143,7 @@
-

+

@Formatter.FormatSize(DockerStatistics.ContainersUsed) ( @Formatter.FormatSize(DockerStatistics.ContainersReclaimable) unused)

@@ -158,7 +155,7 @@
-

+

@Formatter.FormatSize(DockerStatistics.BuildCacheUsed) (@Formatter.FormatSize(DockerStatistics.BuildCacheReclaimable) unused)

@@ -199,7 +196,7 @@ catch (Exception e) { Logger.LogWarning("An error occured while fetching status update: {e}", e); - await ToastService.Danger("Unable to fetch status update", e.Message); + await ToastService.Error("Unable to fetch status update", e.Message); } } @@ -210,7 +207,7 @@ else if (percent < 80) return "bg-warning"; else - return "bg-danger"; + return "bg-error"; } public void Dispose() diff --git a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AdvancedServerCreate.razor b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AdvancedServerCreate.razor index a6ba016..6e5dd40 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AdvancedServerCreate.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AdvancedServerCreate.razor @@ -1,35 +1,25 @@ @using MoonlightServers.Shared.Http.Requests.Admin.Servers -@using MoonCore.Blazor.Tailwind.Inputs +@using MoonCore.Blazor.FlyonUi.Components
- +
- - - - - - - - +
+ + + +
- +
- +
diff --git a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AllocationsServerCreate.razor b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AllocationsServerCreate.razor index d1cc094..d35b612 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AllocationsServerCreate.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/AllocationsServerCreate.razor @@ -1,22 +1,22 @@ @using MoonlightServers.Shared.Http.Requests.Admin.Servers -@using MoonCore.Blazor.Tailwind.Inputs @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Shared.Http.Responses.Admin.NodeAllocations +@using MoonCore.Blazor.FlyonUi.Forms +@using MoonlightServers.Shared.Http.Responses.Admin.Nodes @inject HttpApiClient ApiClient
- +
- + +
@@ -24,16 +24,19 @@ @code { [Parameter] public CreateServerRequest Request { get; set; } + [Parameter] public List Allocations { get; set; } + [Parameter] public NodeResponse? Node { get; set; } - private async Task Loader() + private async Task ItemSource() { // Handle unselected node - if (Request.NodeId <= 0) + // ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract + if (Node == null) return []; var items = await PagedData.All(async (page, pageSize) => await ApiClient.GetJson>( - $"api/admin/servers/nodes/{Request.NodeId}/allocations/free?page={page}&pageSize={pageSize}" + $"api/admin/servers/nodes/{Node.Id}/allocations/free?page={page}&pageSize={pageSize}" ) ); diff --git a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/GeneralServerCreate.razor b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/GeneralServerCreate.razor index 9c2eabe..c1999ea 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/GeneralServerCreate.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/GeneralServerCreate.razor @@ -3,83 +3,83 @@ @using MoonCore.Models @using MoonlightServers.Shared.Http.Responses.Admin.Nodes @using MoonlightServers.Shared.Http.Responses.Admin.Stars -@using MoonCore.Blazor.Tailwind.Inputs @using Moonlight.Shared.Http.Responses.Admin.Users +@using MoonCore.Blazor.FlyonUi.Forms @inject HttpApiClient ApiClient
- +
- +
- +
- - + +
- +
- + +
- +
- + +
-
-

+
+
+

Resources

-

Define the servers resource limit

+

Define the servers resource limit

+
- +
- +
- +
- +
- +
- +
@@ -89,46 +89,34 @@ { [Parameter] public CreateServerRequest Request { get; set; } - private UserResponse[]? Users; + [Parameter] public UserResponse? User { get; set; } + [Parameter] public NodeResponse? Node { get; set; } + [Parameter] public StarDetailResponse? Star { get; set; } private async Task LoadStars() { - var items = await PagedData.All(async (page, pageSize) => + return await PagedData.All(async (page, pageSize) => await ApiClient.GetJson>( $"api/admin/servers/stars?page={page}&pageSize={pageSize}" ) ); - - return items; } private async Task LoadNodes() { - var items = await PagedData.All(async (page, pageSize) => + return await PagedData.All(async (page, pageSize) => await ApiClient.GetJson>( $"api/admin/servers/nodes?page={page}&pageSize={pageSize}" ) ); - - return items; } - private async Task Loader(string searchTerm) + private async Task LoadUsers() { - if (Users == null) - { - Users = await PagedData.All(async (page, pageSize) => - await ApiClient.GetJson>( - $"api/admin/users?page={page}&pageSize={pageSize}" - ) - ); - } - - if (string.IsNullOrEmpty(searchTerm)) - return Users; - - return Users - .Where(x => x.Email.Contains(searchTerm)) - .ToArray(); + return await PagedData.All(async (page, pageSize) => + await ApiClient.GetJson>( + $"api/admin/users?page={page}&pageSize={pageSize}" + ) + ); } } \ No newline at end of file diff --git a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/VariablesServerCreate.razor b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/VariablesServerCreate.razor index 6db57ec..058db02 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/VariablesServerCreate.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/CreateServerPartials/VariablesServerCreate.razor @@ -1,9 +1,9 @@ @using MoonCore.Blazor.FlyonUi.Components @using MoonlightServers.Shared.Http.Requests.Admin.Servers @using MoonCore.Helpers -@using MoonCore.Blazor.Tailwind.Components @using MoonCore.Models @using MoonlightServers.Shared.Http.Requests.Admin.ServerVariables +@using MoonlightServers.Shared.Http.Responses.Admin.Stars @using MoonlightServers.Shared.Http.Responses.Admin.StarVariables @inject HttpApiClient ApiClient @@ -19,17 +19,17 @@ : variable.DefaultValue;
-
@@ -40,12 +40,13 @@ @code { [Parameter] public CreateServerRequest Request { get; set; } + [Parameter] public StarDetailResponse? Star { get; set; } private StarVariableDetailResponse[] StarVariables; private async Task Load(LazyLoader _) { - if (Request.StarId <= 0) + if (Star == null) { StarVariables = []; return; diff --git a/MoonlightServers.Frontend/UI/Components/Servers/CreateShareModal.razor b/MoonlightServers.Frontend/UI/Components/Servers/CreateShareModal.razor index 87aeb2e..fb17726 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/CreateShareModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/CreateShareModal.razor @@ -1,10 +1,9 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Components @using MoonlightServers.Shared.Enums @using MoonlightServers.Shared.Http.Requests.Client.Servers.Shares @using MoonlightServers.Shared.Models -@inherits MoonCore.Blazor.Tailwind.Modals.Components.BaseModal +@inherits MoonCore.Blazor.FlyonUi.Modals.Components.BaseModal
Create a new share @@ -12,8 +11,8 @@
- - + +
@foreach (var name in Names) diff --git a/MoonlightServers.Frontend/UI/Components/Servers/ServerCard.razor b/MoonlightServers.Frontend/UI/Components/Servers/ServerCard.razor index b8c1576..581946f 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/ServerCard.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/ServerCard.razor @@ -1,3 +1,4 @@ +@using Microsoft.Extensions.Logging @using MoonCore.Helpers @using MoonlightServers.Frontend.Services @using MoonlightServers.Shared.Enums @@ -7,38 +8,38 @@ @inject ILogger Logger @{ - var gradient = "from-gray-600/20"; - var border = "border-gray-600"; + var gradient = "from-base-content/20"; + var border = "border-base-content"; if (IsLoaded && !IsFailed) { gradient = Status.State switch { ServerState.Installing => "from-primary/20", - ServerState.Offline => "from-danger/20", + ServerState.Offline => "from-error/20", ServerState.Starting => "from-warning/20", ServerState.Stopping => "from-warning/20", ServerState.Online => "from-success/20", - _ => "from-gray-600/20" + _ => "from-base-content/20" }; border = Status.State switch { ServerState.Installing => "border-primary", - ServerState.Offline => "border-danger", + ServerState.Offline => "border-error", ServerState.Starting => "border-warning", ServerState.Stopping => "border-warning", ServerState.Online => "border-success", - _ => "border-gray-600" + _ => "border-base-content" }; } } + class="w-full bg-gradient-to-r @gradient to-base-content/75 to-25% px-5 py-3.5 rounded-xl border-l-8 @border">
-
+
@Server.Name @@ -53,7 +54,7 @@ Status.State is ServerState.Starting or ServerState.Stopping or ServerState.Online ) { -
+
@@ -61,7 +62,7 @@
@(Stats.CpuUsage)%
-
+
@@ -69,7 +70,7 @@
@(Formatter.FormatSize(Stats.MemoryUsage)) / @(Formatter.FormatSize(ByteConverter.FromMegaBytes(Server.Memory).Bytes))
-
+
@@ -81,7 +82,7 @@ { if (!IsLoaded) { -
+
@@ -91,7 +92,7 @@ } else if (IsFailed) { -
+
@@ -101,7 +102,7 @@ } else if (IsLoaded && !IsFailed && Status.State is ServerState.Offline) { -
+
@@ -111,7 +112,7 @@ } else if (IsLoaded && !IsFailed && Status.State is ServerState.Installing) { -
+
@@ -126,7 +127,7 @@ @if (Server.Share != null) { -
+
@@ -136,7 +137,7 @@ } else { -
+
@@ -144,7 +145,7 @@
@Server.StarName
-
+
diff --git a/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/FilesTab.razor b/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/FilesTab.razor index ddc8ad3..a3506d3 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/FilesTab.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/FilesTab.razor @@ -1,26 +1,22 @@ -@using MoonCore.Blazor.FlyonUi.Helpers @using MoonlightServers.Frontend.Services -@using MoonCore.Blazor.Tailwind.Fm -@using MoonCore.Blazor.Tailwind.Services +@using MoonCore.Blazor.FlyonUi.Files.Manager @using MoonlightServers.Frontend.Helpers @inherits BaseServerTab @inject ServerFileSystemService FileSystemService -@inject DownloadService DownloadService - + @code { - private IFileSystemProvider Provider; + private IFsAccess FsAccess; protected override void OnInitialized() { - Provider = new ServerFileSystemProvider( + FsAccess = new ServerFsAccess( Server.Id, - FileSystemService, - DownloadService + FileSystemService ); } } diff --git a/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SettingsTab.razor b/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SettingsTab.razor index e4d72e2..afb892c 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SettingsTab.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SettingsTab.razor @@ -1,8 +1,5 @@ @using MoonCore.Blazor.FlyonUi.Alerts @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Alerts -@using MoonCore.Helpers -@using MoonCore.Blazor.Tailwind.Components @using MoonlightServers.Frontend.Services @using MoonlightServers.Shared.Enums diff --git a/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SharesTab.razor b/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SharesTab.razor index 3d520df..2b976f6 100644 --- a/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SharesTab.razor +++ b/MoonlightServers.Frontend/UI/Components/Servers/ServerTabs/SharesTab.razor @@ -2,10 +2,6 @@ @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Modals @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Modals -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Models @using MoonlightServers.Frontend.Services @using MoonlightServers.Shared.Http.Requests.Client.Servers.Shares @@ -19,7 +15,7 @@ @inject AlertService AlertService
- + +
@foreach (var entry in Form.Entries) {
- - -
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/Modals/CreateVariableModal.razor b/MoonlightServers.Frontend/UI/Components/Stars/Modals/CreateVariableModal.razor index e9e19f4..0dc504d 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/Modals/CreateVariableModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/Modals/CreateVariableModal.razor @@ -1,9 +1,7 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Modals.Components @using MoonlightServers.Shared.Enums @using MoonlightServers.Shared.Http.Requests.Admin.StarVariables @using MoonlightServers.Frontend.UI.Components.Forms -@using MoonCore.Blazor.Tailwind.Components @inherits MoonCore.Blazor.FlyonUi.Modals.Components.BaseModal @@ -12,38 +10,38 @@
- - + +
- - + +
- - + +
- - + +
- +
- +
- - @foreach (var val in Enum.GetValues()) { @@ -52,8 +50,8 @@
- - + +
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateDockerImageModal.razor b/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateDockerImageModal.razor index 9ec6ce9..7eda8d2 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateDockerImageModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateDockerImageModal.razor @@ -1,8 +1,5 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Modals.Components @using MoonlightServers.Frontend.UI.Components.Forms -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Helpers @using MoonlightServers.Shared.Http.Requests.Admin.StarDockerImages @using MoonlightServers.Shared.Http.Responses.Admin.StarDockerImages @@ -13,17 +10,17 @@
- - + +
- - + +
- +
@@ -44,7 +41,12 @@ protected override void OnInitialized() { - Form = Mapper.Map(DockerImage); + Form = new UpdateStarDockerImageRequest() + { + AutoPulling = DockerImage.AutoPulling, + DisplayName = DockerImage.DisplayName, + Identifier = DockerImage.Identifier + }; } private async Task OnValidSubmit() diff --git a/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateParseConfigModal.razor b/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateParseConfigModal.razor index 5c7796f..51b3805 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateParseConfigModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateParseConfigModal.razor @@ -1,8 +1,5 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Modals.Components @using MoonlightServers.Shared.Enums -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Helpers @using MoonlightServers.Shared.Models @inherits MoonCore.Blazor.FlyonUi.Modals.Components.BaseModal @@ -12,13 +9,13 @@
- - + +
- - @foreach (var val in Enum.GetValues()) { @@ -27,16 +24,16 @@
- +
@foreach (var entry in Form.Entries) {
- - -
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateVariableModal.razor b/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateVariableModal.razor index 8467f7b..1f9a6bf 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateVariableModal.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/Modals/UpdateVariableModal.razor @@ -1,10 +1,7 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Modals.Components @using MoonlightServers.Shared.Enums @using MoonlightServers.Shared.Http.Requests.Admin.StarVariables @using MoonlightServers.Frontend.UI.Components.Forms -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Helpers @using MoonlightServers.Shared.Http.Responses.Admin.StarVariables @inherits MoonCore.Blazor.FlyonUi.Modals.Components.BaseModal @@ -14,38 +11,38 @@
- - + +
- - + +
- - + +
- - + +
- +
- +
- - @foreach (var val in Enum.GetValues()) { @@ -54,8 +51,8 @@
- - + +
@@ -75,7 +72,17 @@ protected override void OnInitialized() { - Form = Mapper.Map(Variable); + Form = new() + { + Name = Variable.Name, + AllowEditing = Variable.AllowEditing, + AllowViewing = Variable.AllowViewing, + DefaultValue = Variable.DefaultValue, + Description = Variable.Description, + Filter = Variable.Filter, + Key = Variable.Key, + Type = Variable.Type + }; } private async Task OnValidSubmit() diff --git a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/DockerImageStarUpdate.razor b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/DockerImageStarUpdate.razor index af62447..dd2e5ee 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/DockerImageStarUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/DockerImageStarUpdate.razor @@ -2,10 +2,6 @@ @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Modals @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Modals -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Frontend.UI.Components.Stars.Modals @@ -34,11 +30,11 @@
- -
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/GeneralStarUpdate.razor b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/GeneralStarUpdate.razor index bb29486..76c7206 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/GeneralStarUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/GeneralStarUpdate.razor @@ -3,33 +3,33 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/InstallationStarUpdate.razor b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/InstallationStarUpdate.razor index 1eb2388..0ddc3a2 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/InstallationStarUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/InstallationStarUpdate.razor @@ -1,23 +1,22 @@ @using MoonCore.Blazor.FlyonUi.Ace @using MoonlightServers.Shared.Http.Requests.Admin.Stars -@using MoonCore.Blazor.Tailwind.Ace
- +
- +
- +
- +
- +
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/MiscStarUpdate.razor b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/MiscStarUpdate.razor index b1a0b0b..b640ac9 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/MiscStarUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/MiscStarUpdate.razor @@ -1,5 +1,4 @@ @using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Components @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Shared.Http.Requests.Admin.Stars @@ -13,15 +12,15 @@
- +
- +
- @foreach (var dockerImage in DockerImages) { var index = DockerImages.IndexOf(dockerImage); diff --git a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/ParseConfigStarUpdate.razor b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/ParseConfigStarUpdate.razor index 60929a5..377d422 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/ParseConfigStarUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/ParseConfigStarUpdate.razor @@ -1,10 +1,8 @@ @using System.Text.Json +@using Microsoft.Extensions.Logging @using MoonCore.Blazor.FlyonUi.Alerts @using MoonCore.Blazor.FlyonUi.Modals @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts -@using MoonCore.Blazor.Tailwind.Modals -@using MoonCore.Blazor.Tailwind.Toasts @using MoonlightServers.Frontend.UI.Components.Stars.Modals @using MoonlightServers.Shared.Http.Requests.Admin.Stars @using MoonlightServers.Shared.Models @@ -35,11 +33,11 @@ else
- -
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/StartStopStatusStarUpdate.razor b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/StartStopStatusStarUpdate.razor index 8d83ada..c15f4f1 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/StartStopStatusStarUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/StartStopStatusStarUpdate.razor @@ -2,21 +2,21 @@
- +
- +
- +
- +
- +
- +
diff --git a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/VariablesStarUpdate.razor b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/VariablesStarUpdate.razor index b94af31..fcb9fd5 100644 --- a/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/VariablesStarUpdate.razor +++ b/MoonlightServers.Frontend/UI/Components/Stars/UpdateStarPartials/VariablesStarUpdate.razor @@ -2,10 +2,6 @@ @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Modals @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Modals -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Frontend.UI.Components.Stars.Modals @@ -34,11 +30,11 @@
- -
diff --git a/MoonlightServers.Frontend/UI/Components/XtermConsole.razor b/MoonlightServers.Frontend/UI/Components/XtermConsole.razor index a399a70..ea754e1 100644 --- a/MoonlightServers.Frontend/UI/Components/XtermConsole.razor +++ b/MoonlightServers.Frontend/UI/Components/XtermConsole.razor @@ -1,9 +1,10 @@ +@using Microsoft.Extensions.Logging @using XtermBlazor @inject IJSRuntime JsRuntime @inject ILogger Logger -
+
@if (IsInitialized) { - + - + - + @@ -49,6 +51,11 @@ private HandleForm Form; private CreateServerRequest Request; + private List Allocations = new(); + private UserResponse? Owner; + private StarDetailResponse? Star; + private NodeResponse? Node; + protected override void OnInitialized() { Request = new(); @@ -56,6 +63,14 @@ private async Task OnSubmit() { + Request.AllocationIds = Allocations + .Select(x => x.Id) + .ToArray(); + + Request.StarId = Star?.Id ?? -1; + Request.NodeId = Node?.Id ?? -1; + Request.OwnerId = Owner?.Id ?? -1; + await ApiClient.Post("api/admin/servers", Request); await ToastService.Success("Successfully created Server"); diff --git a/MoonlightServers.Frontend/UI/Views/Admin/All/Index.razor b/MoonlightServers.Frontend/UI/Views/Admin/All/Index.razor index 7357a03..b1de660 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/All/Index.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/All/Index.razor @@ -3,15 +3,12 @@ @using MoonCore.Blazor.FlyonUi.Alerts @using MoonCore.Blazor.FlyonUi.DataTables @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Shared.Http.Responses.Admin.Nodes @using MoonlightServers.Shared.Http.Responses.Admin.Servers @using MoonlightServers.Shared.Http.Responses.Admin.Stars -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Dt -@using MoonCore.Blazor.Tailwind.Toasts +@using MoonCore.Blazor.FlyonUi.Components @inject HttpApiClient ApiClient @inject AlertService AlertService @@ -67,7 +64,7 @@ + class="text-error">
diff --git a/MoonlightServers.Frontend/UI/Views/Admin/All/Update.razor b/MoonlightServers.Frontend/UI/Views/Admin/All/Update.razor index 47ef7d6..59d8c66 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/All/Update.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/All/Update.razor @@ -2,12 +2,12 @@ @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers +@using Moonlight.Shared.Http.Responses.Admin.Users @using MoonlightServers.Shared.Http.Requests.Admin.Servers @using MoonlightServers.Shared.Http.Responses.Admin.Servers @using MoonlightServers.Frontend.UI.Components.Servers.UpdateServerPartials +@using MoonlightServers.Shared.Http.Responses.Admin.NodeAllocations @inject HttpApiClient ApiClient @inject NavigationManager Navigation @@ -31,16 +31,16 @@ - + - + - + - + @@ -55,14 +55,45 @@ private UpdateServerRequest Request; private ServerResponse Server; + private List Allocations = new(); + private UserResponse Owner; + private async Task Load(LazyLoader _) { Server = await ApiClient.GetJson($"api/admin/servers/{Id}"); - Request = Mapper.Map(Server); + + Request = new() + { + Name = Server.Name, + AllocationIds = Server.AllocationIds, + OwnerId = Server.OwnerId, + Bandwidth = Server.Bandwidth, + Cpu = Server.Cpu, + Disk = Server.Disk, + DockerImageIndex = Server.DockerImageIndex, + Memory = Server.Memory, + StartupOverride = Server.StartupOverride + }; + + foreach (var allocationId in Server.AllocationIds) + { + var allocation = await ApiClient.GetJson( + $"api/admin/servers/nodes/{Server.NodeId}/allocations/{allocationId}" + ); + + Allocations.Add(allocation); + } + + Owner = await ApiClient.GetJson( + $"api/admin/users/{Server.OwnerId}" + ); } private async Task OnSubmit() { + Request.AllocationIds = Allocations.Select(x => x.Id).ToArray(); + Request.OwnerId = Owner.Id; + await ApiClient.Patch($"api/admin/servers/{Id}", Request); await ToastService.Success("Successfully updated server"); diff --git a/MoonlightServers.Frontend/UI/Views/Admin/Index.razor b/MoonlightServers.Frontend/UI/Views/Admin/Index.razor index 1cd8451..9344e4e 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/Index.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/Index.razor @@ -1,6 +1,6 @@ @page "/admin/servers" +@using MoonCore.Blazor.FlyonUi.Components -@using MoonCore.Blazor.Tailwind.Components @attribute [Authorize(Policy = "permissions:admin.servers.overview")] diff --git a/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Create.razor b/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Create.razor index 443f360..a50f7e9 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Create.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Create.razor @@ -2,8 +2,6 @@ @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers @using MoonlightServers.Shared.Http.Requests.Admin.Nodes @@ -28,27 +26,27 @@
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Index.razor b/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Index.razor index be86df1..4552719 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Index.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Index.razor @@ -1,18 +1,16 @@ @page "/admin/servers/nodes" +@using Microsoft.Extensions.Logging @using MoonCore.Blazor.FlyonUi.Alerts @using MoonCore.Blazor.FlyonUi.DataTables @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Shared.Http.Responses.Admin.Nodes -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Dt -@using MoonCore.Blazor.Tailwind.Toasts @using MoonlightServers.Frontend.Services @using MoonlightServers.Shared.Http.Responses.Admin.Nodes.Statistics @using MoonlightServers.Shared.Http.Responses.Admin.Nodes.Sys +@using MoonCore.Blazor.FlyonUi.Components @inject HttpApiClient ApiClient @inject NodeService NodeService @@ -57,7 +55,7 @@ { if (data == null) { -
+
API Error @@ -75,13 +73,13 @@ } else { -
+
Error Details + href="#" class="ms-1 text-base-content/40">Details
} } @@ -108,7 +106,7 @@ { if (data == null) { -
+ @@ -243,6 +241,6 @@ (data.RoundtripRemoteFailure ? "(Failed at node)" : "(Failed at api server)") + $" {data.RoundtripError}"; - await AlertService.Danger("Node error details", message); + await AlertService.Error("Node error details", message); } } \ No newline at end of file diff --git a/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Update.razor b/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Update.razor index 8696847..01628fc 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Update.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/Nodes/Update.razor @@ -2,8 +2,6 @@ @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers @using MoonlightServers.Shared.Http.Requests.Admin.Nodes @using MoonlightServers.Shared.Http.Responses.Admin.Nodes @@ -63,7 +61,16 @@ private async Task Load(LazyLoader _) { Node = await ApiClient.GetJson($"api/admin/servers/nodes/{Id}"); - Request = Mapper.Map(Node); + + Request = new UpdateNodeRequest() + { + Name = Node.Name, + EnableDynamicFirewall = Node.EnableDynamicFirewall, + EnableTransparentMode = Node.EnableTransparentMode, + Fqdn = Node.Fqdn, + FtpPort = Node.FtpPort, + HttpPort = Node.HttpPort + }; } private async Task OnSubmit() diff --git a/MoonlightServers.Frontend/UI/Views/Admin/Stars/Create.razor b/MoonlightServers.Frontend/UI/Views/Admin/Stars/Create.razor index 79cf928..20f6491 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/Stars/Create.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/Stars/Create.razor @@ -3,8 +3,6 @@ @using Microsoft.AspNetCore.Components.Authorization @using MoonCore.Blazor.FlyonUi.Components @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Helpers @using MoonlightServers.Shared.Http.Requests.Admin.Stars @@ -29,15 +27,15 @@
- +
- +
- +
- +
diff --git a/MoonlightServers.Frontend/UI/Views/Admin/Stars/Index.razor b/MoonlightServers.Frontend/UI/Views/Admin/Stars/Index.razor index 06e6903..8708f7f 100644 --- a/MoonlightServers.Frontend/UI/Views/Admin/Stars/Index.razor +++ b/MoonlightServers.Frontend/UI/Views/Admin/Stars/Index.razor @@ -4,15 +4,11 @@ @using MoonCore.Blazor.FlyonUi.DataTables @using MoonCore.Blazor.FlyonUi.Helpers @using MoonCore.Blazor.FlyonUi.Toasts -@using MoonCore.Blazor.Tailwind.Alerts @using MoonCore.Helpers @using MoonCore.Models @using MoonlightServers.Shared.Http.Responses.Admin.Stars -@using MoonCore.Blazor.Tailwind.Components -@using MoonCore.Blazor.Tailwind.Dt -@using MoonCore.Blazor.Tailwind.Services -@using MoonCore.Blazor.Tailwind.Toasts @using MoonCore.Exceptions +@using MoonCore.Blazor.FlyonUi.Components @inject HttpApiClient ApiClient @inject DownloadService DownloadService @@ -28,7 +24,7 @@