Merge pull request #393 from Moonlight-Panel/v2_SmallUiImprovements

Small ui improvements
This commit is contained in:
Masu Baumgartner 2024-04-23 16:04:36 +02:00 committed by GitHub
commit 722c56271f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 9 deletions

View file

@ -29,10 +29,10 @@
{
<div class="card card-body p-5 mt-5">
<div class="row g-3">
<div class="col-md-1 col-2 d-flex align-items-center justify-content-center">
<div class="col-md-1 col-3 d-flex align-items-center justify-content-center">
<input class="form-control fs-3 text-center" type="number" @bind="SelectedUser.Permissions" @bind:event="oninput"/>
</div>
<div class="col-md-11 col-10">
<div class="col-md-11 col-9">
<label class="form-label">Permission Level</label>
<input @bind="SelectedUser.Permissions" @bind:event="oninput" type="range" class="form-range" min="0" max="9999"/>
</div>

View file

@ -22,7 +22,7 @@
}
else
{
<div class="card mt-5">
<div class="card mt-5 mb-5">
<div class="card-header border-bottom-0">
@{
string title;

View file

@ -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; }
}

View file

@ -90,7 +90,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MoonCore" Version="1.2.7" />
<PackageReference Include="MoonCoreUI" Version="1.1.5" />
<PackageReference Include="MoonCoreUI" Version="1.1.6" />
<PackageReference Include="Otp.NET" Version="1.3.0" />
<PackageReference Include="QRCoder" Version="1.4.3" />
<PackageReference Include="XtermBlazor" Version="1.10.2" />