Refactored frontend to work with the latest mooncore changes

This commit is contained in:
2025-07-16 20:46:45 +02:00
parent 383d4bb24b
commit 61253919cf
93 changed files with 3347 additions and 1661 deletions

View File

@@ -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 @@
<HandleForm @ref="HandleForm" Model="Form" OnValidSubmit="OnValidSubmit">
<div class="grid grid-cols-2 gap-2">
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Name</label>
<input @bind="Form.Name" type="text" class="form-input w-full"/>
<label class="block text-sm font-medium leading-6 text-base-content">Name</label>
<input @bind="Form.Name" type="text" class="input w-full"/>
</div>
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Description</label>
<input @bind="Form.Description" type="text" class="form-input w-full"/>
<label class="block text-sm font-medium leading-6 text-base-content">Description</label>
<input @bind="Form.Description" type="text" class="input w-full"/>
</div>
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Key</label>
<input @bind="Form.Key" type="text" class="form-input w-full"/>
<label class="block text-sm font-medium leading-6 text-base-content">Key</label>
<input @bind="Form.Key" type="text" class="input w-full"/>
</div>
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Default Value</label>
<input @bind="Form.DefaultValue" type="text" class="form-input w-full"/>
<label class="block text-sm font-medium leading-6 text-base-content">Default Value</label>
<input @bind="Form.DefaultValue" type="text" class="input w-full"/>
</div>
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Allow Viewing</label>
<label class="block text-sm font-medium leading-6 text-base-content">Allow Viewing</label>
<Switch @bind-Value="Form.AllowViewing"/>
</div>
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Allow Editing</label>
<label class="block text-sm font-medium leading-6 text-base-content">Allow Editing</label>
<Switch @bind-Value="Form.AllowEditing"/>
</div>
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Type</label>
<select @bind="Form.Type" class="form-select w-full">
<label class="block text-sm font-medium leading-6 text-base-content">Type</label>
<select @bind="Form.Type" class="select w-full">
@foreach (var val in Enum.GetValues<StarVariableType>())
{
<option value="@val">@val</option>
@@ -52,8 +50,8 @@
</div>
<div class="col-span-1">
<label class="block text-sm font-medium leading-6 text-white">Filter</label>
<input @bind="Form.Filter" type="text" class="form-input w-full"/>
<label class="block text-sm font-medium leading-6 text-base-content">Filter</label>
<input @bind="Form.Filter" type="text" class="input w-full"/>
</div>
</div>
</HandleForm>