Commit Graph

177 Commits

Author SHA1 Message Date
schroda
c068f2fb35 Fix manga details not updating after refresh with partial data
Regression 0ed2e7c193
2026-05-02 14:42:32 +02:00
schroda
9440326b72 Require server settings and global metadata to be loaded 2026-04-27 15:57:33 +02:00
schroda
0ed2e7c193 Fix refreshing manga during migration search 2026-04-23 20:40:05 +02:00
schroda
cc31f592cd Fix saving global metadata applied migration
The applied migration change never got stored on the server because the mutation got excluded due to incorrectly setting the "isMigration" flag to false.
This resulted in executing the missing migration everytime the metadata were read.

Regression 430939a47a
2026-04-07 15:16:09 +02:00
schroda
d738de2c61 Fix missing available extension info in navbar
fixes #1076

With apollo v4 "refetchQueries" excludes queries with "cache-only" policy

Regression c6343e24a5
2026-03-22 00:30:34 +01:00
schroda
72af9d52d1 Update lint rules 2026-03-11 19:42:02 +01:00
schroda
c6343e24a5 Update dependency "apollo-client" to v4.x
v4.1.6
2026-03-10 01:02:12 +01:00
schroda
00d6350cee Optionally include client data during manga migration 2026-03-08 22:42:39 +01:00
schroda
430939a47a Update new "metas" mutations structure 2026-03-08 22:42:38 +01:00
schroda
0c12427020 Remove old metadata mutations 2026-03-08 22:42:37 +01:00
schroda
64df9a9489 Add new single multipurpose metadata update mutation 2026-03-08 22:40:47 +01:00
schroda
474b98abb5 Use new "metas" mutations 2026-03-08 22:40:45 +01:00
schroda
083586c567 Update graphql files structure 2025-12-22 14:00:44 +01:00
schroda
230dae83c3 Fix SourceMangas showing incorrect loading placeholder
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.
2025-12-22 12:35:40 +01:00
schroda
30856f996d Always revalidate first page for local source browse requests
fixes #1041
2025-12-22 12:35:08 +01:00
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
3dfb80a237 Fix image queue creation 2025-11-23 00:23:33 +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
cdab741ce5 Replace missed occurrences with koration 2025-11-09 01:13:31 +01:00
schroda
284c194ac3 Add "reset" functions to clients 2025-11-07 01:28:56 +01:00
schroda
1d639f45ca Restart graphql subscriptions after ws client recreation
Disposing the client does not restart active subscriptions.
2025-11-06 02:41:58 +01:00
schroda
ed0d597185 Cleanup getting server base url 2025-10-19 20:23:03 +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
f0c6e789cd Add backup flags to backup import 2025-10-07 22:27:07 +02:00
schroda
60f11a2832 Create backups via graphql api
Fixes #1022
2025-10-04 00:18:09 +02:00
schroda
4aad410957 Add "ui login" support 2025-08-26 23:06:44 +02:00
schroda
1b4bf22542 Rename folder "modules" to "features" 2025-08-15 22:02:58 +02:00
schroda
bac77599f5 Add WebView support 2025-07-19 21:33:13 +02:00
schroda
0d23d8077f Add private tracking support 2025-07-19 21:33:12 +02:00
schroda
592ca7881e Update download status query cache on external download enqueue
Downloads that got enqueued from outside the webui never got added to the download status query.
To be able to see them, a page refresh was required.
2025-06-28 01:21:31 +02:00
schroda
2e105a0539 Introduce "Extension info" screen 2025-06-23 00:05:16 +02:00
schroda
1721c15079 Properly reset state after backup import 2025-06-08 18:47:33 +02:00
schroda
29d0e3ae55 Update download status state via subscription
The download query type (DownloadStatus) and download subscription type (DownloadUpdates) are different.
This means that the download state in the cache does not get automatically updated from the state provided in the subscription.
2025-05-30 21:26:35 +02:00
schroda
b673047517 Update to server gql library update changes 2025-03-23 04:04:08 +01:00
Jack
9e5fa7d81a Add history page (#897)
* Add History module and integrate it into the app

Introduce the History module with components for displaying chapter updates, including UI for grouped updates by date. Update routing and constants to incorporate the new /history path.

* Replace "Updates" and "History" with unified "Recent" module

Merged the "Updates" and "History" screens into a single unified "Recent" module with corresponding navigation updates. Adjusted GraphQL types and localization files to reflect the changes. This simplifies navigation and improves user experience.

* Refactor History screen to remove unused components.

Removed unused states, layout effects, and props related to last update timestamp. Renamed variables for better clarity and updated labels and error messages to align with the history context. Simplified component structure for improved maintainability.

* ```
Refactor tab handling and integrate dynamic height adjustments.

Renamed enums for better clarity and consistency. Implemented a `tabsMenuHeight` prop to dynamically adjust component layouts based on observed height changes using `useResizeObserver`. Updated the `Updates` component to consider the calculated heights for improved rendering.
```

* Refactor `groupByDate` parameter and add `lastReadAt` field

Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.

* Refactor `groupByDate` parameter and add `lastReadAt` field

Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.

* Refactor `groupByDate` parameter and add `lastReadAt` field

Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.

* Refactor `groupByDate` parameter and add `lastReadAt` field

Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.

* "Optimize GraphQL type definition formatting in generated file

Condensed the formatting of the GetChaptersHistoryQuery type to a single line for improved readability and consistency. This change does not affect functionality but enhances maintainability of the generated code."

* Remove UpdateChecker component from History screen

The UpdateChecker component and its related navbar action have been removed from the History screen. This simplifies the navbar setup and eliminates unused functionality in this context.

* Refactor chapter fragment and type references

Updated `ChapterRecentListFieldsFragment` to `ChapterUpdateListFieldsFragment` for better alignment with naming conventions. Adjusted type imports and query structures to maintain consistency across files. No functional changes introduced.

* Refactor padding calculation logic in Updates screen.

Renamed state variable and refactored its logic for clarity and consistency. The updated logic now uses a more descriptive name, `listPadding`, to enhance code readability and maintainability.

* Pass `tabsMenuHeight` prop to History component

Added `tabsMenuHeight` prop to the `History` component to properly calculate the height for the `StyledGroupedVirtuoso` element. This ensures consistency with other components and improves layout rendering.

* Revert package.json

* Add last page read tracking to chapter history

Introduced "lastPageRead" and "pageCount" fields to track progress in chapter history. Updated UI to display the last page read along with total pages for chapters. Adjusted localization files to support the new "page" label.

* Remove last page read display from ChapterHistoryCard

The "last page read" information was removed from the ChapterHistoryCard component for a cleaner UI. This change simplifies the card's design by showing only the chapter name and relevant download state.

* Forcing an empty commit.

* Replace "Recent" screen with separate "Updates" and "History".

The "Recent" feature has been split into two distinct screens, "Updates" and "History", for improved clarity and functionality. Routes, icons, and components have been updated accordingly, and redundant code related to "Recent" has been removed.

* Clean

* Revert vi.json

* Remove unnecessary `useLocation` hook and update state logic.

The `useLocation` hook was removed as it was not used elsewhere in the component. The state property for the routing logic was updated to use `Chapters.getReaderOpenChapterLocationState` for better encapsulation and clarity.

* Update history localization by removing unused "page" key

Removed the "page" key from the "history" section in the localization file as it is no longer in use. This cleanup helps keep the translation file consistent and easier to maintain.

---------

Co-authored-by: NamNH <namitonguyen@gmail.com>
2025-03-10 21:53:40 +01:00
schroda
3698c19aba Properly enable cors for images by default 2025-01-26 17:18:27 +01:00
schroda
25e3fc7808 Load images with cors allowed
Without allowing cors it is e.g. not possible to extract colors from an image
2025-01-26 04:20:59 +01:00
schroda
e25aa98365 Do not update "download status" on "download updates"
For large download queues this makes the app unusable.

At the moment this is not needed anyway and once it is, it needs to be improved and only be done in the "download queue" page since the queue is only use there
2025-01-12 20:47:16 +01:00
schroda
10a77722cc Remove outdated "download types" from apollo cache 2025-01-12 20:28:20 +01:00
schroda
89cab26f73 Fix typing after "apollo-client" update to v3.12.4 2024-12-24 00:36:26 +01:00
schroda
a607f7f368 Reader settings 2024-12-09 02:38:37 +01:00
schroda
7434ed0152 Reader progress bars 2024-12-09 02:38:37 +01:00
schroda
12e8939267 Prevent duplicated downloads in download queue
The mutation to add chapters to the download queue returns the current download queue.

Thus, the local queue already includes the new downloads and adding them blindly in the download subscription will cause them to be in the local queue twice.
2024-12-09 02:38:37 +01:00
schroda
a819d45489 Update to server download subscription changes 2024-11-28 12:17:55 +01:00
schroda
87ee1330d4 Prevent blinking on reader page switch on firefox
on firefox images are decoded async which causes a "flicker/blinking" when they're getting visible for the first time
this is an issue especially in the reader because pages that should not be shown are rendered but
not displayed, which then causes this issue once they get displayed
2024-11-13 15:47:03 +01:00
schroda
f9938edb75 Extract aborting image requests into function 2024-11-13 14:41:26 +01:00
schroda
e90d705610 Add option to update all updatable extensions 2024-11-04 01:30:09 +01:00
schroda
e71c4b7ef1 Cleanup deprecated metadata after migration
- delete deprecated metadata
- save applied migration id per metadata holder
2024-11-04 00:11:01 +01:00