Commit Graph

39 Commits

Author SHA1 Message Date
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
2f8c284c8b Add continue read button to library (#505) 2023-12-19 15:17:00 +01:00
schroda
99ba45eceb Use mui tooltip for manga titles (#467) 2023-11-19 22:43:21 +01:00
schroda
5a5b12a9e1 [ESLint] Prefer named exports (#427) 2023-10-28 00:32:02 +02:00
schroda
b3a432ed2e Update typings 2023-10-27 20:23:46 +02:00
schroda
af9d49e5e9 Use gql for "mangas" II - category mangas 2023-10-27 20:23:04 +02:00
schroda
bffc1669e2 Move "RequestManager" in sub folder 2023-10-27 20:23:00 +02:00
schroda
48fe8d23e9 Fix/vite tsconfig setup (#404)
* 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
2023-08-14 21:43:06 +02:00
schroda
19d27fdf26 Feature/virtualize manga grid (#363)
* 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
2023-06-17 16:50:17 +02:00
schroda
63c1ac95eb Feature/remove use back to util (#360)
* 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
2023-06-08 14:25:24 +02:00
schroda
4b83ccc889 Feature/use alias for imports (#352)
* Use alias "@" for imports

* Use alias "@" for imports - Fix imports

* Use alias "@" for imports - Prevent faulty "import/extensions" linting issue

For some reason the rule throws an error for alias imports

* Use alias "@" for imports - Update "no-relative-imports" eslint rule
2023-06-05 01:42:39 +02:00
schroda
1ce27ea939 Feature/update dependency mui to v5.x (#332)
* Update dependency "mui" to v5.x

Update to v5.13.3

Fixes issue of "SxProps" not being exported by "@mui/material"

* Update dependency "mui" to v5.x - Fix grid item size

Update to v5.13.3

Fixes issue of "SxProps" not being exported by "@mui/material"

* Update dependency "mui" to v5.x - Replace "ListItem" with "ListItemButton"

* Update dependency "mui" to v5.x - Fix tsc issue

* Update dependency "mui" to v5.x - Prevent reader white screen

Due to "initialChapter" being a function returning an object, it causes a re-render everytime due to it (the object) being used as a dependency.
This caused a white screen when skipping to the previous or next chapter
2023-06-04 21:13:07 +02:00
schroda
6911f60eb4 Feature/remove dependency mui system (#331)
* Remove duplicated dependency "@mui/system"

Already included in "@mui/material"

* Remove duplicated dependency "@mui/system" - Fix theme "custom" palette

Already included in "@mui/material"

* Remove duplicated dependency "@mui/system" - Fix imports

Already included in "@mui/material"
2023-06-04 21:08:39 +02:00
schroda
836b4ea4d2 Set the manga ref for the "list style" (#311)
Ref was never set for the "list style" which caused the pagination to not work
2023-05-20 13:22:24 +02:00
schroda
a457d80c44 Feature/streamline backend requests (#297)
* Introduce "RequestManager"

* Use "RequestManager" - Simple replacements

 - Get rid of all "util/client" imports
 - replace old requests with new "RequestManager"
 - remove "fetcher" from global SWR config
     instead of using the SWR hooks by themselves, the "requestManager" is supposed to be used

* Use "RequestManager" - Do requests via SWR hooks

Use SWR hooks at places where it's easily usable

* Prevent trailing slashes in the "baseUrl"
2023-05-18 13:25:19 +02:00
schroda
58eb2fead3 Feature/enforce license notice in each file via eslint rule (#304)
* [ESLint] Add "eslint-plugin-header" as dev dependency

* [ESLint::eslint-plugin-header] Setup rule

* [ESLint::eslint-plugin-header] Fix errors
2023-05-18 13:17:41 +02:00
schroda
bd91510227 Remove eslint rule deactivations (#290) 2023-05-11 18:00:37 +02:00
schroda
d58bd6cd92 add translation keys (#246)
* Fix i18n tsc issue

"t" can return null by default.
This was already disabled in the config, but it had no effect on tsc.

* Fix translation in "DefaultNavBar"

key was missing and since this is a constant the translation wouldn't update in case the language got changed after first load.

* Enable typing for i18n translation keys

* Add translation keys
2023-03-23 16:29:32 +03:30
schroda
23001a4298 update react scripts dependency (#255)
* Move "dependencies" close to "devDependencies"

Makes it easier to have a quick overview

* Upgrade "react-scripts" to latest version

With new versions of node (> v16) the build scripts fails with the following error "error:0308010C:digital envelope routines::unsupported"

* Upgrade "react-scripts" to v5 - Fix import

* Upgrade "eslint" dependencies

The latest version of "react-scripts" uses eslint v8 causing the following error "... ERROR in Plugin "react" was conflicted between ".eslintrc.js" >> eslint-config-airbnb ..."

* Upgrade "eslint" dependencies - Allow nested components as props

* Upgrade "eslint" dependencies - Fix lint issues
2023-03-11 20:35:58 +03:30
Daniel
96fd1cf73b remove manually created typing d ts file (#249)
* Rename file

".d.ts" files are files that are automatically generated during compilation (in case option is set) and shouldn't be created manually.

* Export types and interfaces

* Add missing imports
2023-02-24 19:10:37 +03:30
Daniel
2c11708c92 increase prettier line length to 120 (#233)
* [Prettier] Increase max line length to 120

100 is quite low, especially on modern monitors.
The length is also reached quite quickly with 4 spaces per tab depending on the indentation depth

* [Prettier] Increase max line length to 120 - Fix formatting
2023-02-08 20:49:26 +03:30
Daniel
4e0a860dfd add prettier for auto formatting (#231)
* [Prettier] Add "prettier"

Makes the formatting of the code consistent.
By using the eslint-plugin-prettier formatting issues will be highlighted as a lint error.
These errors will be auto fixed by running "lint --fix" (which can be done automatically on file save)

* [Prettier] Add "prettier" - Fix formatting
2023-02-06 12:36:33 +03:30
Daniel
c92977844e Add tooltip containing full manga title to title of manga (#221)
In case the title is truncated it's still possible to view the full manga title.
Same way as it is done on e.g. Twitch or YouTube
2023-01-07 19:14:39 +03:30
amr
2e3f57677e Created a GridLayout enum and updated all locations to use it. (#208)
So, that we can more easily refactor the code later
2022-12-20 08:35:31 +03:30
Valter Martinek
8dfc89ee17 Refactor/download queue and cleanup visuals overall (#202)
* Move context providers and configuration providers to separate component, extract theme to separate file

* Use custom palette color instead of direct colors

* Replace different clicable things with CardActionArea to get transition and links

* Refactor DownloadQueue, update layout, unify all the download progress indicators

* Unify active filter indicator

* Use divider instead of hr

* Fix background color in extensions light theme

* Fix thumbnail overlay in library screen list view

* Don't show download button on downloaded updates
2022-11-26 16:21:56 +03:30
Valter Martinek
62816338f3 Refactor and fix sorting in library (#197) 2022-11-24 23:34:30 +03:30
Valter Martinek
3972d7757f Fix navbar back button behavior (#195)
* Enable passing backLink through location state. Explicitly handle cases for BACK

* Allow pages to override default backLink. Fix manga page back link

* Cleanup
2022-11-21 04:03:45 +03:30
robo
ee9c3d8c69 fix the grid width thing (#169)
not sure why it was broke but this seems to fix it
2022-04-06 20:42:41 +04:30
robo
9ac66d08ef items per row setting (#165)
* items per row setting

self explanatory

* make it better for user
2022-04-02 05:04:10 +04:30
robo
841b945ca5 in library badge to manga in sources (#156)
* add the in library badge to manga in sources

* other layouts done
2022-03-11 19:24:45 +03:30
robo
33c9defdd9 List layout (#154)
* source layouts

* list layout

Co-authored-by: Aria Moradi <aria.moradi007@gmail.com>
2022-03-07 00:33:15 +03:30
robo
0a63d60880 add comfortable grid option (#152)
* move sorts to copy tachiyomi

is now in a tab along with filter ad display same as tachiyomi

* add comfortable grid

and all the stuff needed to make it easy to add more

* Revert "Merge remote-tracking branch 'upstream/master' into grid-types-(comfortable/list)"

This reverts commit 33eed92e8f7259ddce0e34ab59f721553bbb7e93, reversing
changes made to d699955345e253d2b2c2d837e76509a39b3bef00.
2022-03-06 20:15:25 +03:30
abhijeetChawla
03df6fbdf6 Resolved Merged Conflicts (#127) 2022-03-03 16:19:01 +03:30
abhijeetChawla
ac4aa7d1ca MangaCard imges don't stretch now (#110) 2021-12-03 13:09:02 +03:30
abhijeetChawla
42c5c3042d add filter and badge for downloadCount (#62)
* Added the Download filter and download badge

* Update src/components/library/LibraryMangaGrid.tsx

Co-authored-by: Sascha Hahne <ntbm@users.noreply.github.com>

* - corrected some spelling mistakes

Co-authored-by: Sascha Hahne <ntbm@users.noreply.github.com>
2021-11-07 13:59:48 +03:30
Aria Moradi
c15ee7ab66 refactor MangaCard 2021-10-31 21:02:45 +03:30
Aria Moradi
e89497df33 nicer gradient 2021-10-31 20:58:35 +03:30
abhijeetChawla
b755ad373f add aspect ratio to the manga card. (#56)
* added an aspect ratio to the manga card.

* added a comment and chaged the ratio to the recommeded
2021-10-31 20:55:57 +03:30
Aria Moradi
091d97c914 refactor 2021-10-30 16:10:34 +03:30