Commit Graph

1581 Commits

Author SHA1 Message Date
schroda
6c46c56252 Handle showing disabled state of automatic chapter deletion (#533)
The disabled state (0) was incorrectly handled as the downloading state
2024-01-02 16:14:19 +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
7d3d82556a Handle extension update failure (#530)
The failure was never handled and instead, the update was infinitely stuck in progress.
2023-12-31 01:46:53 +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
37d6b84cf4 Use correct titles for manga actions in selection mode (#529)
Should have been changed with ecea80f41e
2023-12-30 15:05:54 +01:00
schroda
edc2a62a76 Feature/cleanup files (#528)
* Move menu components into new dir

* Move chapter components into new dir

* Extract menu helper functions

* Move "SelectionFAB" to "collection" dir

* Move debounce hook to global utils dir

* Rename manga "hooks" to "useRefreshManga"
2023-12-30 14:30:04 +01:00
schroda
ecea80f41e Merge manga action menus (#527) 2023-12-30 14:26:50 +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
d15be603b1 Use up-to-date manga data for selection fab actions (#526)
The selected manga data was only updated in case the selection changed, thus, after executing an action, the used data was outdated
2023-12-30 04:04:47 +01:00
schroda
356303ab5a Allow browser context menu for images in reader (#524)
The changes of dabe88385d removed the ability to copy/open images in a new tab due to enabling scrolling via left mouse click and dragging the mouse.
2023-12-28 20:22:34 +01:00
schroda
120e97e882 Feature/restore backup inform about missing sources (#523)
* Validate backup before starting restore process

In case sources were missing, the user was never informed and thus, did not know which sources were required for all manga to work

* Reset file input after restoring

Otherwise, the same backup file can't be restored until the page gets refreshed/re-opened
2023-12-28 16:08:13 +01:00
schroda
a1dca02fea Add missing extension key field to mutation result (#522)
Regression introduced with c8747d6db4
2023-12-28 16:08:02 +01:00
schroda
f81b20b4fd Fix/library continue read button causes page refresh (#521)
* Use app routing to open reader

Otherwise, the app loses the navigation history and won't open the last page (library) when closing the reader

* Prevent setting 0 as grid width

After the change of 4ebe6494f6c97c0d064c617f70b36682e6aedcb2, closing the reader and coming back to the library resulted in a single manga per row, due to the grids width being 0.
2023-12-28 16:07:50 +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
e025efb9dc Feature/add manga to library category select dialog (#519)
* Move "SearchSettings" into "LibrarySettings"

* Change property "setOpen" to "onClose" for "CategorySelect"

* Optionally show category selection when adding manga to library

* Update "ignore filters" translation

* Move "ignore_filters" setting to "metadataServerSettings"
2023-12-27 18:08:16 +01:00
schroda
1345cfe624 Update manga category selection in case categories changed (#518)
After a manga got added to the library, the category selection dialog did not show the categories the manga got automatically added to.
The selection only got updated after the dialog got closed and opened again

Regression was introduced with 446deeae06
2023-12-27 17:20:28 +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
schroda
c115fcd573 Feature/make selection logic reusable (#515)
* Introduce "selectable collection" hook

* Extract "select all" button into component

* Make "SelectionFABActionItem" reusable

Was to tightly coupled to chapters

* Make "SelectionFAB" reusable

Was to tightly coupled to chapters
2023-12-25 21:20:00 +01:00
schroda
c8747d6db4 Use correct key to normalize extensions (#512) 2023-12-25 21:16:04 +01:00
schroda
0615ef87ce Add divider between library tabs and mangas (#514) 2023-12-25 21:15:52 +01:00
schroda
2390361fb2 [Codegen] Request manga download count with chapter deletion mutation (#516)
After deleting a chapter, the download count of the chapters manga did not update, because the information was not requested with the mutation
2023-12-25 21:15:41 +01:00
schroda
168e8f82f6 Use "Footer" to prevent fab overlapping the last item (#517) 2023-12-25 21:15:31 +01:00
schroda
09d1cf91e0 Prevent navigation state update in case path already changed (#511)
The fix of e4beafb11f only worked in dev env and not in prod.
This prevents the navigation state update from getting triggered in case the path has changed in the meantime
2023-12-24 02:36:09 +01:00
schroda
e4beafb11f Cancel the navigation state update correctly (#507)
The timeout was never canceled in case the tab changed, thus, it kept updating the navigation state for the previous tab and the new tab.
2023-12-23 15:15:14 +01:00
schroda
e966b0328b Remove unnecessary query refetches with mutations (#508) 2023-12-23 15:15:08 +01:00
schroda
3756b65256 Correctly check for dev env (#509) 2023-12-23 15:15:03 +01:00
schroda
f4e8441238 Prevent ApolloError handling the manga category mutation result (#510)
Unclear what is causing the error or why this is fixing it, but without requesting the categories total count, the mutation fails on the first execution with "Uncaught (in promise) ApolloError: Cannot convert object to primitive value"
2023-12-23 15:14:57 +01:00
schroda
2f8c284c8b Add continue read button to library (#505) 2023-12-19 15:17:00 +01:00
schroda
663e20fff9 Visualize read chapters in the update list 2023-12-18 23:12:42 +01:00
schroda
953ebbe5a6 Add button to mark all chapters as read 2023-12-18 22:46:50 +01:00
schroda
5010b706fd Add button to download all chapters 2023-12-18 22:46:50 +01:00
schroda
90cec35358 Add button to quickly select all chapters 2023-12-18 22:46:50 +01:00
schroda
226f2e170f Handle line breaks in the manga description 2023-12-18 22:46:42 +01:00
schroda
1300c10d83 Remove unnecessary library refetch
The server is now returning up-to-date manga data and thus, it's not necessary to refetch the library anymore after the update is finished
2023-12-16 20:43:11 +01:00
schroda
12b6700110 [VersionMapping] Require server version "r1438" for preview 2023-12-16 20:35:35 +01:00
schroda
f542c17fd6 Update download subscription to server changes
The download subscription now sends messages for finished downloads, thus, it's not required anymore to refetch the chapters.
2023-12-16 20:35:35 +01:00
Hosted Weblate
62568ce76b Translations update from Hosted Weblate
Translated using Weblate (Spanish)

Spanish: currently translated at 99.6% (327 of 328 strings)

Translations update from Hosted Weblate

Translated using Weblate (Chinese (Simplified))

Chinese (Simplified): currently translated at 96.2% (286 of 297 strings)

Translations update from Hosted Weblate

Translated using Weblate (Spanish)

Spanish: currently translated at 86.7% (256 of 295 strings)

Translations update from Hosted Weblate

Translated using Weblate (Chinese (Simplified))

Chinese (Simplified): currently translated at 96.9% (286 of 295 strings)

Translations update from Hosted Weblate

Translated using Weblate (Chinese (Simplified))

Chinese (Simplified): currently translated at 96.9% (286 of 295 strings)

Translations update from Hosted Weblate

Translated using Weblate (Chinese (Simplified))

Chinese (Simplified): currently translated at 98.7% (233 of 236 strings)

Translations update from Hosted Weblate

Translated using Weblate (Spanish)

Spanish: currently translated at 100.0% (236 of 236 strings)

Translations update from Hosted Weblate

Translated using Weblate (Spanish)

Spanish: currently translated at 100.0% (227 of 227 strings)

Translations update from Hosted Weblate

Translated using Weblate (Spanish)

Spanish: currently translated at 100.0% (214 of 214 strings)

Translations update from Hosted Weblate

Translated using Weblate (Spanish)

Spanish: currently translated at 100.0% (214 of 214 strings)

Translations update from Hosted Weblate

Translated using Weblate (French)

French: currently translated at 70.0% (147 of 210 strings)

Translations update from Hosted Weblate

Translated using Weblate (Spanish)

Spanish: currently translated at 100.0% (210 of 210 strings)

Translations update from Hosted Weblate

Translated using Weblate (Spanish)

Spanish: currently translated at 100.0% (202 of 202 strings)

Translations update from Hosted Weblate

Translated using Weblate (French)

French: currently translated at 54.2% (109 of 201 strings)

Co-authored-by: Alexandre Journet <alexandre.journet@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ibaraki Douji <daynesmorgan33@gmail.com>
Co-authored-by: Nite07 <admin@nite07.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: misaka10843 <misaka10843@outlook.jp>
Co-authored-by: 蓝云Reyes <i@muir.fun>
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/es/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/fr/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/zh_Hans/
Translation: Suwayomi/Tachidesk-WebUI
2023-12-14 00:33:59 +01:00
schroda
214043fe9d Fix/script changelog creation (#496)
* [Tooling] Select git commit author correctly

Caused the credit for a commit without a pr id to show as "@[object Object]"

* [Tooling] Fix typo in file name

* [Tooling] Use total commit count from webUI repos master branch
2023-12-13 23:48:35 +01:00
schroda
1dc60af67c Add logic to reorder downloads (#495) 2023-12-13 02:05:03 +01:00
schroda
b5f86ae609 Feature/virtualize download queue (#494)
* Virtualize the download queue

* Show loading placeholder for download queue
2023-12-13 01:55:38 +01:00
schroda
abee8c7c55 Use virtuoso grid state to restore the previous scroll position (#492) 2023-12-10 15:58:28 +01:00
schroda
b6b902797e Scroll to top when changing page (#493)
The scroll position was persisted when switching to a different page.
Thus, when the current page was scrolled down and the next page was also scrollable, the top of the new page was not visible
2023-12-10 15:58:21 +01:00
schroda
c51897ed54 Feature/download queue clear queue (#490)
* Use "NavbarContext" in "DownloadsQueue"

* Add option to clear the whole download queue
2023-12-10 00:09:00 +01:00
schroda
7d574a29f6 Correctly calculate the remaining time till the next update check (#491) 2023-12-10 00:08:33 +01:00
schroda
9cb72243d6 Automatically check for server updates (#489) 2023-12-09 23:20:52 +01:00
schroda
78310496aa Feature/about screen add option to check for and trigger updates (#485)
* [VersionMapping] Require server version "r1436" for preview

* Move ts util types to new type file

* Add buttons for updating server and webUI
2023-12-09 23:08:27 +01:00
schroda
2caf88ce51 Remove incorrect "ListItemSecondaryAction" usage (#486) 2023-12-09 14:16:59 +01:00
schroda
fbf627b3aa Add option to clear the server cache (#487) 2023-12-09 14:16:52 +01:00
schroda
db5d3ff7c0 Remove "directLink" prop (#488)
Is not required anymore since "Link" of react-router-dom is a "<a>" element now anyway.
It also caused the following warning

"react-dom.development.js:86  Warning: React does not recognize the `directLink` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `directlink` instead. If you accidentally passed it from a parent component, remove it from the DOM element"
2023-12-09 14:16:44 +01:00