Updated comments in Notification system
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">Seth Discord Bot</a>
|
||||
<div class="container-fluid align-items-center">
|
||||
<a class="navbar-brand align-content-center" href="">Seth Discord Bot</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<div class="notification-box @GetCssClass(notification.Type)">
|
||||
<button class="close-button" @onclick="() => DismissNotification(notification)">×</button>
|
||||
<div class="notification-message">@notification.Message</div>
|
||||
<div class="notification-timestamp">@notification.Timestamp.ToString("hh:mm:ss tt")</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
@inject NotificationService NotificationService
|
||||
|
||||
@rendermode InteractiveServer
|
||||
<h3>Console Log Viewer</h3>
|
||||
|
||||
<div class="container mt-5">
|
||||
<div class="row">
|
||||
@@ -30,9 +29,8 @@
|
||||
<h4>Controls</h4>
|
||||
<button class="btn btn-success mb-2" @onclick="StartApplication" disabled="@IsRunning">Start Application</button>
|
||||
<button class="btn btn-danger mb-2" @onclick="StopApplication" disabled="@(!IsRunning)">Stop Application</button>
|
||||
<button class="btn btn-info mb-2" @onclick="LoadPlugins" disabled="@(!IsRunning)">Load Plugins</button>
|
||||
<button class="btn btn-warning mb-2" @onclick="LoadPlugins" disabled="@(!IsRunning)">Load Plugins</button>
|
||||
<button class="btn btn-warning mb-2" @onclick="ClearLogs">Clear Logs</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,13 +12,6 @@
|
||||
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<button class="btn btn-success" @onclick="NavigateToAddPlugin">
|
||||
<span class="bi me-1"></span> Add New Plugin
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<h3>Installed Plugins</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
@@ -27,6 +20,11 @@
|
||||
<th>Version</th>
|
||||
<th>Offline Added</th>
|
||||
<th>Actions</th>
|
||||
<th>
|
||||
<button class="btn btn-outline-success" @onclick="NavigateToAddPlugin">
|
||||
<span class="bi me-1"></span> Add Local
|
||||
</button>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -40,6 +38,7 @@
|
||||
<button class="btn btn-danger btn-sm" @onclick="async () => await DeletePluginButtonClick(plugin.Name)">Delete</button>
|
||||
<button class="btn btn-info btn-sm" @onclick="async () => await PluginDetailsButtonClick(plugin.Name)">Details</button>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
@@ -1,9 +1,25 @@
|
||||
namespace WebUI.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Notification for the Notification System
|
||||
/// </summary>
|
||||
public class Notification
|
||||
{
|
||||
/// <summary>
|
||||
/// The message of the notification.
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
/// <summary>
|
||||
/// The type of the notification
|
||||
/// </summary>
|
||||
public NotificationType Type { get; set; }
|
||||
/// <summary>
|
||||
/// The time when the notification was being sent
|
||||
/// </summary>
|
||||
public DateTime Timestamp { get; set; } = DateTime.Now;
|
||||
public int DelayMs { get; set; } = 5000;
|
||||
/// <summary>
|
||||
/// The time in milliseconds while the notification should be displayed.
|
||||
/// The notification should disappear after this time
|
||||
/// </summary>
|
||||
public int DelayMs { get; set; } = 1500;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace WebUI.Models;
|
||||
|
||||
/// <summary>
|
||||
/// The notification type
|
||||
/// </summary>
|
||||
public enum NotificationType
|
||||
{
|
||||
Success,
|
||||
|
||||
Reference in New Issue
Block a user