After all pages had been loaded, the revalidation request of the first page caused the loading placeholder to not disappear anymore.
This was only a visual bug and did not affect the actual functionality.
Everytime the metadata got updated, unchanged values could cause rerenders because their reference changed.
This happened e.g., for the "customThemes" which caused the MUI theme to get recreated resulting in all components to rerender due to the theme context change.
* 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>
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.
This caused the reader to "jump to random pages" because it caused the image to get unrendered and rendered again, leading to layout shifts.
This issue existed already for a long time but could only rarely be observed because of the hacky "cache check" logic.
The changes from 9ed05f3fc0 caused this issue to be consistent in case the new service worker could not get installed due to not meeting the required installation prerequisites. If that was the case, the cache check always returned false causing the above-described behavior.
fixes#929
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.
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.