refactor(ui/shared): scroll-lock, escape, aria-live, responsive sidebar

ConfirmDialog locks body scroll via IJSRuntime + Bootstrap's
modal-open class on show, restores on hide. Escape key now closes
the dialog; default ConfirmButtonClass flipped from btn-danger to
btn-primary so non-destructive confirms aren't red. Destructive
callsites (Delete, Discard) get explicit ConfirmButtonClass="btn-danger".

ToastNotification adds aria-live="polite" + aria-atomic="true" on the
container and an optional autoDismissMs parameter on every Show* method.

LoadingSpinner text-muted -> text-secondary for contrast.

DataTable gains a clear (x) button on the search input and applies
disabled / aria-disabled directly to the pagination buttons.

NewFolderDialog splits backdrop and modal markup to match ConfirmDialog.

NavMenu wraps the nav list in an overflow-y scroll container so the
username/sign-out footer stays anchored, and section headers convert
from <li> to <div role="presentation">.

MainLayout adds a hamburger toggle for <lg viewports; sidebar collapses
via Bootstrap collapse data attributes.

App.razor extracts inline <style> block to a shared site.css; adds a
left-border accent on the active nav link; switches the reconnect
modal to modal-dialog-centered.

Login uses d-flex / min-vh-100 centering. NotAuthorizedView gets the
same centered layout plus the ScadaLink brand heading.

Sites.razor: only the new ConfirmButtonClass="btn-danger" follow-up.
This commit is contained in:
Joseph Doherty
2026-05-12 03:32:07 -04:00
parent ff5f5a10ef
commit f7b10f2ff7
12 changed files with 326 additions and 172 deletions
@@ -6,8 +6,15 @@
{
<div class="row mb-2">
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" placeholder="Search..."
@bind="_searchTerm" @bind:event="oninput" @bind:after="ApplyFilter" />
<div class="input-group input-group-sm">
<input type="text" class="form-control form-control-sm" placeholder="Search..."
@bind="_searchTerm" @bind:event="oninput" @bind:after="ApplyFilter" />
@if (!string.IsNullOrEmpty(_searchTerm))
{
<button type="button" class="btn btn-outline-secondary"
aria-label="Clear search" @onclick="ClearSearch">&times;</button>
}
</div>
</div>
@if (FilterContent != null)
{
@@ -47,7 +54,10 @@
<nav>
<ul class="pagination pagination-sm justify-content-end">
<li class="page-item @(_currentPage <= 1 ? "disabled" : "")">
<button class="page-link" @onclick="() => GoToPage(_currentPage - 1)">Previous</button>
<button class="page-link" type="button"
disabled="@(_currentPage <= 1)"
aria-disabled="@((_currentPage <= 1).ToString().ToLowerInvariant())"
@onclick="() => GoToPage(_currentPage - 1)">Previous</button>
</li>
@for (int i = 1; i <= _totalPages; i++)
{
@@ -57,7 +67,10 @@
</li>
}
<li class="page-item @(_currentPage >= _totalPages ? "disabled" : "")">
<button class="page-link" @onclick="() => GoToPage(_currentPage + 1)">Next</button>
<button class="page-link" type="button"
disabled="@(_currentPage >= _totalPages)"
aria-disabled="@((_currentPage >= _totalPages).ToString().ToLowerInvariant())"
@onclick="() => GoToPage(_currentPage + 1)">Next</button>
</li>
</ul>
</nav>
@@ -112,6 +125,12 @@
UpdatePage();
}
private void ClearSearch()
{
_searchTerm = string.Empty;
ApplyFilter();
}
private void UpdatePage()
{
_pagedItems = _filteredItems