mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Add support for dynamic themes
This commit is contained in:
35
src/app/root/themed-root.component.ts
Normal file
35
src/app/root/themed-root.component.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { ThemedComponent } from '../shared/theme-support/themed.component';
|
||||
import { RootComponent } from './root.component';
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-themed-root',
|
||||
styleUrls: [],
|
||||
templateUrl: '../shared/theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedRootComponent extends ThemedComponent<RootComponent> {
|
||||
/**
|
||||
* Whether or not the authentication is currently blocking the UI
|
||||
*/
|
||||
@Input() isNotAuthBlocking: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the the application is loading;
|
||||
*/
|
||||
@Input() isLoading: boolean;
|
||||
|
||||
protected inAndOutputNames: (keyof RootComponent & keyof this)[] = ['isLoading', 'isNotAuthBlocking'];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'RootComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../themes/${themeName}/app/root/root.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import(`./root.component`);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user