+
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..e07d36fec 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, '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 3816a3e5a..4a113a4f8 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, '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 35f4cbfc9..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
@@ -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, 'settings-dialog-panel']
});
}
}
diff --git a/webapp/frontend/src/styles/styles.scss b/webapp/frontend/src/styles/styles.scss
index d8ff2d63c..a04b4ad18 100644
--- a/webapp/frontend/src/styles/styles.scss
+++ b/webapp/frontend/src/styles/styles.scss
@@ -31,3 +31,59 @@
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;
+}
+
+// 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;
+}
+
+// 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;
+ }
+ }
+ }
+}