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:
@@ -1,7 +1,14 @@
|
||||
<div class="container mt-5">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<h5 class="alert-heading">Not Authorized</h5>
|
||||
<p class="mb-0">You do not have permission to access this page. Contact your administrator if you believe this is an error.</p>
|
||||
<div class="d-flex align-items-center justify-content-center min-vh-100">
|
||||
<div class="card shadow-sm" style="max-width: 480px; width: 100%;">
|
||||
<div class="card-body p-4">
|
||||
<h4 class="card-title mb-3 text-center">ScadaLink</h4>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<h5 class="alert-heading">Not Authorized</h5>
|
||||
<p class="mb-0">You do not have permission to access this page. Contact your administrator if you believe this is an error.</p>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<a href="/" class="btn btn-outline-primary btn-sm">Return to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/" class="btn btn-outline-primary btn-sm">Return to Dashboard</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user