Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Fixed a bug where companion bar would be pushing content to the right even when not visible. Updated nav service localstorage key. (#1159)

Joseph Milazzo3a9d6b1a08b6
diff --git a/UI/Web/src/app/_services/nav.service.ts b/UI/Web/src/app/_services/nav.service.ts
index 9dba9d9b0..816098c73 100644
--- a/UI/Web/src/app/_services/nav.service.ts
+++ b/UI/Web/src/app/_services/nav.service.ts
@@ -5,7 +5,7 @@ import { ReplaySubject, take } from 'rxjs';
providedIn: 'root'
})
export class NavService {
- public localStorageSideNavKey = 'kavita--sidenav--collapsed';
+ public localStorageSideNavKey = 'kavita--sidenav--expanded';
private navbarVisibleSource = new ReplaySubject<boolean>(1);
/**
diff --git a/UI/Web/src/app/app.component.html b/UI/Web/src/app/app.component.html
index 7cb10f46e..6aea0bc3f 100644
--- a/UI/Web/src/app/app.component.html
+++ b/UI/Web/src/app/app.component.html
@@ -3,8 +3,14 @@
<a id="content"></a>
<app-side-nav *ngIf="navService.sideNavVisibility$ | async"></app-side-nav>
<div class="container-fluid" style="padding-top: 10px; padding-bottom: 10px;">
- <div class="companion-bar" [ngClass]="{'companion-bar-content': (navService?.sideNavCollapsed$ | async)}">
+ <ng-container *ngIf="navService.sideNavVisibility$ | async else noSideNav">
+ <div class="companion-bar" [ngClass]="{'companion-bar-content': (navService?.sideNavCollapsed$ | async)}">
+ <router-outlet></router-outlet>
+ </div>
+ </ng-container>
+ <ng-template #noSideNav>
<router-outlet></router-outlet>
- </div>
+ </ng-template>
+
</div>
</div>
diff --git a/UI/Web/src/app/manga-reader/manga-reader.component.ts b/UI/Web/src/app/manga-reader/manga-reader.component.ts
index ec00fe7cc..4ae108b45 100644
--- a/UI/Web/src/app/manga-reader/manga-reader.component.ts
+++ b/UI/Web/src/app/manga-reader/manga-reader.component.ts
@@ -431,9 +431,9 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
this.navService.showSideNav();
this.onDestroy.next();
this.onDestroy.complete();
- this.goToPageEvent.complete();
this.showBookmarkEffectEvent.complete();
this.readerService.exitFullscreen();
+ if (this.goToPageEvent !== undefined) this.goToPageEvent.complete();
}
@HostListener('window:keyup', ['$event'])