Fixed the layout of the RP buttons in book reader.

This commit is contained in:
Joseph Milazzo 2025-06-08 08:24:00 -05:00
parent 99bfe23aea
commit 05fccc2115
2 changed files with 25 additions and 24 deletions

View file

@ -612,17 +612,6 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
return;
}
this.route.data.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {
this.readingProfile = data['readingProfile'];
if (this.readingProfile == null) {
this.router.navigateByUrl('/home');
return;
}
//this.setupReaderSettings(); // TODO: Implement this Amelia, it works without am I missing something?
this.cdRef.markForCheck();
});
this.libraryId = parseInt(libraryId, 10);
this.seriesId = parseInt(seriesId, 10);
this.chapterId = parseInt(chapterId, 10);
@ -635,6 +624,14 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
}
this.cdRef.markForCheck();
this.route.data.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {
this.readingProfile = data['readingProfile'];
this.cdRef.markForCheck();
if (this.readingProfile == null) {
this.router.navigateByUrl('/home');
return;
}
this.memberService.hasReadingProgress(this.libraryId).pipe(take(1)).subscribe(hasProgress => {
if (!hasProgress) {
@ -649,6 +646,10 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
this.init();
}
});
});
}
init() {

View file

@ -168,13 +168,13 @@
</div>
</div>
<div class="d-flex gap-2 mt-2 flex-wrap mb-2">
<button class="btn btn-primary"
<div class="row g-0 mt-2">
<button class="btn btn-primary col-12 mb-2"
[disabled]="readingProfile.kind !== ReadingProfileKind.Implicit || !parentReadingProfile"
(click)="updateParentPref()">
{{ t('update-parent', {name: parentReadingProfile?.name || t('loading')}) }}
</button>
<button class="btn btn-primary"
<button class="btn btn-primary col-12 mb-2"
[ngbTooltip]="t('create-new-tooltip')"
[disabled]="readingProfile.kind !== ReadingProfileKind.Implicit"
(click)="createNewProfileFromImplicit()">