Commit Graph

28 Commits

Author SHA1 Message Date
schroda
7556ea9b38 Reduce requested source data in queries 2024-07-09 00:21:49 +02:00
schroda
054585f488 Rename "EmptyView" 2024-04-29 15:29:33 +02:00
schroda
773d2b1026 Add missing error handling 2024-04-28 02:58:24 +02:00
schroda
473e85a8ed Feature/use second level mui imports (#743)
* Require "Theme" to be passed to "SxProps"

Decreases typescript performance otherwise

* Disallow "top" and "third-level" MUI imports

* Exclude "node_modules" in tsconfig
2024-04-14 15:50:12 +02:00
schroda
aab3e25031 Feature/improve restoring grid snapshots (#713)
* Update local storage functions

* Update local storage hooks

* Add session storage

* Improve storing virtuoso grid snapshot

* Use "useSyncExternalStore" for browser storage access

* Get rid of location replacements in "AppbarSearch"

Use session storage instead to prevent reloading the page all the time due to changing the location

* Get rid of location replacements in "SourceMangas"

Use session storage instead to prevent reloading the page all the time due to changing the location
2024-04-07 15:22:03 +02:00
schroda
e0c5e0521d Feature/manga migration (#536)
* Add "migration" tab to "Browse" screen

* Add missing useEffect cleanup for navbar title and actions

* Make "SourceGridLayout" reusable

* Add migration tab to "Browse"

* Add migration logic
2024-01-26 20:50:51 +01:00
schroda
fd1fa63064 Feature/show extension repo only in case more than one repo is set (#543)
* Rename "isSingleRepoSet" prop to "showSourceRepo"

* Show repo of source in case sources of different repos are installed

* Center the source icon
2024-01-09 22:09:31 +01:00
schroda
db65b9df44 Feature/merge source and extensions screen on desktop (#535)
* 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
2024-01-02 23:32:49 +01:00
schroda
4ab61723e7 Add missing tooltips (#444) 2023-11-05 17:22:29 +01:00
schroda
5a5b12a9e1 [ESLint] Prefer named exports (#427) 2023-10-28 00:32:02 +02:00
schroda
e1f338d013 Use gql for "sources" 2023-10-27 20:23:02 +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
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
4e8813b526 Feature/update dependency react router dom to v6.x (#340)
* Update dependency "react-router-dom" to v6.x

Update to v6.11.2

* Update dependency "react-router-dom" to v6.x - Replace "Switch" with "Routes"

* Update dependency "react-router-dom" to v6.x - Relative paths

* Update dependency "react-router-dom" to v6.x - Nested routes

* Update dependency "react-router-dom" to v6.x - Prevent route warnings

 - Route without an element causes a warning message.
 - Routes with non-matching Route causes a warning message.

* Update dependency "react-router-dom" to v6.x - Replace "useHistory" with "useNavigate"

* Update dependency "react-router-dom" to v6.x - Fix "Link" usage

* Update dependency "react-router-dom" to v6.x - Overwrite "useParams" and "useLocations" typing

For both functions it's the users fault if they are getting used incorrectly.
It's inconvenient to always have to make sure the params exist (useParam) or to cast the return object to a specific type (useLocation)

 - "useParams": Make generic type non-optional
 - "useLocation": Add generic type

* Update dependency "react-router-dom" to v6.x - Fix use-query-params provider
2023-06-04 21:30:15 +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
bd91510227 Remove eslint rule deactivations (#290) 2023-05-11 18:00:37 +02:00
schroda
0a56a2f6d4 Extensions cleanup (#257)
* [Cleanup] Add enums and types

* Extract "default languages" from ISOLanguages

The "default languages" will also be translated depending on which language the user selected
2023-04-21 00:27:42 +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
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
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
robo
042172a072 mass search (#157)
* mass search

currently cripples server for like 2 mins on use

* works

its slow, really slow
but it don't break the server anymore

* concurrency using p-queue

* remove package.lock + search auto select

* sorting like yomi

* fix yarn.lock
2022-03-12 08:16:55 +03:30
Aria Moradi
51008b7ee4 refactor 2021-10-30 16:14:25 +03:30