From b0c4f97ba21b7248bbf7c3cfb84ac97c1df8f7b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 12:54:59 +0000 Subject: [PATCH 1/2] aio-interface: improve overlay log appearance Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/d51a2637-5128-4c8a-a18c-a86085d2cb88 aio-interface: do not cache the containers, logs and setup screen as it shows credentials Signed-off-by: Simon L. fix: address PR review comments - remove inline script (CSP), use default font string Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/62e290a3-94de-4988-aeb8-b577fec135a7 Co-Authored-By: szaimen <42591237+szaimen@users.noreply.github.com> --- php/public/logs.css | 4 +++- php/public/style.css | 4 ++-- php/public/toggle-dark-mode.js | 2 ++ php/src/Controller/DockerController.php | 2 +- php/templates/layout.twig | 4 ++-- php/templates/log.twig | 4 ++-- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/php/public/logs.css b/php/public/logs.css index 04f6be1a..3efcf40d 100644 --- a/php/public/logs.css +++ b/php/public/logs.css @@ -10,6 +10,7 @@ pre { margin: 0; padding: 1rem; box-sizing: border-box; + font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, Ubuntu, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; } #floating-box { position: fixed; @@ -26,7 +27,8 @@ pre { gap: 0.5rem; font-size: large; border: solid thin gray; - background-color: #f9f9f9; + background-color: var(--color-main-background); + color: var(--color-main-text); width: 10rem; padding: 0.5rem 1rem; margin: 0 0 0 1rem; diff --git a/php/public/style.css b/php/public/style.css index 9a8d17d7..40f4ec76 100644 --- a/php/public/style.css +++ b/php/public/style.css @@ -483,8 +483,8 @@ input[type="checkbox"]:disabled:not(:checked) + label { visibility: hidden; opacity: 0; align-self: start; - width: 300px; - height: 200px; + width: min(700px, calc(100vw - 4rem)); + height: min(400px, calc(100vh - 14rem)); border-radius: var(--border-radius-large); border: solid thin rgb(192, 192, 192); } diff --git a/php/public/toggle-dark-mode.js b/php/public/toggle-dark-mode.js index 44eff9ff..8f1e13a4 100644 --- a/php/public/toggle-dark-mode.js +++ b/php/public/toggle-dark-mode.js @@ -35,4 +35,6 @@ setThemeToDOM(getSavedTheme()); document.addEventListener('DOMContentLoaded', () => { setThemeIcon(getSavedTheme()) document.querySelector('button#theme-toggle')?.addEventListener('click', () => toggleTheme()); + // Re-apply theme when the overlay-log iframe navigates (e.g. after a form submission). + document.querySelector('iframe#overlay-log')?.addEventListener('load', () => setThemeToDOM(getSavedTheme())); }); diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 66e8a3e2..a0e1493b 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -401,7 +401,7 @@ readonly class DockerController { - + diff --git a/php/templates/layout.twig b/php/templates/layout.twig index 15ec70f6..7450fdd1 100644 --- a/php/templates/layout.twig +++ b/php/templates/layout.twig @@ -2,10 +2,10 @@ AIO - + - + diff --git a/php/templates/log.twig b/php/templates/log.twig index afcb0828..d8194981 100644 --- a/php/templates/log.twig +++ b/php/templates/log.twig @@ -2,8 +2,8 @@ AIO - - + + From f178b49cc14a5f1f3fbb792624790343a4f07176 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 May 2026 11:56:51 +0000 Subject: [PATCH 2/2] fix: apply dark mode in overlay iframe via storage events and apply-theme.js Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/bc95f559-e0c7-4682-96fb-0799956a95c6 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- php/public/apply-theme.js | 14 ++++++++++++++ php/public/toggle-dark-mode.js | 2 +- php/src/Controller/DockerController.php | 1 + php/templates/log.twig | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 php/public/apply-theme.js diff --git a/php/public/apply-theme.js b/php/public/apply-theme.js new file mode 100644 index 00000000..91783b16 --- /dev/null +++ b/php/public/apply-theme.js @@ -0,0 +1,14 @@ +"use strict"; + +// Apply the saved theme immediately to avoid a flash of the wrong theme. +try { document.documentElement.setAttribute('data-theme', localStorage.getItem('theme') ?? ''); } catch (e) {} + +// React when the user toggles the theme on the parent page while this page is +// open in an iframe. localStorage.setItem() fires a 'storage' event on every +// other window / frame that shares the same origin, so we can keep in sync +// without the parent having to know about us. +window.addEventListener('storage', (e) => { + if (e.key === 'theme') { + document.documentElement.setAttribute('data-theme', e.newValue ?? ''); + } +}); diff --git a/php/public/toggle-dark-mode.js b/php/public/toggle-dark-mode.js index 8f1e13a4..60d9f489 100644 --- a/php/public/toggle-dark-mode.js +++ b/php/public/toggle-dark-mode.js @@ -11,7 +11,7 @@ function toggleTheme() { function setThemeToDOM(value) { // Set the theme to the root document and all possible iframe documents (so they can adapt their styling, too). - const documents = [document, Array.from(document.querySelectorAll('iframe')).map((iframe) => iframe.contentDocument)].flat() + const documents = [document, ...Array.from(document.querySelectorAll('iframe')).map((iframe) => iframe.contentDocument).filter(Boolean)] documents.forEach((doc) => doc.documentElement.setAttribute('data-theme', value)); } diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index a0e1493b..b9df82da 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -402,6 +402,7 @@ readonly class DockerController { + diff --git a/php/templates/log.twig b/php/templates/log.twig index d8194981..8dc849a4 100644 --- a/php/templates/log.twig +++ b/php/templates/log.twig @@ -5,6 +5,7 @@ +