From 0b5cf7c6af794bdb4ddebfa70fb9c5e480e8b30d Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Tue, 28 Apr 2026 09:07:44 +0200 Subject: [PATCH] Make Configuration UI look more reasonable on mobile devices --- client/styles/main.scss | 6 ++++ client/styles/modals.scss | 8 +++++ .../ui/configuration.scss | 29 +++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/client/styles/main.scss b/client/styles/main.scss index f5854f17..5e75add4 100644 --- a/client/styles/main.scss +++ b/client/styles/main.scss @@ -119,6 +119,12 @@ body { background-color: initial; } } + + @media only screen and (max-width: 600px) { + // On narrow screens override the inline `inset` that plugs pass to + // showPanel("modal", N) so the modal goes nearly edge-to-edge. + inset: 8px !important; + } } .sb-page-prefix { diff --git a/client/styles/modals.scss b/client/styles/modals.scss index 41d9327f..215d0e2b 100644 --- a/client/styles/modals.scss +++ b/client/styles/modals.scss @@ -6,6 +6,14 @@ border-radius: 8px; overflow: hidden; + @media only screen and (max-width: 600px) { + margin-top: 8px; + width: 100%; + max-width: 100%; + max-height: calc(100vh - 16px); + border-radius: 0; + } + .cm-content { padding: 0; diff --git a/plugs/configuration-manager/ui/configuration.scss b/plugs/configuration-manager/ui/configuration.scss index bf898e57..54f7150d 100644 --- a/plugs/configuration-manager/ui/configuration.scss +++ b/plugs/configuration-manager/ui/configuration.scss @@ -389,3 +389,32 @@ html[data-theme="dark"] .lib-danger:hover { background: #3a1f1f; } text-overflow: ellipsis; max-width: 240px; } + +@media only screen and (max-width: 600px) { + #cfg-header { padding: 12px 14px 0; } + #cfg-content { padding: 14px; } + #cfg-footer { padding: 10px 14px; flex-wrap: wrap; gap: 8px; } + #cfg-close { top: 8px; right: 8px; } + + .cfg-field { + flex-direction: column; + align-items: stretch; + gap: 8px; + } + .cfg-field-control { + margin-left: 0; + justify-content: flex-end; + } + .cfg-field-control input[type="text"], + .cfg-field-control input[type="password"], + .cfg-field-control select { + flex: 1; + min-width: 0; + } + + .lib-row { flex-direction: column; align-items: stretch; } + .lib-uri { max-width: 100%; } + .lib-footer-note { margin-right: 0; flex-basis: 100%; } + + #cfg-shortcuts-table { display: block; overflow-x: auto; } +}