Add themed loading component in custom theme and fix issues

This commit is contained in:
Yana De Pauw
2022-05-11 11:30:25 +02:00
parent aac41a76cf
commit cbf0db5342
7 changed files with 20 additions and 4 deletions

View File

@@ -6,10 +6,10 @@
<div id="collapsingNav">
<ul class="navbar-nav mr-auto shadow-none">
<ng-container *ngFor="let section of (sections | async)">
<ng-container *ngComponentOutlet="(sectionMap$ | async).get(section.id)?.component; injector: (sectionMap$ | async).get(section.id).injector;"></ng-container>
<ng-container *ngComponentOutlet="(sectionMap$ | async).get(section.id)?.component; injector: (sectionMap$ | async).get(section.id)?.injector;"></ng-container>
</ng-container>
</ul>
</div>
</div>
</div>
</nav>
</nav>

View File

@@ -1,6 +1,6 @@
import { DEFAULT_THEME } from '../object-collection/shared/listable-object/listable-object.decorator';
import { MenuID } from './initial-menus-state';
import { hasNoValue, hasValue } from '../empty.util';
import { hasValue } from '../empty.util';
const menuComponentMap = new Map();

View File

@@ -70,6 +70,7 @@ export abstract class ThemedComponent<T> implements OnInit, OnDestroy, OnChanges
this.lazyLoadSub = this.resolveThemedComponent(this.themeService.getThemeName()).pipe(
switchMap((themedFile: any) => {
console.log(themedFile);
if (hasValue(themedFile) && hasValue(themedFile[this.getComponentName()])) {
// if the file is not null, and exports a component with the specified name,
// return that component

View File

@@ -0,0 +1,13 @@
import { Component } from '@angular/core';
import { LoadingComponent as BaseComponent } from '../../../../../app/shared/loading/loading.component';
@Component({
selector: 'ds-loading',
styleUrls: ['../../../../../app/shared/loading/loading.component.scss'],
// styleUrls: ['./loading.component.scss'],
templateUrl: '../../../../app/shared/loading/loading.component.html'
// templateUrl: './loading.component.html'
})
export class LoadingComponent extends BaseComponent {
}

View File

@@ -84,6 +84,7 @@ import { SearchModule } from '../../app/shared/search/search.module';
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
import { ComcolModule } from '../../app/shared/comcol/comcol.module';
import { FeedbackComponent } from './app/info/feedback/feedback.component';
import { LoadingComponent } from './app/shared/loading/loading.component';
const DECLARATIONS = [
FileSectionComponent,
@@ -126,7 +127,8 @@ const DECLARATIONS = [
NavbarComponent,
HeaderNavbarWrapperComponent,
BreadcrumbsComponent,
FeedbackComponent
FeedbackComponent,
LoadingComponent
];
@NgModule({