fix(adminui): one save-error area per driver/device modal; refusal chips print the full message (#847)

This commit is contained in:
Joseph Doherty
2026-11-11 03:41:56 -05:00
parent 01a2013ea3
commit 3b1b32f0c1
14 changed files with 175 additions and 43 deletions
@@ -57,7 +57,7 @@
</button>
</div>
}
@if (_openError is not null) { <span class="chip chip-bad" title="@_openError">@TruncatedError()</span> }
@if (_openError is not null) { <RefusalChip Message="@_openError" /> }
</div>
@if (_token != Guid.Empty)
@@ -154,8 +154,6 @@
return _useIndex ? $"{_tagName}[{_elementIndex}]" : _tagName;
}
private string TruncatedError() =>
_openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError);
public ValueTask DisposeAsync()
{
@@ -121,7 +121,7 @@
</button>
</div>
}
@if (_openError is not null) { <span class="chip chip-bad" title="@_openError">@TruncatedError()</span> }
@if (_openError is not null) { <RefusalChip Message="@_openError" /> }
</div>
@if (_token != Guid.Empty)
@@ -228,8 +228,6 @@
? FocasAddressBuilder.BuildAlarm(_alarmScope, _alarmLow, _alarmHigh)
: FocasAddressBuilder.Build(_kind, _pmcLetter, _number, _bitIndex);
private string TruncatedError() =>
_openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError);
public ValueTask DisposeAsync()
{
@@ -42,7 +42,7 @@
<span class="chip chip-ok">Browser open</span>
<button type="button" class="btn btn-outline-secondary btn-sm" @onclick="CloseBrowseAsync">Close</button>
}
@if (_openError is not null) { <span class="chip chip-bad" title="@_openError">@TruncatedError()</span> }
@if (_openError is not null) { <RefusalChip Message="@_openError" /> }
</div>
@if (_token != Guid.Empty)
@@ -215,8 +215,6 @@
return $"{_tagName}.{_attributeName}";
}
private string TruncatedError() =>
_openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError);
public ValueTask DisposeAsync()
{
@@ -40,7 +40,7 @@
Close
</button>
}
@if (_openError is not null) { <span class="chip chip-bad" title="@_openError">@TruncatedError()</span> }
@if (_openError is not null) { <RefusalChip Message="@_openError" /> }
</div>
@if (_token != Guid.Empty)
@@ -113,8 +113,6 @@
await CurrentAddressChanged.InvokeAsync(_built);
}
private string TruncatedError() =>
_openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError);
public ValueTask DisposeAsync()
{
@@ -156,7 +156,7 @@ else
<button type="button" class="btn btn-outline-secondary btn-sm" @onclick="CloseBrowseAsync">Close</button>
}
@* Same open-error chip the five sibling pickers use: abbreviated inline, full text on title. *@
@if (_openError is not null) { <span class="chip chip-bad" title="@_openError">@DisplayText.Abbreviate(_openError, 60)</span> }
@if (_openError is not null) { <RefusalChip Message="@_openError" /> }
</div>
@if (_token != Guid.Empty)
@@ -46,7 +46,7 @@
</button>
</div>
}
@if (_openError is not null) { <span class="chip chip-bad" title="@_openError">@TruncatedError()</span> }
@if (_openError is not null) { <RefusalChip Message="@_openError" /> }
</div>
@if (_token != Guid.Empty)
@@ -133,8 +133,6 @@
await CurrentAddressChanged.InvokeAsync(_built);
}
private string TruncatedError() =>
_openError is null ? "" : (_openError.Length > 60 ? _openError[..60] + "…" : _openError);
public ValueTask DisposeAsync()
{