* Require "Theme" to be passed to "SxProps"
Decreases typescript performance otherwise
* Disallow "top" and "third-level" MUI imports
* Exclude "node_modules" in tsconfig
* Prevent TypeError when deselecting items from a specific key
This was noticed when changing the categories of a manga to a category without any selected mangas, in this case, when trying to deselect a manga after changing the categories, a TypeError was thrown which resulted in a white screen
* Remove duplicates from the list of all selected ids
* Update state via setter
* Clear selection after disabling the library selection mode
* Remove console log
* Merge "source" and "extension" screen for desktop
* Move "tab" related components into new folder
* Reuse "tab" components for "browse" screen
* Prevent extension list from being taller than 100% of the parents height
- remove margin - virtuoso has issues calculating the height otherwise
- change group title styling, fontSize caused issues
* Align "source" list group header with "extension"
* Remove bottom padding from "ExtensionCard"
* Move "GroupedVirtuoso" related components into folder
* Use "GroupedVirtuoso" for "extensions"
There was an issue with the height calculation of the virtuoso list, which apparently was caused by the conditional rendering of the group title and item as list items.
Due to this, while scrolling down, the virtuoso list caused an overflow, which rendered the scrollbar, which in turn caused the list items to shrink in width.
The end result of this was, that the list items "jumped" slightly on the initial render of the items, due to the scrollbar appearing and disappearing
* 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"
* 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
* 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
* 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
* 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"
* 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.
* 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>
* 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
* 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
* 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
* [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
* [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