Commit Graph

122 Commits

Author SHA1 Message Date
Zeedif
84cfa6bea5 Update KOReader Sync settings (#1030)
* feat(settings): refactor and implement KOReader Sync settings page

Refactors the KOReader Sync settings section into its own dedicated page and implements the full connection and configuration flow.

The previous implementation in the main server settings was outdated and incomplete. This change aligns the frontend with the latest backend logic and provides a complete user experience.

Key changes include:
- Separated the UI into two states: a login form for initial connection and a configuration panel for existing connections.
- Implemented `connectKoSyncAccount` and `logoutKoSyncAccount` mutations to handle authentication with the KOReader Sync server.
- Updated the `SERVER_SETTINGS` GraphQL fragment to use the new `koreaderSyncStrategyForward` and `koreaderSyncStrategyBackward` fields, removing the deprecated `koreaderSyncStrategy`.
- Moved all KOReader Sync settings from the generic Server Settings page to a dedicated route at `/settings/koreader-sync`.
- Restructured and improved i18n keys for better clarity and consistency.

Ran `yarn gql:codegen` to regenerate GraphQL types and helpers.

* Extract credentials login into component

* Update to server changes and cleanup

---------

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
2025-12-06 19:59:39 +01:00
schroda
36248e17f0 Change add to library "show duplicate entry" button to be a link 2025-12-02 22:12:49 +01:00
schroda
17390b4ed9 Fix manga page "in library" button after click on "show duplicate entry" 2025-12-02 22:11:56 +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
e42fde5232 Fix incorrect error message when closing backup restore dialog 2025-11-26 18:18:31 +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
890b304b4a Ignore source/extension, tracker icon and thumbnails requests from image queue
The server is not requesting these images through an extension; thus, it is not a problem to send them directly to the server since there is no problem of getting the server "stuck" due to extension rate limits.
2025-11-22 23:50:05 +01:00
schroda
9ed05f3fc0 Cache images via service worker
Improves the image request logic by making it possible to check if an image is cached.
In case an image is cached, it does not need to be put into the image queue because it won't be sent to the server.
2025-11-22 23:50:03 +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
b062871163 Skip gql subscriptions until auth is properly set up 2025-11-06 21:38:00 +01:00
schroda
932499f211 Reset app initial load time on page reload 2025-11-05 01:17:18 +01:00
schroda
198d899b86 Fix forced reload detection when tab is resumed after WebUI update
In case the tab gets resumed, it does not get fully reloaded but does reexecute js.
This caused the initial timestamp to get overwritten and lead to the forced reload detection to be incorrect, because it assumed that the app just got loaded.
2025-11-04 23:29:17 +01:00
schroda
7c1e4be0e8 Close "category select" dialog on "edit/create" click 2025-11-03 21:59:29 +01:00
schroda
02621dec98 Introduce "awaitable-component" 2025-11-03 21:45:53 +01:00
schroda
ed0d597185 Cleanup getting server base url 2025-10-19 20:23:03 +02:00
schroda
2a9a794744 Fix tracker oauth login redirect url for self-hosted webui 2025-10-19 20:23:03 +02:00
schroda
18deca32f6 Simplify session context usage
Most cases were preventing some requests from getting triggered. However, this is not necessary anymore since with 6636cc66b1, this is handled globally now
2025-10-19 17:38:37 +02:00
schroda
258d1a496a Remove "auth required flag" from session storage
With 12ef012e4b this has no benefit anymore, because the app now always checks if authentication is enabled by the server first before any other request can be sent.
2025-10-16 22:46:03 +02:00
schroda
f63c461fb3 Update "initial load timestamp" on initial app load 2025-10-15 23:48:57 +02:00
schroda
f36b39c685 Reset "auth required flag" on initial app load 2025-10-15 23:39:56 +02:00
schroda
12ef012e4b Block requests until successful login 2025-10-15 22:50:28 +02:00
schroda
0ffb54e2cc Fix infinite loading
- Reset "requires auth" flag in session storage for reset on tab refresh
- Fix context los for resolving, rejecting queued request
- Process queued requests after successful login

Regression 6636cc66b1

fixes #1028
2025-10-15 22:50:27 +02:00
schroda
6636cc66b1 Prevent sending requests that are known to fail
In case it's still unknown if auth is set up on the server, only the initial request to detect this should be sent. Since all other requests will also just fail, they should be blocked until the auth initialization is completed.

While the access token is getting refreshed, no request will succeed since the access token is expired; thus, they should not be sent.
2025-10-15 03:06:46 +02:00
schroda
17a811cd39 Fix webui preview changelog url 2025-10-15 00:38:36 +02:00
schroda
bb6865e111 Optionally require forced page refresh on detected webui update
A forced refresh is only necessary in case the webui was already loaded and thus, still uses outdated files from the old version.

In case the app just got freshly opened in a tab, a refresh is not necessary because the latest files are already being used.
In that case, just show an update dialog which won't force a tab refresh.
2025-10-15 00:21:22 +02:00
schroda
8d276c25bd Update CHANGELOG format to follow "Keep a Changelog" 2025-10-14 21:14:53 +02:00
schroda
b5c730d3db Fix tracker redirection on non logged in trackers
Incorrectly routed to the tracker oauth page which then just redirected to the tracker settings page.

Missed occurrences in 765799b236
2025-10-14 21:14:53 +02:00
schroda
f539afb404 Introduce "koration" duration api 2025-10-14 21:14:52 +02:00
schroda
f0c6e789cd Add backup flags to backup import 2025-10-07 22:27:07 +02:00
schroda
faa53b049f Fix downloading created backups while in dev env
Use absolute url to ensure that the backup file gets requested from the servers domain
2025-10-04 21:42:09 +02:00
schroda
bc2d7cadc4 Use "GlobalDialogManager" for backup validation 2025-10-04 16:36:30 +02:00
schroda
b795f98766 Replace "useCategorySelect" with "GlobalDialogManager" 2025-10-04 14:51:35 +02:00
schroda
d33f708104 Add backup flag selection on backup creation 2025-10-04 14:51:34 +02:00