From 1254c63ecee95e1c0f7f001bd4a53ccc42103a36 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 17:03:13 +0000 Subject: [PATCH 1/4] fix(ui): Support theme switching and solid backgrounds in settings dialog - Inject active application theme (`treo-theme-dark` / `treo-theme-light`) into Angular Material dialog components dynamically when opening the dashboard, detail, and mobile settings dialogs. - Apply `panelClass="theme-select-panel"` to all `mat-select` elements across settings templates. - Explicitly style backgrounds and option text colors for settings overlays depending on the active theme in `styles.scss` to prevent transparent overlay readability issues. Co-authored-by: WyattGorman <444043+WyattGorman@users.noreply.github.com> --- .../dashboard-settings.component.html | 54 +++++++++---------- .../detail-settings.component.html | 4 +- .../modules/dashboard/dashboard.component.ts | 3 +- .../app/modules/detail/detail.component.ts | 2 + .../mobile-settings.component.ts | 3 +- webapp/frontend/src/styles/styles.scss | 23 ++++++++ 6 files changed, 58 insertions(+), 31 deletions(-) diff --git a/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html b/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html index b009470f9..037309279 100644 --- a/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html +++ b/webapp/frontend/src/app/layout/common/dashboard-settings/dashboard-settings.component.html @@ -6,7 +6,7 @@

Scrutiny Settings

Dark Mode - + System Dark Light @@ -17,7 +17,7 @@

Scrutiny Settings

Display Title - + Name Serial ID UUID @@ -27,7 +27,7 @@

Scrutiny Settings

Sort By - + Status (Failed First) Status (Passed First) Title (A-Z) @@ -45,7 +45,7 @@

Scrutiny Settings

Temperature - + Celsius Fahrenheit @@ -53,7 +53,7 @@

Scrutiny Settings

Time Format - + 24-hour (15:00) 12-hour (3:00 PM) @@ -63,7 +63,7 @@

Scrutiny Settings

File Size - + SI Units (GB) Binary Units (GiB) @@ -73,7 +73,7 @@

Scrutiny Settings

Powered On Format - + Humanize Device Hours @@ -81,7 +81,7 @@

Scrutiny Settings

Line stroke - + Smooth Straight Stepline @@ -92,7 +92,7 @@

Scrutiny Settings

Device Status - Thresholds - + Smart Scrutiny Both @@ -104,7 +104,7 @@

Scrutiny Settings

Notify - Level - + Warn Fail @@ -115,7 +115,7 @@

Scrutiny Settings

Notify - Filter Attributes - + All Critical @@ -125,7 +125,7 @@

Scrutiny Settings

Repeat Notifications - + Always Only when the value has changed @@ -135,7 +135,7 @@

Scrutiny Settings

Retrieve SCT Temperature History - + Enabled Disabled @@ -146,7 +146,7 @@

Scrutiny Settings

Notify on Collector smartctl Errors - + Enabled Disabled @@ -158,7 +158,7 @@

Scrutiny Settings

Notify on Missed Collector Ping - + Enabled Disabled @@ -215,7 +215,7 @@

Scrutiny Settings

Heartbeat Notifications - + Enabled Disabled @@ -235,7 +235,7 @@

Scrutiny Settings

Uptime Kuma Push Monitor - + Enabled Disabled @@ -291,7 +291,7 @@

Scrutiny Settings

Scheduled Reports - + Enabled Disabled @@ -303,7 +303,7 @@

Scrutiny Settings

Daily Report - + Enabled Disabled @@ -319,7 +319,7 @@

Scrutiny Settings

Weekly Report - + Enabled Disabled @@ -327,7 +327,7 @@

Scrutiny Settings

Day of Week - + Sunday Monday Tuesday @@ -347,7 +347,7 @@

Scrutiny Settings

Monthly Report - + Enabled Disabled @@ -368,7 +368,7 @@

Scrutiny Settings

PDF Generation - + Enabled Disabled @@ -450,7 +450,7 @@

Add New Override

Protocol - + {{p}} @@ -463,7 +463,7 @@

Add New Override

Action - + {{a.label}} @@ -471,7 +471,7 @@

Add New Override

Status - + {{s}} @@ -588,7 +588,7 @@

Add Notification Channel

Service - + Custom Shoutrrr URL SMTP Email Discord diff --git a/webapp/frontend/src/app/layout/common/detail-settings/detail-settings.component.html b/webapp/frontend/src/app/layout/common/detail-settings/detail-settings.component.html index 8c7617ad0..3c20fb851 100644 --- a/webapp/frontend/src/app/layout/common/detail-settings/detail-settings.component.html +++ b/webapp/frontend/src/app/layout/common/detail-settings/detail-settings.component.html @@ -13,7 +13,7 @@

Device Settings

Threshold Data - + Scrutiny Manufacturer @@ -23,7 +23,7 @@

Device Settings

Notifications - + Enabled Disabled diff --git a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts index 0212a39ba..2bac62eb9 100644 --- a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts +++ b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts @@ -442,7 +442,8 @@ export class DashboardComponent implements OnInit, OnDestroy } openDialog(): void { - const dialogRef = this.dialog.open(DashboardSettingsComponent, {width: '800px', maxWidth: '95vw'}); + const theme = document.body.classList.contains('treo-theme-dark') ? 'treo-theme-dark' : 'treo-theme-light'; + const dialogRef = this.dialog.open(DashboardSettingsComponent, {width: '800px', maxWidth: '95vw', panelClass: theme}); dialogRef.afterClosed().subscribe(); } diff --git a/webapp/frontend/src/app/modules/detail/detail.component.ts b/webapp/frontend/src/app/modules/detail/detail.component.ts index 3816a3e5a..d1ff2fbbf 100644 --- a/webapp/frontend/src/app/modules/detail/detail.component.ts +++ b/webapp/frontend/src/app/modules/detail/detail.component.ts @@ -729,9 +729,11 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy { if (!this.device) return; const globalMissedPingTimeout = this.config?.metrics?.missed_ping_timeout_minutes || 15; + const theme = document.body.classList.contains('treo-theme-dark') ? 'treo-theme-dark' : 'treo-theme-light'; const dialogRef = this.dialog.open(DetailSettingsComponent, { width: '600px', + panelClass: theme, data: { curMuted: this.device.muted, curLabel: this.device.label, diff --git a/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts b/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts index 35f4cbfc9..a40fbb890 100644 --- a/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts +++ b/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts @@ -16,11 +16,12 @@ export class MobileSettingsComponent { constructor(private readonly dialog: MatDialog) {} openSettings(): void { + const theme = document.body.classList.contains('treo-theme-dark') ? 'treo-theme-dark' : 'treo-theme-light'; this.dialog.open(DashboardSettingsComponent, { width: '100vw', maxWidth: '100vw', height: '100vh', - panelClass: 'mobile-settings-dialog' + panelClass: ['mobile-settings-dialog', theme] }); } } diff --git a/webapp/frontend/src/styles/styles.scss b/webapp/frontend/src/styles/styles.scss index d8ff2d63c..6d54eb499 100644 --- a/webapp/frontend/src/styles/styles.scss +++ b/webapp/frontend/src/styles/styles.scss @@ -31,3 +31,26 @@ color: #CFD8E3 !important; } } + +// Mat-Select dropdown panel in dark mode (passed to panelClass) +.treo-theme-dark .theme-select-panel { + background-color: #1e293b !important; +} +.treo-theme-light .theme-select-panel { + background-color: #ffffff !important; +} + +// Ensure proper dialog background and text color for settings dialogs +.treo-theme-dark.mat-mdc-dialog-container .mdc-dialog__surface, +.treo-theme-dark .mat-mdc-dialog-surface { + background-color: #1e293b !important; + color: #e2e8f0 !important; +} + +// Ensure option text color is readable in dark mode +.treo-theme-dark .theme-select-panel .mat-mdc-option { + color: #e2e8f0 !important; +} +.treo-theme-dark .theme-select-panel .mat-mdc-select-value-text { + color: #e2e8f0 !important; +} From a9b3984233c6e77e677305f53cc8dfb288a12710 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 23:06:54 +0000 Subject: [PATCH 2/4] fix(ui): Support theme switching and solid backgrounds in settings dialog - Inject active application theme (`treo-theme-dark` / `treo-theme-light`) into Angular Material dialog components dynamically when opening the dashboard, detail, and mobile settings dialogs. - Apply `panelClass="theme-select-panel"` to all `mat-select` elements across settings templates. - Explicitly style backgrounds and option text colors for settings overlays depending on the active theme in `styles.scss` to prevent transparent overlay readability issues. Co-authored-by: WyattGorman <444043+WyattGorman@users.noreply.github.com> --- webapp/npm_output.log | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 webapp/npm_output.log diff --git a/webapp/npm_output.log b/webapp/npm_output.log new file mode 100644 index 000000000..058a3a35d --- /dev/null +++ b/webapp/npm_output.log @@ -0,0 +1,7 @@ + +> @treo/starter@1.0.1 start +> ng serve --open + +Prebundling has been configured but will not be used because scripts optimization is enabled. +An unhandled exception occurred: Port 4200 is already in use. Use '--port' to specify a different port. +See "/tmp/ng-AhRfce/angular-errors.log" for further details. From 4c2db8fc6a6de590459728a1c016913b195ed4c7 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 02:37:14 +0000 Subject: [PATCH 3/4] fix(ui): Support theme switching and solid backgrounds in dialogs/menus - Inject active application theme (`treo-theme-dark` / `treo-theme-light`) into Angular Material dialog components dynamically when opening the dashboard, detail, and mobile settings dialogs. - Apply `panelClass="theme-select-panel"` to all `mat-select` elements across settings templates. - Explicitly style backgrounds and option text colors for settings overlays depending on the active theme in `styles.scss` to prevent transparent overlay readability issues. - Apply dark and light backgrounds respectively to dashboard `mat-menu` components ensuring readable text. Co-authored-by: WyattGorman <444043+WyattGorman@users.noreply.github.com> --- webapp/frontend/src/styles/styles.scss | 15 +++++++++++++++ webapp/npm_output.log | 7 ------- 2 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 webapp/npm_output.log diff --git a/webapp/frontend/src/styles/styles.scss b/webapp/frontend/src/styles/styles.scss index 6d54eb499..5415effae 100644 --- a/webapp/frontend/src/styles/styles.scss +++ b/webapp/frontend/src/styles/styles.scss @@ -54,3 +54,18 @@ .treo-theme-dark .theme-select-panel .mat-mdc-select-value-text { color: #e2e8f0 !important; } + +// Fix transparency on Mat-Menu panels +.treo-theme-dark .mat-mdc-menu-panel { + background-color: #1e293b !important; +} +.treo-theme-dark .mat-mdc-menu-item { + color: #e2e8f0 !important; +} +.treo-theme-dark .mat-mdc-menu-item .mat-icon { + color: #e2e8f0 !important; +} + +.treo-theme-light .mat-mdc-menu-panel { + background-color: #ffffff !important; +} diff --git a/webapp/npm_output.log b/webapp/npm_output.log deleted file mode 100644 index 058a3a35d..000000000 --- a/webapp/npm_output.log +++ /dev/null @@ -1,7 +0,0 @@ - -> @treo/starter@1.0.1 start -> ng serve --open - -Prebundling has been configured but will not be used because scripts optimization is enabled. -An unhandled exception occurred: Port 4200 is already in use. Use '--port' to specify a different port. -See "/tmp/ng-AhRfce/angular-errors.log" for further details. From 8db02789d853aee16f38b0fe9e3edc714f6e12c5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 13:52:14 +0000 Subject: [PATCH 4/4] fix: theme inheritance and transparent dropdown backgrounds in settings - Pass current theme class dynamically to mat-dialog instances via panelClass. - Add theme-select-panel class to mat-select components for explicit styling. - Update styles.scss to provide solid backgrounds for mat-select and mat-menu. - Fix dark mode text readability in dialogs by targeting the cdk-overlay-container and settings-dialog-panel. Co-authored-by: WyattGorman <444043+WyattGorman@users.noreply.github.com> --- .../modules/dashboard/dashboard.component.ts | 2 +- .../src/app/modules/detail/detail.component.ts | 2 +- .../mobile-settings.component.ts | 2 +- webapp/frontend/src/styles/styles.scss | 18 ++++++++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts index 2bac62eb9..e07d36fec 100644 --- a/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts +++ b/webapp/frontend/src/app/modules/dashboard/dashboard.component.ts @@ -443,7 +443,7 @@ export class DashboardComponent implements OnInit, OnDestroy openDialog(): void { const theme = document.body.classList.contains('treo-theme-dark') ? 'treo-theme-dark' : 'treo-theme-light'; - const dialogRef = this.dialog.open(DashboardSettingsComponent, {width: '800px', maxWidth: '95vw', panelClass: theme}); + const dialogRef = this.dialog.open(DashboardSettingsComponent, {width: '800px', maxWidth: '95vw', panelClass: [theme, 'settings-dialog-panel']}); dialogRef.afterClosed().subscribe(); } diff --git a/webapp/frontend/src/app/modules/detail/detail.component.ts b/webapp/frontend/src/app/modules/detail/detail.component.ts index d1ff2fbbf..4a113a4f8 100644 --- a/webapp/frontend/src/app/modules/detail/detail.component.ts +++ b/webapp/frontend/src/app/modules/detail/detail.component.ts @@ -733,7 +733,7 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy { const dialogRef = this.dialog.open(DetailSettingsComponent, { width: '600px', - panelClass: theme, + panelClass: [theme, 'settings-dialog-panel'], data: { curMuted: this.device.muted, curLabel: this.device.label, diff --git a/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts b/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts index a40fbb890..1c4272dd3 100644 --- a/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts +++ b/webapp/frontend/src/app/modules/mobile-settings/mobile-settings.component.ts @@ -21,7 +21,7 @@ export class MobileSettingsComponent { width: '100vw', maxWidth: '100vw', height: '100vh', - panelClass: ['mobile-settings-dialog', theme] + panelClass: ['mobile-settings-dialog', theme, 'settings-dialog-panel'] }); } } diff --git a/webapp/frontend/src/styles/styles.scss b/webapp/frontend/src/styles/styles.scss index 5415effae..a04b4ad18 100644 --- a/webapp/frontend/src/styles/styles.scss +++ b/webapp/frontend/src/styles/styles.scss @@ -69,3 +69,21 @@ .treo-theme-light .mat-mdc-menu-panel { background-color: #ffffff !important; } + +// Target overlay container specifically +.cdk-overlay-container { + .settings-dialog-panel.treo-theme-dark { + .mat-mdc-dialog-surface, .mdc-dialog__surface { + background-color: var(--treo-card-background, #1e293b) !important; + color: var(--treo-text-default, #e2e8f0) !important; + + h2, span, mat-label, .mat-mdc-dialog-title, .mat-mdc-select-value-text, .mdc-button__label, input, .mat-mdc-form-field-label { + color: var(--treo-text-default, #e2e8f0) !important; + } + + .mat-mdc-form-field-hint { + color: var(--treo-text-secondary, #94a3b8) !important; + } + } + } +}