mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge branch 'main' into w2p-87382_circular-dependency-fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
import { Component, Inject, OnInit, Input } from '@angular/core';
|
||||
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { combineLatest as combineLatestObservable, Observable, of } from 'rxjs';
|
||||
@@ -19,6 +19,7 @@ import { Angulartics2DSpace } from '../statistics/angulartics/dspace-provider';
|
||||
import { environment } from '../../environments/environment';
|
||||
import { slideSidebarPadding } from '../shared/animations/slide';
|
||||
import { MenuID } from '../shared/menu/menu-id.model';
|
||||
import { getPageInternalServerErrorRoute } from '../app-routing-paths';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-root',
|
||||
@@ -32,7 +33,7 @@ export class RootComponent implements OnInit {
|
||||
collapsedSidebarWidth: Observable<string>;
|
||||
totalSidebarWidth: Observable<string>;
|
||||
theme: Observable<ThemeConfig> = of({} as any);
|
||||
notificationOptions = environment.notifications;
|
||||
notificationOptions;
|
||||
models;
|
||||
|
||||
/**
|
||||
@@ -58,6 +59,7 @@ export class RootComponent implements OnInit {
|
||||
private menuService: MenuService,
|
||||
private windowService: HostWindowService
|
||||
) {
|
||||
this.notificationOptions = environment.notifications;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -67,9 +69,13 @@ export class RootComponent implements OnInit {
|
||||
this.totalSidebarWidth = this.cssService.getVariable('totalSidebarWidth');
|
||||
|
||||
const sidebarCollapsed = this.menuService.isMenuCollapsed(MenuID.ADMIN);
|
||||
this.slideSidebarOver = combineLatestObservable(sidebarCollapsed, this.windowService.isXsOrSm())
|
||||
this.slideSidebarOver = combineLatestObservable([sidebarCollapsed, this.windowService.isXsOrSm()])
|
||||
.pipe(
|
||||
map(([collapsed, mobile]) => collapsed || mobile)
|
||||
);
|
||||
|
||||
if (this.router.url === getPageInternalServerErrorRoute()) {
|
||||
this.shouldShowRouteLoader = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user