9e243493fb
Applies the family-wide admin-UI cleanup playbook to the Central UI so the Blazor surfaces stop diverging from the shared kit: buttons are grouped rather than individually sized, long cell values are contained instead of widening tables, and hard-coded colours give way to theme tokens. The headline fix is that MainLayout passed Accent="#2f5fd0" to ThemeShell, which the kit emits as an inline style on the shell root. Being a descendant of <html>, it beat the [data-bs-theme="dark"] override for the entire app, so the dark accent had never rendered. Declaring --accent in site.css :root instead lets both schemes resolve; light is unchanged because the value already matched the kit's light default. Theme pins to 0.4.1, which upstreams the local .btn sizing block verbatim, so that block is deleted here rather than duplicated. Verified byte-identical before removal; the repo now declares no --bs-btn-* anywhere. NOT purely cosmetic, contrary to the sweep's stated scope: four detail-modal surfaces (NotificationReport, ConfigurationAuditLog, ParkedMessages, SiteCallsReport) were additionally refactored from holding the selected record to holding its id and re-resolving from the current page each render, with the resolve doubling as the visibility gate. A background refresh that drops the row now closes the modal instead of showing a stale snapshot. This is a behaviour change and is called out rather than buried: a full-suite run turned up one intermittent CentralUI failure, CloseButton_DismissesModal, whose stack (GetRequiredEventBindingEntry during DispatchEventAsync) indicates the handler was disposed between render and click — a window the previous field-held record made structurally impossible. Treat the modal lifecycle here as unreviewed. Build 0/0; suite green apart from that one intermittent failure.
41 lines
1.8 KiB
Plaintext
41 lines
1.8 KiB
Plaintext
@*
|
|
T33b: body component for the "Move folder" dialog hosted by
|
|
IDialogService.ShowAsync. Renders ONLY the picker + action buttons inside the
|
|
host's .modal-body; the host owns the backdrop, header, and focus trap. The
|
|
body closes with a MoveFolderResult carrying the picked parent id (null = Root,
|
|
which is why a result record is used: Close(null) would otherwise be
|
|
indistinguishable from a Cancel). The parent validates after the dialog closes
|
|
and toasts any server guard failure.
|
|
*@
|
|
<select class="form-select form-select-sm" @bind="_targetParentId">
|
|
@foreach (var opt in FolderOptions)
|
|
{
|
|
<option value="@opt.Id">@opt.Label</option>
|
|
}
|
|
</select>
|
|
|
|
<div class="modal-footer px-0 pb-0 mt-3">
|
|
<div class="btn-group btn-group-sm" role="group">
|
|
<button class="btn btn-outline-secondary" @onclick="() => Context.Cancel()">Cancel</button>
|
|
<button class="btn btn-primary" @onclick="Submit">Move</button>
|
|
</div>
|
|
</div>
|
|
|
|
@code {
|
|
/// <summary>Host-supplied context used to close (with the picked parent id) or cancel.</summary>
|
|
[Parameter] public DialogContext<MoveFolderResult> Context { get; set; } = default!;
|
|
[Parameter] public IEnumerable<(int? Id, string Label)> FolderOptions { get; set; } = Array.Empty<(int?, string)>();
|
|
|
|
private int? _targetParentId;
|
|
|
|
private void Submit() => Context.Close(new MoveFolderResult(_targetParentId));
|
|
|
|
/// <summary>
|
|
/// Result of the move-folder picker. A reference type so a non-null close is
|
|
/// distinguishable from a cancel even when the picked parent is null (Root):
|
|
/// ShowAsync resolves to this record on Move and to <c>null</c> on Cancel.
|
|
/// </summary>
|
|
/// <param name="NewParentId">The chosen parent folder id, or <c>null</c> for Root.</param>
|
|
public sealed record MoveFolderResult(int? NewParentId);
|
|
}
|