Random Book Fixes (#2434)

This commit is contained in:
Joe Milazzo 2023-11-15 18:48:21 -06:00 committed by GitHub
parent 1cc5484655
commit 17d6cd7843
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 284 additions and 44 deletions

View file

@ -271,6 +271,7 @@ export class ReaderService {
if (readingListMode) {
this.router.navigateByUrl('lists/' + readingListId);
} else {
// TODO: back doesn't always work, it might be nice to check the pattern of the url and see if we can be smart before just going back
this.location.back();
}
}

View file

@ -43,14 +43,16 @@
</ngx-extended-pdf-viewer>
<ng-template #multiToolbar>
<div style="min-height: 36px" id="toolbarViewer" [ngStyle]="{'background-color': backgroundColor, 'color': fontColor}"> <!--action-bar row g-0 justify-content-between-->
<div id="toolbarViewerLeft">
<div style="min-height: 36px" id="toolbarViewer" [ngStyle]="{'background-color': backgroundColor, 'color': fontColor}">
<div id="toolbarViewerLeft">
<pdf-toggle-sidebar></pdf-toggle-sidebar>
<pdf-find-button></pdf-find-button>
<pdf-paging-area></pdf-paging-area>
</div>
<div id="toolbarViewerRight">
<pdf-zoom-toolbar ></pdf-zoom-toolbar>
<div id="toolbarViewerRight">
<pdf-hand-tool></pdf-hand-tool>
<pdf-select-tool></pdf-select-tool>
<pdf-presentation-mode></pdf-presentation-mode>
@ -62,24 +64,22 @@
<span class="visually-hidden">{{this.bookMode !== 'book' ? 'Book Mode' : 'Normal Mode'}}</span>
</button> -->
<button class="btn btn-icon toolbarButton" [ngbTooltip]="bookTitle">
<button class="btn btn-icon mt-0 mb-0 pt-1 pb-0 toolbarButton" [ngbTooltip]="bookTitle">
<i class="toolbar-icon fa-solid fa-info" [ngStyle]="{color: fontColor}" aria-hidden="true"></i>
<span class="visually-hidden">
{{bookTitle}}
</span>
<span class="visually-hidden">{{bookTitle}}</span>
</button>
<button *ngIf="incognitoMode" (click)="turnOffIncognito()" class="btn btn-icon toolbarButton">
<button *ngIf="incognitoMode" (click)="turnOffIncognito()" class="btn btn-icon mt-0 mb-0 pt-1 pb-0 toolbarButton">
<i class="toolbar-icon fa fa-glasses" [ngStyle]="{color: fontColor}" aria-hidden="true"></i><span class="visually-hidden">{{t('incognito-mode')}}</span>
</button>
<!-- This is pretty experimental, so it might not work perfectly -->
<button (click)="toggleTheme()" class="btn btn-icon toolbarButton">
<button (click)="toggleTheme()" class="btn btn-icon mt-0 mb-0 pt-1 pb-0 toolbarButton">
<i class="toolbar-icon fa-solid {{this.theme === 'light' ? 'fa-sun' : 'fa-moon'}}" [ngStyle]="{color: fontColor}" aria-hidden="true"></i>
<span class="visually-hidden">{{this.theme === 'light' ? t('light-theme-alt') : t('dark-theme-alt')}}</span>
</button>
<button class="btn btn-icon col-2 col-xs-1 toolbarButton" (click)="closeReader()">
<button class="btn btn-icon col-2 col-xs-1 mt-0 mb-0 pt-1 pb-0 toolbarButton" (click)="closeReader()">
<i class="toolbar-icon fa fa-times-circle" aria-hidden="true" [ngStyle]="{color: fontColor}"></i>
<span class="visually-hidden">{{t('close-reader-alt')}}</span>
</button>
@ -87,7 +87,7 @@
<div class="verticalToolbarSeparator hiddenSmallView"></div>
<pdf-toggle-secondary-toolbar></pdf-toggle-secondary-toolbar>
</div>
<pdf-zoom-toolbar ></pdf-zoom-toolbar>
</div>
</ng-template>

View file

@ -2,6 +2,7 @@
font-size: 19px;
}
.book-title {
margin: 8px 0 4px !important;
}

View file

@ -203,7 +203,7 @@ export class PdfReaderComponent implements OnInit, OnDestroy {
saveProgress() {
if (this.incognitoMode) return;
this.readerService.saveProgress(this.libraryId, this.seriesId, this.volumeId, this.chapterId, this.currentPage).subscribe(() => {});
this.readerService.saveProgress(this.libraryId, this.seriesId, this.volumeId, this.chapterId, this.currentPage).subscribe();
}
closeReader() {