From ad4c3ceac2cdea5a569946e71d722d96f422606a Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Sun, 24 May 2026 02:18:10 +1000 Subject: Added Blazor error banner to MainLayout.razor --- Layout/MainLayout.razor | 8 ++++++-- Layout/MainLayout.razor.css | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Layout/MainLayout.razor b/Layout/MainLayout.razor index 8e9f6bd..4c1b284 100644 --- a/Layout/MainLayout.razor +++ b/Layout/MainLayout.razor @@ -1,7 +1,5 @@ @inherits LayoutComponentBase - - @@ -9,3 +7,9 @@
@Body
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
diff --git a/Layout/MainLayout.razor.css b/Layout/MainLayout.razor.css index c2b5603..7e84358 100644 --- a/Layout/MainLayout.razor.css +++ b/Layout/MainLayout.razor.css @@ -1,4 +1,4 @@ -div#content { +div#content { flex: 1 1 calc(100vh - 59px); overflow-x: hidden; overflow-y: auto; @@ -7,3 +7,24 @@ body.mobile-menu-visible div#content { display: none; } + +#blazor-error-ui { + color-scheme: light only; + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + +#blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; +} -- cgit v1.3