1
0

Revert "Show an error page if the rest api is not available"

This commit is contained in:
Tim Donohue
2022-01-21 11:50:08 -06:00
committed by GitHub
parent 001ba43404
commit e61de0682f
13 changed files with 15 additions and 234 deletions

View File

@@ -1,5 +1,5 @@
import { map } from 'rxjs/operators';
import { Component, Inject, Input, OnInit } from '@angular/core';
import { Component, Inject, OnInit, Input } from '@angular/core';
import { Router } from '@angular/router';
import { combineLatest as combineLatestObservable, Observable, of } from 'rxjs';
@@ -19,7 +19,6 @@ 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',
@@ -69,13 +68,9 @@ 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;
}
}
}