mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-4880] use getPageInternalServerErrorRoute function to determinate 500 page route
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 { ThemeConfig } from '../../config/theme.model';
|
||||
import { Angulartics2DSpace } from '../statistics/angulartics/dspace-provider';
|
||||
import { environment } from '../../environments/environment';
|
||||
import { slideSidebarPadding } from '../shared/animations/slide';
|
||||
import { getPageInternalServerErrorRoute } from '../app-routing-paths';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-root',
|
||||
@@ -67,12 +68,12 @@ 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 === '/500') {
|
||||
if (this.router.url === getPageInternalServerErrorRoute()) {
|
||||
this.shouldShowRouteLoader = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user