Commit Graph

1369 Commits

Author SHA1 Message Date
schroda
aa01d6712b Update extensions list after extension update (#471) 2023-11-24 03:20:16 +01:00
schroda
7adc28a35c Feature/gql improve queries mutations subscriptions (#470)
* [Codegen] Request less fields for category mutations

* [Codegen] Request less fields for chapter mutations

* [Codegen] Request less fields for downloader mutations

* [Codegen] Request less fields for extension mutations

* [Codegen] Request less fields for manga mutations

* [Codegen] Request less fields for source mutations

* [Codegen] Request less fields for updater subscription

* [Codegen] Request less fields for downloader subscription

* [Codegen] Combine chapter update mutations
2023-11-24 03:17:49 +01:00
schroda
3b147b1b46 Fix/update gql after server changes (#469)
* [Codegen] Update files

* Update "AboutServer"

* Cache "WebUIUpdateInfo"
2023-11-24 01:33:56 +01:00
schroda
3766540ce5 Add WebUI settings (#460)
* Add WebUI settings

* [VersionMapping] Require server version "r1427" for preview
2023-11-20 22:14:24 +01:00
schroda
cdf9229457 Feature/global update show last update time (#468)
* Show last global update timestamp

* Add update button to "Updates" screen
2023-11-19 22:43:29 +01:00
schroda
99ba45eceb Use mui tooltip for manga titles (#467) 2023-11-19 22:43:21 +01:00
schroda
dbb4bf70af Use correct local source header in settings (#466) 2023-11-19 21:22:21 +01:00
schroda
d12ac27b61 Feature/download ahead while reading (#464)
* Download next chapters when marking chapter as read while reading

* Add "auto delete chapter" settings

* Delete chapter after finished reading

* Delete chapters after marking them as read

* Improve "mark previous as read" action

Send only ids of chapters that are actually unread
2023-11-19 21:17:35 +01:00
schroda
e26907e2ce Prevent TypeError when loading next chapter after last page (#463) 2023-11-19 21:17:22 +01:00
schroda
7db5435967 Remove "useCache" query from image requests (#465)
Should have been removed with eda682d9ab
2023-11-19 21:17:10 +01:00
schroda
197ee5c94b Persist server settings when disabling them (#462)
Some settings use 0 as the disabled state.
In this case, the previous enabled value was lost.
To prevent this, the last value now gets saved and set again when enabling the setting again
2023-11-19 00:13:49 +01:00
schroda
1fd9b4e744 Disable disallowed settings (#461) 2023-11-19 00:10:30 +01:00
schroda
eda682d9ab Remove deprecated cache setting (#459) 2023-11-19 00:10:19 +01:00
schroda
cac60fed2c Feature/server settings (#458)
* Move "Server Address" setting to server settings

* Rename "ServerDirSetting" to "TextSetting"

* Use "TextSetting" for server address

* Reset value when closing the dialog

* Support passwords in "TextSetting"

* Add server settings
2023-11-18 19:55:44 +01:00
schroda
482db4626a Prevent infinite re-renders in extensions (#457)
Regression introduced with 593acc7f89
2023-11-18 19:55:35 +01:00
schroda
8d4687428f Fix/app search (#456)
* Auto open search correctly in global search

* Update search input when navigating to previous/next location

* Revert: Navigate to previous page when canceling search

Has to many edge cases and fixing them would require a global history stack which gets saved in the location state.
This then would lead to the apps internal back navigation to be the same as the browsers which is not wanted, since you should not get moved deeper into the apps navigation when clicking the back button

* Correctly autofocus search input

Sometimes the autofocus did not work, since the input did not exist yet by the time the timeout was triggered

* Restore search input open state when navigation to previous/next location

* Restore search input focus when navigating to previous/next location
2023-11-12 19:04:40 +01:00
schroda
35c34b6d1b Feature/search bar improvements (#455)
* Require search to be committed with enter

* Extract back navigation logic into hook

* Navigate to previous page when canceling search

This makes the search the next page in the history stack instead of making it the previous one

* Close and open search depending on the location and available query

* Navigate to previous page in case new query is empty
2023-11-12 03:21:26 +01:00
schroda
0c7498dba6 Prevent pages from getting selected while dragging (#454) 2023-11-12 01:48:10 +01:00
schroda
dabe88385d Feature/reader vertical pager keyboard bindings scrolling (#452)
* Scroll up when clicking shift + space

* Add keyboard bindings to arrow up and down

Align scroll amount with using other keys like space, arrow right/left

* Add scroll inversion with shift to other key bindings

* Scroll per mouse dragging
2023-11-12 01:41:20 +01:00
schroda
9b96560a17 Feature/settings backup (#453)
* Show loading indicator for "NumberSetting"

* [i18n] Add lowercase interpolation format

* Add required dependencies for time settings

* Dynamically import dayjs locales for languages

* Add backup settings
2023-11-12 01:41:10 +01:00
schroda
b080286b81 Reduce chapter updates in the reader
Debounce updating chapter, unless it's the last page, when switching/scrolling pages really fast.
Reduces amount of requests send to the server.
2023-11-11 23:53:12 +01:00
schroda
a0a52b11a1 Fix/pagination of sources which require pages to be fetched in order (#451)
* Handle sources that do not support revalidation

At least e-hentai is not able to handle out of order pagination requests.
E.g. in case the last request was for page 1 and the next one is for page 3, the result will be for page 2, because e-hentai just ignores the request page number and just returns the next page after the last fetched one.

* Optionally clear source browse cache when opening component

At least e-hentai is not able to handle out of order pagination requests.
The revalidation logic will cause exactly this.
Due to this, the revalidation for these sources is disabled.
To prevent an out of date cache, it gets cleared when routing to the source component
2023-11-11 23:43:22 +01:00
schroda
345fbcb5c7 Fix/apollo client spamming infinite requets on failure (#450)
* Remove abort controller by default from requests

Apollo client is, for whatever reason, considering it a new hook call when passing an abort controller to be passed to the actual request.
On request failures this then causes infinite requests due to it being a new hook call.

* Move side effect into useEffect

This was missed and started causing issues after the changes of 60429d9d98544e1e49a112aacf77bdbb831740ec.
Due to the changes, the component did not re-render unnecessarily which caused the component not to re-render with the fetched data

* Reset fetching initial pages state

The state was never reset, thus, in case of an error, the initial pages fetch was never triggered again
2023-11-11 23:42:58 +01:00
schroda
291e1899f9 Remove re-fetching of manga query on chapter update (#449)
The mutation returns the mutated manga, thus, updating the cache which makes this  refetch unnecessary and just creates redundant requests.
2023-11-11 23:42:33 +01:00
schroda
c5f943d571 Get latest manga data from the apollo cache (#447)
When using the cached results, replace them with the latest cached data from apollo.
This will have the updated data, that was inserted from the manga update mutation
2023-11-05 22:40:35 +01:00
schroda
593acc7f89 Refresh extension list after updating (#446)
When using the cached results, replace them with the latest cached data from apollo.
This will have the updated data, that was inserted from the extension update mutation
2023-11-05 22:37:28 +01:00
schroda
9284e46c45 Prevent SelectionFAB from being behind the "ChapterCard" checkbox (#445)
The MUI Checkbox component has a z-index of 1, which causes it to register the mouse events instead of the "SelectionFAB" which is visually in front of it
2023-11-05 17:22:35 +01:00
schroda
4ab61723e7 Add missing tooltips (#444) 2023-11-05 17:22:29 +01:00
schroda
d9d92a75fa Handle source not supporting browse "latest" (#443) 2023-11-05 17:22:16 +01:00
schroda
134e47763f Feature/update dependencies (#442)
* [Tooling] Fix "updateDeps" script

For some reason commands after "yarn outdated" did not get executed

* [Tooling] Show "outdated" info at end of "updateScript"

* Update dependencies

"apollo-upload-client" v18 requires migration to ts module "nodenext"
2023-11-04 23:11:40 +01:00
schroda
7cb062d453 Feature/extensions always use fetch mutation to get list (#440)
* Reset the cache after importing a backup

* Add option to delete cached data after ttl is reached

* Always use mutation to get extensions list
2023-11-04 22:40:38 +01:00
schroda
2c35808ee4 Fetch chapter pages everytime unless chapter is downloaded (#439)
In case the chapter is not downloaded, the chapters pages have to be always fetched, since there is a possibility, that the chapter data is so old, that the available pages data is outdated.
2023-11-04 22:40:21 +01:00
schroda
a6cc757d50 Feature/global update settings update manga metadata (#441)
* Add "updateMangas" setting to global update settings

* Sort "en.json" alphabetically
2023-11-04 14:55:25 +01:00
schroda
14e7af9a4a Feature/modify download settings (#429)
* [Codegen] Update settings fragment

* Extract logic to change a number setting

* Show slider for global update interval setting

* Add download settings
2023-11-04 14:40:43 +01:00
schroda
1acda66b16 Feature/update backup restore to server changes (#438)
* [Codegen] Update back query/mutation

* Update backup restore

* [VersionMapping] Require server version "r1410" for preview
2023-11-02 13:01:01 +01:00
schroda
cc59f88a1d Correct library error translations (#437) 2023-11-01 14:26:57 +01:00
schroda
a638333684 Handle source browse when first page is also the last page (#436)
In case the first page was also the last page, there is no next page that can be fetched.
On large screens, where the initial pages to fetch are 2, this resulted in an endless loading screen
2023-10-29 20:51:53 +01:00
schroda
529fcf2d25 Mark first chapter as read for "mark previous as read" (#435) 2023-10-29 13:32:47 +01:00
schroda
4c6e9a8aa1 Do not add mangas to the default category (#433)
The default category is used as a fallback and should never be actually mapped to mangas in the database.
However, when using the update manga category mutation the server still creates this mapping, which then leads to issues with getting mangas for the default category
2023-10-29 13:15:17 +01:00
schroda
678df88068 Feature/modify global update settings (#432)
* Move setting components in "settings" folder

* Add setting to change global update automation
2023-10-29 02:01:59 +02:00
schroda
4c6d507405 Feature/show backup restore progress (#431)
* Extract "Progress" component

* Show backup restore progress
2023-10-29 01:49:27 +02:00
schroda
30fd8b0fca Feature/support new tachiyomi backup file extension (#430)
* [Codegen] Fix restore backup mutation/query

The server doesn't support nested objects for file uploads

* Support new tachiyomi backup extension
2023-10-29 01:45:08 +02:00
schroda
5a5b12a9e1 [ESLint] Prefer named exports (#427) 2023-10-28 00:32:02 +02:00
schroda
68e7b4b16d Feature/library global update exclude manga with state (#281)
* Extract global update settings

* Add option to exclude mangas with specific state from global update
2023-10-27 23:39:05 +02:00
schroda
c8f02b3b8c [ESLint] Add "no-unused-imports" plugin (#426) 2023-10-27 21:19:45 +02:00
schroda
76d1ba835c Merge pull request #395 from schroda/feature/use_graphql
Feature/use graphql
2023-10-27 21:10:07 +02:00
schroda
09c7e804ba Refresh library mangas after update
the gql updater subscription currently return stale data, thus, the mangas do net get updated in the cache
2023-10-27 21:03:37 +02:00
schroda
b1aaeb4d5d Show loading text for include/exclude categories setting
Due to setting categories to be an empty array by default, the loading text was never shown
2023-10-27 21:03:37 +02:00
schroda
2ad9ccd9bd Use gql for loading default category mangas 2023-10-27 20:23:47 +02:00
schroda
b6382bb33a Load only category mangas that are in the library 2023-10-27 20:23:47 +02:00