Skip to content

Build your personal knowledge base with Trilium Notes

style(setup): set the desktop error banner's header in the title bar band

Elian Doran6cb225c37742
diff --git a/apps/client/src/setup.css b/apps/client/src/setup.css
index c53525af72..668194c68d 100644
--- a/apps/client/src/setup.css
+++ b/apps/client/src/setup.css
@@ -223,7 +223,7 @@ body.setup {
margin: 0;
border-radius: 0;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
- padding-top: calc(1em + env(titlebar-area-height, 0px) + var(--safe-area-inset-top, env(safe-area-inset-top)));
+ padding-top: calc(1em + var(--safe-area-inset-top, env(safe-area-inset-top)));
padding-inline-end: 2.5em;
user-select: text;
@@ -235,7 +235,7 @@ body.setup {
button {
position: absolute;
- top: calc(0.5em + env(titlebar-area-height, 0px));
+ top: 0.5em;
inset-inline-end: 0.5em;
}
}
@@ -378,6 +378,29 @@ body.setup.electron {
-webkit-app-region: no-drag;
z-index: 11;
}
+
+ /* The error's header shares the band with the window controls: it drags the window and stays
+ clear of the controls on either side. Stacked above `.drag-region` so the dismiss button
+ receives clicks. */
+ .page > .page-error {
+ z-index: 11;
+ padding-top: 0;
+
+ .admonition-header {
+ height: env(titlebar-area-height, 40px);
+ margin-block-end: 0;
+ padding-left: max(0px, calc(env(titlebar-area-x, 0px) - 1em));
+ padding-right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw));
+ -webkit-app-region: drag;
+ }
+
+ button {
+ top: calc(env(titlebar-area-height, 40px) / 2);
+ right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + 0.5em);
+ transform: translateY(-50%);
+ -webkit-app-region: no-drag;
+ }
+ }
}
@keyframes lds-ring {