Added themed-user-menu component.

This commit is contained in:
Eike Martin Löhden
2023-07-10 15:29:14 +02:00
parent db6edbf184
commit 23aefb7385
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import {Component, Input} from '@angular/core'
import {ThemedComponent} from '../../theme-support/themed.component';
import {UserMenuComponent} from './user-menu.component';
/**
* This component represents the user nav menu.
*/
@Component({
selector: 'ds-themed-user-menu',
templateUrl: './../../theme-support/themed.component.html',
styleUrls: []
})
export class ThemedUserMenuComponent extends ThemedComponent<UserMenuComponent>{
/**
* The input flag to show user details in navbar expandable menu
*/
@Input() inExpandableNavbar = false;
protected inAndOutputNames: (keyof UserMenuComponent & keyof this)[] = ['inExpandableNavbar'];
protected getComponentName(): string {
return 'UserMenuComponent';
}
protected importThemedComponent(themeName: string): Promise<any> {
return import((`../../../../themes/${themeName}/app/shared/auth-nav-menu/user-menu/user-menu.component`));
}
protected importUnthemedComponent(): Promise<any> {
return import('./user-menu.component');
}
}

View File

@@ -284,6 +284,7 @@ import {
} from '../item-page/simple/field-components/specific-field/title/themed-item-page-field.component';
import { BitstreamListItemComponent } from './object-list/bitstream-list-item/bitstream-list-item.component';
import { NgxPaginationModule } from 'ngx-pagination';
import {ThemedUserMenuComponent} from './auth-nav-menu/user-menu/themed-user-menu.component';
const MODULES = [
CommonModule,
@@ -332,6 +333,7 @@ const COMPONENTS = [
AuthNavMenuComponent,
ThemedAuthNavMenuComponent,
UserMenuComponent,
ThemedUserMenuComponent,
DsSelectComponent,
ErrorComponent,
LangSwitchComponent,