diff --git a/src/portal/src/app/app.component.ts b/src/portal/src/app/app.component.ts index ec6c61f52..a8dba24ae 100644 --- a/src/portal/src/app/app.component.ts +++ b/src/portal/src/app/app.component.ts @@ -20,7 +20,7 @@ import { CookieService } from 'ngx-cookie'; import { SessionService } from './shared/session.service'; import { AppConfigService } from './services/app-config.service'; import { ThemeService } from './services/theme.service'; -import { themeArray, ThemeInterface } from './services/theme'; +import { THEME_ARRAY, ThemeInterface } from './services/theme'; import { clone } from '../lib/utils/utils'; const HAS_STYLE_MODE: string = 'styleModeLocal'; @@ -30,7 +30,7 @@ const HAS_STYLE_MODE: string = 'styleModeLocal'; templateUrl: 'app.component.html' }) export class AppComponent { - themeArray: ThemeInterface[] = clone(themeArray); + themeArray: ThemeInterface[] = clone(THEME_ARRAY); styleMode: string = this.themeArray[0].showStyle; constructor( diff --git a/src/portal/src/app/base/harbor-shell/harbor-shell.component.html b/src/portal/src/app/base/harbor-shell/harbor-shell.component.html index 33b77e6a6..5301e8477 100644 --- a/src/portal/src/app/base/harbor-shell/harbor-shell.component.html +++ b/src/portal/src/app/base/harbor-shell/harbor-shell.component.html @@ -81,7 +81,17 @@
diff --git a/src/portal/src/app/base/navigator/navigator.component.scss b/src/portal/src/app/base/navigator/navigator.component.scss index 6af4a8ada..9bf6677c5 100644 --- a/src/portal/src/app/base/navigator/navigator.component.scss +++ b/src/portal/src/app/base/navigator/navigator.component.scss @@ -68,27 +68,3 @@ .dropdown-lang { padding-right: 1.3rem; } -.header { - .header-actions { - .theme-select { - width: 5.4rem; - display: flex; - align-items: center; - justify-content: flex-start; - height: 100%; - font-size: 14px; - letter-spacing: 1px; - cursor: pointer; - &:hover { - opacity: 1; - } - clr-icon { - position: static; - transform: none; - margin-right: .2rem; - min-width: 20px; - } - } - } -} - diff --git a/src/portal/src/app/base/navigator/navigator.component.ts b/src/portal/src/app/base/navigator/navigator.component.ts index 037c8f88f..ee993bb90 100644 --- a/src/portal/src/app/base/navigator/navigator.component.ts +++ b/src/portal/src/app/base/navigator/navigator.component.ts @@ -26,10 +26,7 @@ import { SearchTriggerService } from '../global-search/search-trigger.service'; import { MessageHandlerService } from '../../shared/message-handler/message-handler.service'; import { SkinableConfig } from "../../services/skinable-config.service"; import { CommonRoutes } from "../../../lib/entities/shared.const"; -import { ThemeInterface, themeArray } from '../../services/theme'; -import { clone } from '../../../lib/utils/utils'; -import { ThemeService } from '../../services/theme.service'; -const HAS_STYLE_MODE: string = 'styleModeLocal'; + @Component({ selector: 'navigator', @@ -46,9 +43,6 @@ export class NavigatorComponent implements OnInit { appTitle: string = 'APP_TITLE.HARBOR'; customStyle: { [key: string]: any }; customProjectName: { [key: string]: any }; - themeArray: ThemeInterface[] = clone(themeArray); - - styleMode = this.themeArray[0].showStyle; constructor( private session: SessionService, private router: Router, @@ -58,7 +52,6 @@ export class NavigatorComponent implements OnInit { private appConfigService: AppConfigService, private msgHandler: MessageHandlerService, private searchTrigger: SearchTriggerService, - public theme: ThemeService, private skinableConfig: SkinableConfig) { } @@ -86,8 +79,6 @@ export class NavigatorComponent implements OnInit { if (this.appConfigService.getConfig().read_only) { this.msgHandler.handleReadOnly(); } - // set local in app - this.styleMode = localStorage.getItem(HAS_STYLE_MODE); } public get isSessionValid(): boolean { @@ -196,10 +187,4 @@ export class NavigatorComponent implements OnInit { registryAction(): void { this.searchTrigger.closeSearch(true); } - - themeChanged(theme) { - this.styleMode = theme.mode; - this.theme.loadStyle(theme.toggleFileName); - localStorage.setItem(HAS_STYLE_MODE, this.styleMode); - } } diff --git a/src/portal/src/app/config/scanner/config-scanner.component.html b/src/portal/src/app/config/scanner/config-scanner.component.html index ff0097992..1148aa5cf 100644 --- a/src/portal/src/app/config/scanner/config-scanner.component.html +++ b/src/portal/src/app/config/scanner/config-scanner.component.html @@ -27,11 +27,11 @@ [disabled]="!(selectedRow && !selectedRow.is_default)">