From 87b9b5e1c247257618d31e1aef1f883084b98741 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 23 Apr 2024 16:02:43 +0200 Subject: [PATCH 1/4] Fixed mobile layout for permission integer input --- Moonlight/Core/UI/Views/Admin/Sys/Permissions.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moonlight/Core/UI/Views/Admin/Sys/Permissions.razor b/Moonlight/Core/UI/Views/Admin/Sys/Permissions.razor index 9089752e..31603fd8 100644 --- a/Moonlight/Core/UI/Views/Admin/Sys/Permissions.razor +++ b/Moonlight/Core/UI/Views/Admin/Sys/Permissions.razor @@ -29,10 +29,10 @@ {
-
+
-
+
From bb0ab9dc676a3853f64efe119637c4e93ee6c61c Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 23 Apr 2024 16:03:03 +0200 Subject: [PATCH 2/4] Added missing space for tooltip in the settings --- Moonlight/Core/UI/Views/Admin/Sys/Settings.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moonlight/Core/UI/Views/Admin/Sys/Settings.razor b/Moonlight/Core/UI/Views/Admin/Sys/Settings.razor index b76fe909..61fc5535 100644 --- a/Moonlight/Core/UI/Views/Admin/Sys/Settings.razor +++ b/Moonlight/Core/UI/Views/Admin/Sys/Settings.razor @@ -22,7 +22,7 @@ } else { -
+
@{ string title; From 538a15b6090c8b02b3f685dcb2e710b52c765a9c Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 23 Apr 2024 16:03:35 +0200 Subject: [PATCH 3/4] Added new mooncore form attributes for creating servers --- .../Forms/Admin/Servers/CreateServerForm.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Moonlight/Features/Servers/Models/Forms/Admin/Servers/CreateServerForm.cs b/Moonlight/Features/Servers/Models/Forms/Admin/Servers/CreateServerForm.cs index fe915a74..ea411717 100644 --- a/Moonlight/Features/Servers/Models/Forms/Admin/Servers/CreateServerForm.cs +++ b/Moonlight/Features/Servers/Models/Forms/Admin/Servers/CreateServerForm.cs @@ -12,29 +12,36 @@ public class CreateServerForm public string Name { get; set; } [Required(ErrorMessage = "You need to specify a server owner")] - [Selector(SelectorProp = "Username", DisplayProp = "Username")] + [Selector(SelectorProp = "Username", DisplayProp = "Username", UseDropdown = true)] public User Owner { get; set; } [Required(ErrorMessage = "You need to specify a server image")] - [Selector(SelectorProp = "Name", DisplayProp = "Name")] + [Selector(SelectorProp = "Name", DisplayProp = "Name", UseDropdown = true)] public ServerImage Image { get; set; } [Range(1, int.MaxValue, ErrorMessage = "Enter a valid cpu value")] [Description("The cores the server will be able to use. 100 = 1 Core")] + [Section("Resources")] public int Cpu { get; set; } [Range(1, int.MaxValue, ErrorMessage = "Enter a valid memory value")] - [Description("The amount of memory this server will be able to use in megabytes")] + [Description("The amount of memory this server will be able to use")] + [ByteSize(MinimumUnit = 1, Converter = 1, DefaultUnit = 2)] + [Section("Resources")] public int Memory { get; set; } [Range(1, int.MaxValue, ErrorMessage = "Enter a valid disk value")] - [Description("The amount of disk space this server will be able to use in megabytes")] + [Description("The amount of disk space this server will be able to use")] + [ByteSize(MinimumUnit = 1, Converter = 1, DefaultUnit = 2)] + [Section("Resources")] public int Disk { get; set; } [Description("Whether to use a virtual disk for storing server files. Dont use this if you want to overallocate as the virtual disks will fill out the space you allocate")] + [Section("Deployment")] public bool UseVirtualDisk { get; set; } [Required(ErrorMessage = "You need to specify a server node")] - [Selector(SelectorProp = "Name", DisplayProp = "Name")] + [Selector(SelectorProp = "Name", DisplayProp = "Name", UseDropdown = true)] + [Section("Deployment")] public ServerNode Node { get; set; } } \ No newline at end of file From 9e85c35f59a6e1a44f8455645247e66594e6748d Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 23 Apr 2024 16:03:51 +0200 Subject: [PATCH 4/4] Upgraded to mooncoreui 1.1.6 --- Moonlight/Moonlight.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moonlight/Moonlight.csproj b/Moonlight/Moonlight.csproj index df200a70..1aad1236 100644 --- a/Moonlight/Moonlight.csproj +++ b/Moonlight/Moonlight.csproj @@ -90,7 +90,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - +