feat(reader): add document mode to the PDF viewer, overhaul PDF viewer, add different modes to CBX viewer (#306)

* feat(reader): add document mode to the PDF viewer, overhaul PDF viewer, add different modes to CBX viewer

* feat(reader): improve reader settings with brightness, emulate book mode, and click-to-paginate options

* feat(reader): add long strip scroll mode and update related settings
This commit is contained in:
brios
2026-04-22 17:26:57 -04:00
committed by Zach Yale
parent a3add5ded9
commit 61b9b53a60
47 changed files with 4458 additions and 874 deletions
@@ -73,6 +73,13 @@ export class BookFilterComponent implements OnInit, OnDestroy {
readonly filterLabelKeys = FILTER_LABEL_KEYS;
private readonly userSettingsEffect = effect(() => {
const user = this.userService.currentUser();
if (!user) return;
this._visibleFilters = user.userSettings.visibleFilters ?? [...DEFAULT_VISIBLE_FILTERS];
this.updateVisibleFilterTypes();
});
getFilterLabel(type: FilterType): string {
const key = this.filterLabelKeys[type];
return key ? this.t.translate(key) : type;
@@ -99,7 +106,6 @@ export class BookFilterComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.updateVisibleFilterTypes();
this.updateExpandedPanels();
this.subscribeToUserSettings();
this.subscribeToReset();
}
@@ -164,15 +170,6 @@ export class BookFilterComponent implements OnInit, OnDestroy {
return String(value ?? '');
}
private subscribeToUserSettings(): void {
effect(() => {
const user = this.userService.currentUser();
if (!user) return;
this._visibleFilters = user.userSettings.visibleFilters ?? [...DEFAULT_VISIBLE_FILTERS];
this.updateVisibleFilterTypes();
});
}
private updateVisibleFilterTypes(): void {
this.visibleFilterTypes = this._visibleFilters.filter(
vf => this.filterTypes.includes(vf as FilterType)