Commit Graph

110 Commits

Author SHA1 Message Date
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
schroda
1a16dba7bd Add option to update tracking on manual mark as read 2024-04-20 23:15:02 +02:00
schroda
76125a7617 Feature/update dependencies (#738)
* [Tooling] Create script to update dependencies

* Lock dependency versions

* Update dependencies

Wait for eslint related dependencies to be compatible with v9
2024-04-14 15:10:34 +02:00
schroda
f036f01f70 Fix/properly reset cache and queues on server url change and backup import (#725)
* Reset cache on server url change

* Reset image queue

* Completely reset apollo store
2024-04-10 01:23:08 +02:00
schroda
6c43e974e2 Fetch images via html img elements (#727) 2024-04-10 01:22:47 +02:00
Angel
5f7240d93b Include credentials in requests (#721)
* feat(request manager): adds header to send cookies, and other auths with every request

* refactor(.gitignore): removes local env from .gitignores
2024-04-10 00:04:30 +02:00
schroda
aab3e25031 Feature/improve restoring grid snapshots (#713)
* Update local storage functions

* Update local storage hooks

* Add session storage

* Improve storing virtuoso grid snapshot

* Use "useSyncExternalStore" for browser storage access

* Get rid of location replacements in "AppbarSearch"

Use session storage instead to prevent reloading the page all the time due to changing the location

* Get rid of location replacements in "SourceMangas"

Use session storage instead to prevent reloading the page all the time due to changing the location
2024-04-07 15:22:03 +02:00
schroda
0d0cd54249 Fetch latest track data from tracker (#692) 2024-04-01 02:06:35 +02:00
schroda
5a2f77d124 Trigger track progress on last page read of chapter (#690) 2024-04-01 01:22:49 +02:00
schroda
9674b18d28 Feature/tracking unbind use new mutation (#688)
* [Codegen] Update generated files

* Use new "unbindTrack" mutation

* Add option to delete remote track on unbind

* [VersionMapping] Require server version "r1510" for preview
2024-04-01 00:45:44 +02:00
schroda
25b7d149ba Refetch GET_MANGAS query on track unbind mutation (#684)
GET_CATEGORY_MANGAS is only used for the default category
2024-03-31 17:23:52 +02:00
schroda
74cf4b7c50 Add option to use img tag to fetch images
MangaUpdates covers could not be fetched via the fetch api because there were cors issues
2024-03-29 00:45:38 +01:00
schroda
5dbf1ce30c Implement showing/updating/removing tracker bindings 2024-03-29 00:45:38 +01:00
schroda
66c57a542b Implement binding manga to tracker 2024-03-29 00:45:38 +01:00
schroda
d22bfaa55c Implement tracker login and logout 2024-03-29 00:45:38 +01:00
schroda
06b2bca340 Add prioritization to image requests (#671)
In the reader the preloaded page requests were triggered before the actual page got rendered and thus, the image request of the rendered page had to wait for all the preloaded images to finish
2024-03-24 19:08:36 +01:00
schroda
83635faf95 Cache first page of source manga fetch response (#666) 2024-03-23 23:34:20 +01:00
schroda
0ad08360a2 Remove image url port replacement (#664)
This was unintentionally added
2024-03-22 03:33:09 +01:00
schroda
318c4a5040 Add option to delete downloaded chapters on migration (#655) 2024-03-16 13:45:54 +01:00
schroda
ed74f7c851 Make remaining image requests abortable (#645) 2024-03-08 00:24:01 +01:00
schroda
6cff75e257 Feature/limit concurrent image requests (#639)
Prevent exhausting the available concurrent requests to the same domain by the browser with just image requests.

This prevents e.g. when browsing a slow source from having 6 concurrent image requests and having to wait for the next page request until one of those requests has finished
2024-03-05 02:11:40 +01:00
schroda
daf6b50249 Fix/deprioritize image requests (#638)
* Use "fetch" instead of "axios"

Axios does not support prioritizing requests

* Deprioritize image requests

The browser requests images (<img>) with low priority by default.
Due to switching to loading images via axios (f852ce70e7), the image requests had the same priority as other requests and thus blocked e.g. xhr requests
2024-03-05 02:07:05 +01:00
schroda
8bdf035ca7 Feature/add option to remove manga from categories when removing from library (#633)
* Optionally remove manga categories when removing them from library

* Use "Mangas::removeFromLibrary"

* Handle uncatched promises
2024-03-02 15:28:58 +01:00
schroda
c5a5c4b8af Fix/add manga to library without dialog not adding default categories (#632)
* Add default categories when adding manga to library without dialog

* Add manga to library and update categories in one mutation
2024-03-02 15:26:15 +01:00
schroda
79d35404d3 Fix/double page mode not aborting preload image requests (#628)
* Use request manager to preload images in DoublePagedPager

Was forgotten to update along with f852ce70e7

The requests for the preload also never got aborted

* Revoke object urls after load
2024-03-01 18:27:46 +01:00
schroda
f852ce70e7 Abort image requests on unmount (#624) 2024-03-01 01:17:23 +01:00
schroda
fd651b6165 Feature/add vui as webui flavor (#609)
* Remove unused "downloadAhead" function

* [Codegen] Update generated files

* Add "VUI" as webui flavor

* Add info about changing the webUI channel or flavor
2024-02-17 20:16:51 +01:00
schroda
c099e01fb7 Add manga fetch timestamp to thumbnail url (#598)
In case the fetch timestamp of a manga changed, it's possible that the thumbnail has changed as well, thus, the currently cached image should be ignored
2024-02-16 19:38:13 +01:00
schroda
2acf2b6d33 Feature/download ahead trigger chapter downloads client side (#597)
* Trigger download ahead while reading client side

* Trigger download ahead while reading earlier

Download ahead was only triggered once the chapter got marked as read

* Optionally ignore dupe chapters for download ahead

* Consider current chapters scanlator for dupe check

* Update download ahead related settings

- add new metadata setting for download ahead limit
- previous setting
  - rename
  - update usage (auto download new chapters limit)

* Select chapter to auto delete while reading depending on ignore dupe setting

Currently, the n-th to last chapter always got deleted ignoring if "ignore dupes" setting was enabled or not.

* Only auto delete chapter while reading if it is read

In case not the last read but the n-th to last read chapter should get auto deleted while reading, it currently just got deleted ignoring if it has been read or not.
2024-02-16 19:16:18 +01:00
schroda
bf3815e3bd Correctly update cache after updating an extension (#590)
After installing/uninstalling/updating an extension all other extension were removed from the list besides the updated extension

Regression introduced with 506e0aa0e3
2024-02-01 22:58:01 +01:00
schroda
b074de26a2 Fix/install external extension does not update extension list (#580)
* Update extension list after installing external extension file

The cache was never updated after the installation

* Make it possible to install external extension while having an empty list

* Show toasts while having an empty extension list

* Use correct extension id

* Update extension action after manual file installation

When installing an external extension the action button did not get updated due to this being an internal state of the ExtensionCard.
By including this in the key, it gets ensured that the component will get correctly updated
2024-01-29 20:59:27 +01:00
schroda
506e0aa0e3 Update extension list after removing an obsolete extension (#579)
The removed extension was never removed from the cached list
2024-01-29 20:56:09 +01:00
schroda
ab4cddfedd Force a reconnect in case a heartbeat is missing (#569)
There seems to be cases where the connection is lost without the client being able to reconnect (e.g. active subscription -> system hibernation -> waking up system => not receiving any messages anymore).
2024-01-26 20:55:14 +01:00
schroda
e0c5e0521d Feature/manga migration (#536)
* Add "migration" tab to "Browse" screen

* Add missing useEffect cleanup for navbar title and actions

* Make "SourceGridLayout" reusable

* Add migration tab to "Browse"

* Add migration logic
2024-01-26 20:50:51 +01:00
schroda
24379c1e46 Infinitely try to reconnect gql subscriptions (#563) 2024-01-21 22:31:20 +01:00
Chance Zibolski
05f57730db Support configuring automatic downloads by category (#562)
Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
2024-01-21 22:31:04 +01:00
schroda
1c2a196950 Fix/adding manga to library not updating category (#559)
* Refetch categories after updating a manga

After adding/removing a manga to/from the library, the categories did not update.

* Include manga categories int the manga update mutation response
2024-01-17 13:45:30 +01:00
schroda
42e3d64f80 Clear extensions cache after extension repos change (#555)
This will force a refetch of the extensions the next time the list gets opened which will update the extensions on the server
2024-01-15 23:22:25 +01:00
schroda
3973eda089 [ServerMapping][Codegen] Update to latest server gql MangaType changes (#546) 2024-01-11 03:53:06 +01:00
schroda
39b79c6ebe Feature/settings support custom extension repos (#539)
* [Codegen] Support custom extension repos

* [VersionMapping] Require server version "r1444" for preview
2024-01-06 18:38:16 +01:00
schroda
05fa3d0732 Fix/chapter not getting deleted after being read (#532)
* Create permanent subscriptions

The subscriptions have to be permanently open, otherwise, the cache gets outdated.

E.g. in case a view is open, which does not subscribe to the download updates, finished downloads are never received and thus, data of existing chapters/mangas in the cache get outdated

* [Codegen][Tool] Get latest data from cache for automatic chapter deletion after reading

The manga chapters query is on "standby" to prevent the reader from rerender in case the underlying query data updates, which would cause the reader to jump back to the beginning of the last read page.
Thus, when checking if the chapter should be automatically deleted, the data from the query can't be used, since it is outdated.
2024-01-01 22:40:39 +01:00
schroda
37ce494fda Log promise failures instead of ignoring them (#531)
In case the failure does not get handled, it should at least get logged, to prevent silently ignoring it
2023-12-31 01:42:54 +01:00
schroda
a3a52064cc Feature/cleanup chapter actions (#525)
* Extract chapter actions into "Chapters"

* Extract chapter action menu into component

* Rename "SelectionFABActionItem" to "MenuItem"

* Decouple "MenuItem" from "SelectionFAB"

* Use "MenuItem" in "ActionMenus"

* Merge chapter action menus

* Simplify chapter "mark as read" action
2023-12-30 04:04:59 +01:00
schroda
f12f025e9d Add option to remove non library mangas from categories (#520)
It's currently not possible to filter out non library mangas from the mangas field of categories, thus, the totalCount of mangas in a category might be greater than what is actually displayed in the library.
2023-12-27 18:17:41 +01:00
schroda
446deeae06 Feature/library manga actions (#506)
* Extend "IMangaGridProps" from "DefaultGridProps"

* Move library manga filtering into hook

* Add logic to select mangas

* Add manga actions

* Remove cache only policy for category mangas

Unclear why this was added

* Prevent SelectionFAB from being hidden by the mobile footer

On e.g. the library page, the footer is visible and thus, the fab was not completely visible

* Update categories of manga only after clicking "OK"

Previously, selecting a category resulted in an immediate mutation.
To be able to reuse the "CategorySelect" component to change the categories of multiple mangas at once, this behaviour is not suited.

* Add action to change categories of multiple mangas

* Cancel selection mode after removal from library

The mangas would still be selected and other action could get performed. However, this should only be possible for mangas that are in the library

* Remove unintentionally added console log

Accidentally added with 980da657d9
2023-12-25 21:37:45 +01:00
schroda
980da657d9 [Codegen] Check cache before executing query for a single item (#513)
E.g. in case a manga was already loaded through the category mangas query, the query for that specific manga should not run against the server if it hasn't been executed before
2023-12-25 21:20:07 +01:00