Commit Graph
68 Commits
Author SHA1 Message Date
schroda daeb2a4e45 Access reader store setters directly without hook 2026-02-21 16:41:56 +01:00
schroda 75cf18b254 Rename "getNextIndexFromPage" to "getIndexOfPage" 2026-02-21 15:15:47 +01:00
schroda 4da2f67b75 Fix page shift when toggling "offset double spreads" setting
The pages should get shifted to
- the left when enabling
- the right when disabling
the setting.

Currently, the "page push" is inverted.
This can cause the page that is most likely being read to get pushed out of the screen. Which then requires the user to change the page.

Example:

Active page: 1+2
Enable setting: -> 2 (currently) instead of -> 1
2026-02-21 15:15:47 +01:00
schroda ec49cd1ad9 Fix updating reader "page urls" in "page store"
The page urls never got updated in the store
2026-02-21 15:15:45 +01:00
schroda ddca11e537 Prevent potential out-of-bound index access when selecting reader page 2026-02-21 15:15:06 +01:00
schroda 95ccdad275 Align "offset spread pages" hotkey text with setting 2026-02-21 15:15:04 +01:00
schroda 8a7081fdba Fix missing "offset double spreads" setting under "settings > reader" 2026-02-21 15:12:34 +01:00
schroda 65a9a905be Migrate to lingui
Switch to "lingui" for better DX.
Tried to persist existing languages as much as possible.

Removed "vite-plugin-node-polyfills" because it's incompatible with "lingui"
2026-01-13 17:33:36 +01:00
schroda 083586c567 Update graphql files structure 2025-12-22 14:00:44 +01:00
schroda 13d6d1e525 Revert "Reduce rerenders on current page changes"
This reverts commit 3e9078420a.

Fixes #1040
2025-12-02 21:51:51 +01:00
schroda 9646aa2caf Fix reader progress bar size setting slider max value 2025-11-30 18:44:23 +01:00
schroda 3e9078420a Reduce rerenders on current page changes
The chapters state always created a new array reference which caused potential unnecessary rerenders.
2025-11-29 16:23:45 +01:00
schroda 3d8a81bc5d Reduce rerenders of reader desktop nav bar 2025-11-29 15:26:57 +01:00
schroda b5d71adeae Prevent reader progressbar tooltips on mobile 2025-11-28 23:30:10 +01:00
schroda 860b00a0b5 Prevent reader progressbar tap highlighting on mobile 2025-11-28 23:29:51 +01:00
schroda 3dcdca7166 Reduce image rerenders in continuous reading modes on page change
In continuous reading modes the pages are always rendered regardless of if they are visible or not. This is the case to prevent layout shifts when prepending pages while scrolling up.

However, this means that a pages "load priority" and its "should load" flag changes everytime the current page changes, which causes unnecessary rerenders.
The "load priority" and "should load" flag do not matter once a page has been loaded and therefore should stay consistent once loaded.
2025-11-28 23:09:36 +01:00
schroda d0735365ff Fix first visible page detection
50a6b72716 did not properly fix the detection and broke it for other reader settings.
2025-11-27 02:38:09 +01:00
schroda fe4bfd922e Queue image requests per source
If http protocol is h2 or newer, allow:
 - 5 requests per source
 - unlimited local source requests
2025-11-23 00:08:23 +01:00
schroda 704d3b191f Flag event listeners as passive 2025-11-22 19:14:43 +01:00
schroda 48b57c4a74 Simplify reader visible page detection 2025-11-17 02:19:36 +01:00
schroda 36477d1c95 Simplify scroll page into view inline alignment determination 2025-11-17 01:37:32 +01:00
schroda 50a6b72716 Fix first visible page detection in RTL + continuous horizontal mode 2025-11-17 01:24:58 +01:00
schroda d093fe0281 Prevent default action on hotkey by default 2025-11-16 22:32:18 +01:00
schroda 64d5f3b8e1 Fix preserving current page on "reader width" change
Preservation triggered on every setting change because the object instance changed
2025-11-16 22:26:06 +01:00
schroda bab55bafdb Preserve reader current page on "reader width" change 2025-11-13 01:35:46 +01:00
schroda 7b89fa10c5 Fix reader current page preservation on window resize 2025-11-13 01:35:46 +01:00
schroda 2510d11888 Preserve reader current page on "page scale" setting change 2025-11-13 01:35:45 +01:00
schroda 197d55f819 Rename "useReaderHorizontalModeInvertXYScrolling" to reflect actual behavior
The Y scroll direction gets mapped to the X direction. And the horizontal direction gets inverted based on the reading direction.
2025-11-13 01:35:45 +01:00
schroda 88f1ef7384 Improve reader horizontal mode scroll Y to X re-mapping
When scrolling really fast, the delta value could increase, which leads to incorrect trackpad detection, because the delta value is not consistent over consecutive scroll events
2025-11-13 01:35:44 +01:00
schroda 02621dec98 Introduce "awaitable-component" 2025-11-03 21:45:53 +01:00
schroda f539afb404 Introduce "koration" duration api 2025-10-14 21:14:52 +02:00
schroda b795f98766 Replace "useCategorySelect" with "GlobalDialogManager" 2025-10-04 14:51:35 +02:00
schroda 9329ef5fdc Improve logic to show dialog outside of components 2025-10-04 14:49:00 +02:00
schroda 741426173a Prevent horizontal scrollbar on viewport width increase
When increasing the window, the main reader container did not immediately reflect the change and was still smaller than the available width.
In case the viewed pages were filling the full width, this then caused the horizontal scrollbar to appear until the resize action was finished.
2025-09-27 17:40:31 +02:00
schroda d7690f9a36 Reduce rerenders on reader overlay visibility change 2025-09-27 17:40:30 +02:00
schroda b1babc9dd1 Preserve correct page index during reader resize
Ensure the restored page index is based on the page index at the start of a resize event to maintain consistency.
At least in the continuous horizontal mode, it was possible to sometimes cause the page to change while resizing.
2025-09-27 17:40:29 +02:00
schroda 1c526b3feb Prevent reader page preservation in none continuous modes 2025-09-27 13:51:26 +02:00
schroda ab1521fb81 Fix editing global reader settings
Regression 433dc17c35
2025-09-26 23:27:16 +02:00
schroda a2d7091712 Remove "forwardRef" usage 2025-09-25 00:20:10 +02:00
schroda f37d7e892a Fix tsc issues 2025-09-22 17:58:28 +02:00
schroda b6d7f6da5d Add zustand dev tools 2025-09-22 01:10:36 +02:00
schroda f6b94c838b Fix reset of reader store
After the slice states got reset, the base reset function just reverted all those resets and only reset the base states in the store (manga, scrollbar, ...)
2025-09-22 01:10:35 +02:00
schroda 525173e05e Add dedicated store access util functions
Makes it easier to find the specific store slice usage
2025-09-21 01:16:59 +02:00
schroda ed488f76dd Always use "useShallow" for store selection 2025-09-21 01:16:57 +02:00
schroda 5730690ae6 Simplify ReaderControls#useHandleClick 2025-09-21 01:16:53 +02:00
schroda ca5920919e Simplify ReaderControls#useOpenPage 2025-09-21 01:16:51 +02:00
schroda f5c7379fc4 Simplify ReaderControls#useOpenChapter 2025-09-21 01:16:49 +02:00
schroda 1c0b982bae Remove unnecessary TFunction parameter 2025-09-21 01:16:47 +02:00
schroda 19e45424ae Make react router routing possible outside components 2025-09-21 01:16:44 +02:00
schroda ed53aff071 Extract "reader chapters store slice" into file 2025-09-21 01:16:39 +02:00