Commit Graph

145 Commits

Author SHA1 Message Date
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
schroda
f704e5bc33 Move "Mangas.ts" types and constants to new files 2024-10-07 13:45:07 +02:00
schroda
6e9fdee0bb Handle source browse error 2024-10-06 16:15:01 +02:00
schroda
84b9f8361d Fix RequestManager location
Was changed unintentionally
2024-10-06 13:45:22 +02:00
schroda
23a86a77f0 Move core files into new folder 2024-10-05 22:55:08 +02:00
schroda
8f4da52d1f Add optimistic response to server settings mutation 2024-09-26 15:34:00 +02:00
schroda
9ec0e1869d Handle cache update when creating new global metadata
Can't be handled exactly the same way as the other meta fields
2024-09-22 03:05:04 +02:00
schroda
a06e170d78 Handle cache update when creating new metadata
In case the metadata didn't exist yet, it was never added to the meta array because the objects meta field was never updated
2024-09-22 02:50:14 +02:00
schroda
20eaa90c10 Add optimistic response to metadata mutations 2024-09-21 22:20:41 +02:00
schroda
08866ace3d Terminate gql subscription on server address change
Otherwise, the subscription is still active for the old server instead of connecting to the new server
2024-08-26 00:25:58 +02:00
schroda
986d071bc8 Properly update existing global meta after mutation
"existingMetas" was incorrectly iterated over which caused an error in case the mutated meta did not exist prior to the mutation
2024-08-05 16:07:19 +02:00
schroda
b17fcd30af Replace deprecated gql sort inputs
Was missed in e1e2cbc679 and caused unexpected behaviour due to the response data being incorrectly sorted
2024-07-29 14:10:37 +02:00
schroda
3065e80b36 Properly sort chapters of same manga in updates
In case chapters of the same manga had been fetched at the same time, they were sorted by their source order ascending instead of descending, which caused the newest chapter of that manga to be farther down instead of being the first
2024-07-28 22:29:01 +02:00
schroda
e1e2cbc679 Use new gql sort options 2024-07-28 22:21:11 +02:00
schroda
b70c404fb1 Move "Fragments" file into "fragments" folder 2024-07-09 00:41:14 +02:00
schroda
3d21266f92 Reduce requested manga data in queries 2024-07-09 00:30:15 +02:00
schroda
4b30e9bc48 Reduce requested extension data in queries 2024-07-09 00:21:51 +02:00
schroda
df006bb348 Reduce requested downloader data in queries 2024-07-09 00:21:51 +02:00
schroda
83be995fb8 Reduce requested tracker data in queries 2024-07-09 00:21:49 +02:00
schroda
7556ea9b38 Reduce requested source data in queries 2024-07-09 00:21:49 +02:00
schroda
2fa1de578c Reduce requested chapter data in queries 2024-07-09 00:21:46 +02:00
schroda
9b8ace003d Reduce requested category data in queries 2024-07-03 23:24:50 +02:00
schroda
3206944052 Optionally trigger update for specific category 2024-06-26 12:42:03 +02:00
schroda
fdf78145f0 [VersionMapping] Update to latest server gql schema changes
Server now supports partial mutation responses.
2024-06-03 03:09:58 +02:00
schroda
5cb541b684 Add functionality to save source browse searches 2024-05-08 13:45:56 +02:00
schroda
93f76d6b7e Reduce active apollo queries 2024-05-08 13:45:42 +02:00
schroda
4d04b9cecd Only abort pending image requests
In case images are requested of a slow source, aborting image requests that are already in progress will cause the server to take forever for new source image requests because it's still processing the aborted image requests.
Thus, aborting ongoing image request might cause more harm than good, since the server will basically become "unresponsive" for new images requests of this source.

By only aborting pending requests, that have not been sent to the server yet, new image requests will only be handled once the active requests are done, preventing the server from getting spammed with image requests that potentially are just getting aborted immediately again (e.g. due to scrolling quickly in the source browse page), but still will be handled by the server, blocking new requests
2024-05-06 02:37:00 +02:00
schroda
7866fdb9f1 Never use cache for manga chapters with state query
Changed with 0c4ce2c9c5, but it does not work because the chapters state could have changed in the meantime, changing the chapters included in the query response, which is not represented by the cached query
2024-04-29 14:54:18 +02:00
schroda
773d2b1026 Add missing error handling 2024-04-28 02:58:24 +02:00
schroda
3b276f9f58 Keep downloaded thumbnails when clearing server cache 2024-04-27 00:03:37 +02:00
schroda
09bf1163fa Remove logging of image request failures 2024-04-26 17:29:58 +02:00
schroda
0c4ce2c9c5 Use cache to query chapters with state
There is a potential that the cached chapters state is outdated, but this is a marginal issue and is preferred over sending a request to the server everytime for data that is most likely already known.
The triggered downloads will also reflect what is currently shown in the UI, so it will most likely never be known if some chapter state was outdated.
2024-04-23 13:54:04 +02:00
schroda
2066851793 Optionally migrate track bindings 2024-04-21 00:02:43 +02:00