diff --git a/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.component.ts b/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.component.ts
index d8348f19352e..9643c7a4ca39 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.component.ts
+++ b/nifi-frontend/src/main/frontend/apps/nifi-jolt-transform-ui/src/app/app.component.ts
@@ -16,7 +16,7 @@
*/
import { Component, inject } from '@angular/core';
-import { Storage, ThemingService } from '@nifi/shared';
+import { OS_SETTING, Storage, ThemingService } from '@nifi/shared';
@Component({
selector: 'nifi-jolt-transform-json-ui',
@@ -31,7 +31,7 @@ export class AppComponent {
title = 'nifi-jolt-transform-json-ui';
constructor() {
- let theme = this.storage.getItem('theme');
+ let theme = this.storage.getItem('theme') ? this.storage.getItem('theme') : OS_SETTING;
// Initially check if dark mode is enabled on system
const darkModeOn = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
@@ -42,7 +42,7 @@ export class AppComponent {
if (window.matchMedia) {
// Watch for changes of the preference
window.matchMedia('(prefers-color-scheme: dark)').addListener((e) => {
- theme = this.storage.getItem('theme');
+ theme = this.storage.getItem('theme') ? this.storage.getItem('theme') : OS_SETTING;
this.themingService.toggleTheme(e.matches, theme);
});
}
diff --git a/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/app.component.ts b/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/app.component.ts
index b63b3b69dbca..35b972ae19bb 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/app.component.ts
+++ b/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/app.component.ts
@@ -16,7 +16,7 @@
*/
import { Component, inject } from '@angular/core';
-import { ThemingService, Storage } from '@nifi/shared';
+import { ThemingService, Storage, OS_SETTING } from '@nifi/shared';
@Component({
selector: 'nifi-registry-app-root',
@@ -31,7 +31,7 @@ export class AppComponent {
title = 'nifi-registry';
constructor() {
- let theme = this.storage.getItem('theme');
+ let theme = this.storage.getItem('theme') ? this.storage.getItem('theme') : OS_SETTING;
// Initially check if dark mode is enabled on system
const darkModeOn = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
@@ -42,7 +42,7 @@ export class AppComponent {
if (window.matchMedia) {
// Watch for changes of the preference
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
- theme = this.storage.getItem('theme');
+ theme = this.storage.getItem('theme') ? this.storage.getItem('theme') : OS_SETTING;
this.themingService.toggleTheme(e.matches, theme);
});
}
diff --git a/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/_header.component-theme.scss b/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/_header.component-theme.scss
index a8dd6f0751c7..66134360bb6e 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/_header.component-theme.scss
+++ b/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/_header.component-theme.scss
@@ -44,4 +44,32 @@
opacity: 0.6;
}
}
+
+ .global-menu-item {
+ &.selected {
+ @include mat.menu-overrides(
+ (
+ item-icon-color: var(--mat-sys-primary),
+ item-label-text-color: var(--mat-sys-primary)
+ )
+ );
+
+ .fa {
+ color: var(--mat-sys-primary);
+ }
+ }
+
+ &.selected:hover {
+ @include mat.menu-overrides(
+ (
+ item-icon-color: var(--mat-sys-primary),
+ item-label-text-color: var(--mat-sys-primary)
+ )
+ );
+
+ .fa {
+ color: var(--mat-sys-primary);
+ }
+ }
+ }
}
diff --git a/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/header.component.html b/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/header.component.html
index 519111c38aa9..c990052ac0e5 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/header.component.html
+++ b/nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/ui/header/header.component.html
@@ -69,7 +69,11 @@
-
-
-
-