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 @@ {
-
+
-
+
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; 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 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 - +