* Use "create-vite"s tsconfig files setup
The previous tsconfig file caused issues with vite throwing "missing identifiers of modules" errors
* Remove unused React imports
Starting with React 17 the nex JSX transform is being used
* Update dependencies with non-breaking changes
* Update dependency "typescript-eslint" to v6.x
Update to v6.2.1
* Update dependencies "prettier" to v3.x
Update prettier to v3.0.1
Update eslint-plugin-prettier to 5.0.0
* Update i18next to v23.x
Update to version 23.2.7
* Use new "ParseKeys" (old: "TFuncKey") type
* Remove unnecessary casts to string
Not needed anymore with the latest version
* Introduce local history stack
To be able to know if the browser back navigation should be used, it is sometimes necessary to know which the previous page was.
E.g. it should not be used in case the current page is the manga page and the previous one is the reader.
* Handle cases where there is no previous page in the history stack
* Always use a button for the navigation back button
* Navigate from base route to library by replacing the current location
The base route should not be included in the history
Ukrainian: currently translated at 100.0% (201 of 201 strings)
Translated using Weblate (Chinese (Simplified))
Chinese (Simplified): currently translated at 100.0% (201 of 201 strings)
Translated using Weblate (Indonesian)
Indonesian: currently translated at 8.9% (18 of 201 strings)
Translated using Weblate (Chinese (Simplified))
Chinese (Simplified): currently translated at 100.0% (201 of 201 strings)
Added translation using Weblate (Indonesian)
Translated using Weblate (Japanese)
Japanese: currently translated at 3.0% (6 of 200 strings)
Translated using Weblate (Ukrainian)
Ukrainian: currently translated at 100.0% (200 of 200 strings)
Translated using Weblate (Ukrainian)
Ukrainian: currently translated at 100.0% (199 of 199 strings)
Translated using Weblate (Chinese (Simplified))
Chinese (Simplified): currently translated at 61.1% (121 of 198 strings)
Translated using Weblate (Ukrainian)
Ukrainian: currently translated at 100.0% (198 of 198 strings)
Translated using Weblate (Ukrainian)
Ukrainian: currently translated at 100.0% (197 of 197 strings)
Translated using Weblate (Chinese (Simplified))
Chinese (Simplified): currently translated at 60.7% (119 of 196 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (196 of 196 strings)
Translated using Weblate
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: Dan <jonweblin2205@protonmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Rafie Rafie <rafiedanr@gmail.com>
Co-authored-by: Super Mario <supermario22922@gmail.com>
Co-authored-by: misaka10843 <misaka10843@outlook.jp>
Co-authored-by: schroda <github@mail.schroda.net>
Co-authored-by: 娃哈哈 <1045188196xsj@gmail.com>
Co-authored-by: 蓝云Reyes <i@muir.fun>
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/de/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/id/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/ja/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/uk/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-webui/zh_Hans/
Translation: Suwayomi/Tachidesk-WebUI
* Move "onClick" handler to "ListItemButton" - LibrarySettings "global update categories"
Clicks were only handled on the button content leading to a small area around the content to not handle the clicks, thus, not opening the dialog
* Move "onClick" handler to "ListItemButton" - Settings "manga item width"
Clicks were only handled on the button content leading to a small area around the content to not handle the clicks, thus, not opening the dialog
* Revert "Fix/manga grid infinite item width (#376)"
This reverts commit 48d559ec
This fixed (and worked as expected in dev mode) the very rare issue in dev mode (you had to load the page with a small screen size and increase the screen size before the grid and grid items were rendered) and caused it frequently in production build in the Library grid when switching categories
* Fallback grid dimensions to current window dimensions
Hook only run once, which could lead to an issue where the grid item width was calculated to be infinite (e.g. in SearchAll due to strict-mode behaviour in the dev mode).
Could be that this is only an issue in dev mode due to react-strict mode.
* Remove unused "height" grid dimensions property
* Calculate GridItem width once
Was unnecessarily calculated on every item render
* Update grid dimensions everytime the height or width changes
Hook only run once, which could lead to an issue where the grid item width was calculated to be infinite.
Could be that this is only an issue in dev mode due to react-strict mode.
* Disable ssr by default for "useMediaQuery"
SSR would cause the hook to run once with default values and only after the first render with real values.
This can cause issue on rendering when depending on useMediaQuery results like in 8c129f2e08
* Virtualize manga grids
* Remove SourceMangas load more guard
Was required due to the previous load more trigger logic from the MangaGrid.
Due to using Virtuoso now, load more will be triggered only once when the bottom of the grid was reached and thus won't trigger multiple load more requests
* Remove old Library pagination
Pagination is handled by virtuoso, thus, the previous pagination can be removed
* Increase initial loaded pages to make infinite load work
virtuoso requires enough initial items to be rendered, so that actual virtualization takes effect, for it to fire "endReached"
* Prevent virtuoso grid scrollbar from jumping around
In case the items have a big height difference there is a bug where the scrollbar starts jumping around the moment these new items are rendered
* Restore scroll position
For some reason the UI jumps around when accessing "document.documentElement" during loading more items.
After the items are rendered the loading placeholder gets removed and the previous items jump to the bottom of the viewport.
* Limit manga grid titles to two lines
* Remove "last page" info from MangaGrid
Info is not needed. The only thing the MangaGrid has to do is to trigger a request to load more data
There was an issue when switching from the "search" back to the "filter" source content type.
The "filter" request returned the data from the search request and thus, showed invalid data until the correct data was loaded instead of showing the loading placeholder
SearchAll used a different search endpoint and thus, the already requested pages for the search weren't reused and instead had to be requested again since the swr cache key was different
In case more than 1 page was requested for the initial request, there was a problem in case the first page already had no results.
In that case the request for the second page always returned with the "isLoadMore" and "isLoading" flag set to true.
Thus, incorrectly indicating that the request is still active.
The "actual" request was already finished, but internally the "isLoadMore" flag was set incorrectly due to not considering if an actual request is active.
* Correctly handle missing location state
In case the view gets opened directly via url, there won't be any location state.
This leads to a TypeError when trying to get "contentType" from the location state.
Issue was introduced with 4e8813b526 where the function was adapted incorrectly with code that will never work (good job me KEKW)
* Add info about dev mode + strict mode issue
* Prevent dialog not to showing any categories after updating them
After updating to react v18 the dialog categories were empty after updating the category changes
* Immediately close the dialog after starting update
Catalog was open as long as the update was running
* Remove unnecessary state
* Remove "useBackTo"
Not needed
* Use browser back navigation to close the reader
This will cause the previous page (manga or updates) to be opened instead of always opening the manga page
This caused the chapter to be loaded with stale data (the old lastPageRead state) and then jumping to the actual lastPageRead after the latest data was received.
It's not possible to mutate the chapter when updating lastPageRead since this causes the reader to always jump back to the just set lastPageRead when scrolling
With the recent update to react-router-dom v6 the route "manga/:mangaId/chapter/:chapterIndex/page/:pageIndex" doesn't get matched anymore.
The "pageIndex" is also unnecessary since it doesn't get used and instead the chapters "lastReadPage" property gets used to resume the chapter.