Commit Graph

35 Commits

Author SHA1 Message Date
schroda
ca18e750bf Use gql for "categories" 2023-10-27 20:23:03 +02:00
schroda
bffc1669e2 Move "RequestManager" in sub folder 2023-10-27 20:23:00 +02:00
schroda
5279339b86 Feature/update i18next to v23.x (#391)
* 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
2023-07-04 21:53:25 +02:00
schroda
4dcf6a3ad9 Make library tabs menu position fixed (#369) 2023-06-17 16:55:24 +02:00
schroda
938b5166d9 Fix Library tab change animation (#372) 2023-06-17 15:45:52 +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
1ec6d77598 Fix/library title size info initial render flickering (#350)
* Rename variable

* Hide size tag until tabs data was loaded

The wrong loading state (mangas) was being used to check if the size tag can be shown.
2023-06-05 01:24:56 +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
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
8dae72604f Update to SWR version 2.x (#296)
* Update SWR to version 2.1.5

* Improve generic type names

* Use "isLoading" property of "useSWR" response

* Correctly load library without selected tab

With the latest SWR version the library was empty on the first load.
Not sure what exactly is the reason, but due to "isPaused" the request wasn't sent even after "activeTab" wasn't undefined anymore.
Instead of using "isPaused", passing "null" as the key will also prevent SWR from doing the request.
2023-05-15 11:56:55 +02:00
schroda
79b2305e54 Feature/library show number of mangas in category (#269)
* Pass optional browser tab only title

Makes it possible to have a different title for the "NavBar" and the browser tab

* Show number of items in category and library

---------

Co-authored-by: schroda <github@dasch.simplelogin.com>
2023-04-22 11:39:59 +02:00
schroda
b1dc13cd30 Update browser and nav bar title on language change (#275) 2023-03-29 00:44:03 +03:30
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
Aria Moradi
688358f673 add translation keys 2023-02-14 16:47:38 +03:30
Aria Moradi
76d44bd657 clean up translations 2023-02-14 16:28:37 +03:30
Aria Moradi
1c7c3e566c add i18n (#239) 2023-02-13 20:21:44 +03:30
akabhirav
aaedbb7be9 add pagination to library and fix some prettier issues (#237)
Co-authored-by: akxer <>
2023-02-12 18:43:41 +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
2eeea41a45 force absolute import path (#223)
* Add "no-relative-import-paths" eslint plugin

* Add "no-relative-import-paths" eslint plugin - Fix imports
2023-02-05 18:45:20 +03:30
Daniel
7642b5808c [#211] Refresh Library after a update (#212)
Library had to be refreshed manually to see the latest manga updates.
2023-01-06 20:05:26 +03:30
Valter Martinek
154b357c40 Options panels refactoring (#196)
* Refactor library options to match chapter options using shared component

* Disable some eslint rules

* Cleanup SourceOptions layout to use same components as other panels
2022-11-24 12:11:03 +03:30
Valter Martinek
4a4e8b2cde Feature/batch chapter download (#191)
* Add NavbarToolbar component for rendering items in toolbar through portal

* Refactor Manga screen, move chapters filtering to toolbar menu, cleanup ChapterOptions

* Fix warning

* Update layout of ChapterList and add selection for chapters, add batch download, move stuff around

* Add space to bookmark icon

* Clear actions when leaving source mangas page

* Move bookmark icon back inline and align it correctly with text

* Fixup MangaDetails buttons to update cache properly so buttons in manga menu are updated

* Move chapters filter to ChapterList

* Fixup error display overlapping with loaded content when revalidation fails

* Fixup spacing around ChapterList title

* Only show small progress if manga is loaded so there is not to many spinners

* Prevent title wrapping

* Add icon buttons to desktop sizes of manga toolbar menu
2022-11-09 20:39:15 +03:30
Valter Martinek
14265164a4 Feature/swr for simple queries (#187)
* Refactor simple queries with useSWR hook

* Fix plus button in Extensions screen

* Add type to categories query

* Add useQuery abstraction which adds loading attribute

* Reload categories even if reorder fails
2022-11-03 00:18:22 +03:30
Valter Martinek
6f8755fa05 Feature/swr for library screens (#186)
* Wrap data fetching in library and manga screen with swr for better dev and user experience. Refactor some API calls and data handling. Add manual refresh to manga detail.

* Fix manga card layout

* Fix refresh button position on small screens

* Revert "Fix manga card layout"

This reverts commit d85da3d8385e1ef64feed1789e4cd4591c8bd563.

* Fix manga not setting title

* Move chapters loading to Manga component, join data fetching, add auto online fetch if fetched data is old

* Revert some changes
2022-11-02 13:12:02 +03:30
amr
365f28fee5 added an update checker button for library (#172)
* added an update checker button for library

* fixed import path

* fixed progress props to not be inline

* added error handling

* fixed linting issue
2022-04-18 12:56:36 +04:30
Aria Moradi
7eedce62cd handle search shortcuts (#116)
* code cleanup

* fix some issues

* handle search keyboard shortcuts
2021-12-19 18:06:27 +03:30
Aria Moradi
03d09b2e92 cleanup library (#107)
* refactor library

* handle invalid tab numbers
2021-11-19 16:36:02 +03:30
abhijeetChawla
0a89d227db Save tabs number in Url to persist tab when go to other paths (#78)
* added an optional  url parameter to the library path to get to a particular tab

* Added Error checking when taking the parameter from the Url

* Now Tabs persist with library options

* FIxed a bug which made the backbutton appear in the Library route when tabs number was presents in the url
2021-11-17 14:10:04 +03:30
Sascha Hahne
9e65870fae add Search to Library (#55)
* Implement bare bones library search

* Add nice interactions
2021-10-31 15:15:34 +03:30
Aria Moradi
78f70a38be refactor 2021-10-30 16:16:36 +03:30
Aria Moradi
51008b7ee4 refactor 2021-10-30 16:14:25 +03:30