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..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; + } + } + } +}