Updated the UI of the application
This commit is contained in:
@@ -2,46 +2,41 @@
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using DiscordBotCore.Configuration
|
||||
@using DiscordBotCore.Logging
|
||||
@using WebUI.Components.Shared
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
@rendermode InteractiveServer
|
||||
|
||||
@if (_settingsViewModel is not null)
|
||||
{
|
||||
<div class="container-fluid d-flex justify-content-center align-items-center" style="height: 95vh;">
|
||||
<div class="card shadow-lg border-0" style="max-width: 500px; width: 100%;">
|
||||
<div class="card-body p-4">
|
||||
<h2 class="card-title text-center mb-4 fw-semibold">Bot Settings</h2>
|
||||
<CenteredCard Title="Settings">
|
||||
<EditForm Model="_settingsViewModel" OnValidSubmit="HandleSubmitTask">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary class="text-danger" />
|
||||
|
||||
<EditForm Model="_settingsViewModel" OnValidSubmit="HandleSubmitTask">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary class="text-danger" />
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="tokenInput">Token</label>
|
||||
<InputText id="tokenInput" class="form-control" placeholder="Enter bot token"
|
||||
@bind-Value="_settingsViewModel.Token" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="prefixInput">Prefix</label>
|
||||
<InputText id="prefixInput" class="form-control" placeholder="!"
|
||||
@bind-Value="_settingsViewModel.Prefix" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="form-label" for="serverIdsInput">Server IDs (comma-separated)</label>
|
||||
<InputTextArea id="serverIdsInput" class="form-control" placeholder="12345, 67890" Rows="3"
|
||||
@bind-Value="_settingsViewModel.ServerIds" />
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
Save <i class="bi bi-check-lg"></i>
|
||||
</button>
|
||||
</EditForm>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="tokenInput">Token</label>
|
||||
<InputText id="tokenInput" class="form-control" placeholder="Enter bot token"
|
||||
@bind-Value="_settingsViewModel.Token" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="prefixInput">Prefix</label>
|
||||
<InputText id="prefixInput" class="form-control" placeholder="!"
|
||||
@bind-Value="_settingsViewModel.Prefix" />
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="form-label" for="serverIdsInput">Server IDs (comma-separated)</label>
|
||||
<InputTextArea id="serverIdsInput" class="form-control" placeholder="12345, 67890" Rows="3"
|
||||
@bind-Value="_settingsViewModel.ServerIds" />
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
Save <i class="bi bi-check-lg"></i>
|
||||
</button>
|
||||
</EditForm>
|
||||
</CenteredCard>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
Reference in New Issue
Block a user