diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/ApiKeys.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/ApiKeys.razor index ec88539f..bbf436e8 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/ApiKeys.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/ApiKeys.razor @@ -142,6 +142,13 @@ try { _keys = await Keys.ListAsync(default); + // The one-time banner is only meaningful while its key exists; the credential is + // otua__, so drop it once no listed key matches (deleted here or elsewhere). + if (_created is not null + && !_keys.Any(k => _created.StartsWith($"otua_{k.ApiKeyId}_", StringComparison.Ordinal))) + { + _created = null; + } } catch (Exception ex) { diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/wwwroot/css/site.css b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/wwwroot/css/site.css index 3e5c1edb..b9c3edd7 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/wwwroot/css/site.css +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/wwwroot/css/site.css @@ -48,3 +48,22 @@ flex: 0 0 18px; width: 18px; } + +/* Modal sizing (#631). Bootstrap sizes .modal-backdrop with 100vw/100vh, and 100vw includes the + scrollbar gutter, so on a tall form (Configure driver / Modbus) the backdrop overran the viewport + and produced a page-level horizontal scrollbar. Pin it with inset:0 instead (no vw/vh), and keep + the dialog inside the viewport. These modals are hand-rolled (display:block, no Bootstrap JS). */ +.modal-backdrop { + inset: 0; + width: auto; + height: auto; +} + +.modal { + overflow-x: hidden; + overflow-y: auto; +} + +.modal-dialog { + max-width: min(var(--bs-modal-width, 500px), calc(100vw - 2rem)); +}