mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Add themed loading component in custom theme and fix issues
This commit is contained in:
@@ -6,10 +6,10 @@
|
|||||||
<div id="collapsingNav">
|
<div id="collapsingNav">
|
||||||
<ul class="navbar-nav mr-auto shadow-none">
|
<ul class="navbar-nav mr-auto shadow-none">
|
||||||
<ng-container *ngFor="let section of (sections | async)">
|
<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>
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { DEFAULT_THEME } from '../object-collection/shared/listable-object/listable-object.decorator';
|
import { DEFAULT_THEME } from '../object-collection/shared/listable-object/listable-object.decorator';
|
||||||
import { MenuID } from './initial-menus-state';
|
import { MenuID } from './initial-menus-state';
|
||||||
import { hasNoValue, hasValue } from '../empty.util';
|
import { hasValue } from '../empty.util';
|
||||||
|
|
||||||
const menuComponentMap = new Map();
|
const menuComponentMap = new Map();
|
||||||
|
|
||||||
|
@@ -70,6 +70,7 @@ export abstract class ThemedComponent<T> implements OnInit, OnDestroy, OnChanges
|
|||||||
|
|
||||||
this.lazyLoadSub = this.resolveThemedComponent(this.themeService.getThemeName()).pipe(
|
this.lazyLoadSub = this.resolveThemedComponent(this.themeService.getThemeName()).pipe(
|
||||||
switchMap((themedFile: any) => {
|
switchMap((themedFile: any) => {
|
||||||
|
console.log(themedFile);
|
||||||
if (hasValue(themedFile) && hasValue(themedFile[this.getComponentName()])) {
|
if (hasValue(themedFile) && hasValue(themedFile[this.getComponentName()])) {
|
||||||
// if the file is not null, and exports a component with the specified name,
|
// if the file is not null, and exports a component with the specified name,
|
||||||
// return that component
|
// return that component
|
||||||
|
13
src/themes/custom/app/shared/loading/loading.component.ts
Normal file
13
src/themes/custom/app/shared/loading/loading.component.ts
Normal 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 {
|
||||||
|
|
||||||
|
}
|
@@ -84,6 +84,7 @@ import { SearchModule } from '../../app/shared/search/search.module';
|
|||||||
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
||||||
import { ComcolModule } from '../../app/shared/comcol/comcol.module';
|
import { ComcolModule } from '../../app/shared/comcol/comcol.module';
|
||||||
import { FeedbackComponent } from './app/info/feedback/feedback.component';
|
import { FeedbackComponent } from './app/info/feedback/feedback.component';
|
||||||
|
import { LoadingComponent } from './app/shared/loading/loading.component';
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
FileSectionComponent,
|
FileSectionComponent,
|
||||||
@@ -126,7 +127,8 @@ const DECLARATIONS = [
|
|||||||
NavbarComponent,
|
NavbarComponent,
|
||||||
HeaderNavbarWrapperComponent,
|
HeaderNavbarWrapperComponent,
|
||||||
BreadcrumbsComponent,
|
BreadcrumbsComponent,
|
||||||
FeedbackComponent
|
FeedbackComponent,
|
||||||
|
LoadingComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Reference in New Issue
Block a user