mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
93492: Fix SSR dodging pinned admin sidebar
On the server, @slideSidebarPadding always resolved to 'expanded' because slideSidebarOver did not emit true This resulted in the SSR HTML leaving space for the expanded sidebar. Also got rid of the sliding animation as it would always play, even when replacing SSR HTML where the sidebar was already visible.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
import { map, startWith } from 'rxjs/operators';
|
||||
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@@ -71,7 +71,8 @@ export class RootComponent implements OnInit {
|
||||
const sidebarCollapsed = this.menuService.isMenuCollapsed(MenuID.ADMIN);
|
||||
this.slideSidebarOver = combineLatestObservable([sidebarCollapsed, this.windowService.isXsOrSm()])
|
||||
.pipe(
|
||||
map(([collapsed, mobile]) => collapsed || mobile)
|
||||
map(([collapsed, mobile]) => collapsed || mobile),
|
||||
startWith(true),
|
||||
);
|
||||
|
||||
if (this.router.url === getPageInternalServerErrorRoute()) {
|
||||
|
Reference in New Issue
Block a user