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