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:
+7
-10
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user