Commit Graph

968 Commits

Author SHA1 Message Date
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
Daniel
dca968fdb7 make default reader settings changeable (#217)
* [#214] Move "reader settings" util functions into new file

* [#214] Extract "options" of "ReaderSettings" to new component

* [#214] Add component for changing the default reader settings

* [#214] Add default "ReaderSettings" to "Settings"

* [#214] Use default "ReaderSettings" stored on the server

Wait for both "manga" and "defaultSettings" to be loaded.
Otherwise, by the time the "manga" response was received, the "defaultSettings" might be still loading and thus, the local fallback "default" settings will get used as the "default settings"

* [#214] Save and update "ReaderSettings" options in case they are missing

- Manga gets read the first time => save settings in metadata
- Default settings get opened the first time => save settings in global metadata
2023-01-06 20:04:16 +03:30
Daniel
46ac5d5531 Save reader settings per manga in Meta (#216)
* [#213] Add missing "meta" property

- IManga
- IMangaCard (optional)
- IChapter
- ICategory

* [#213] Add util functions for handling metadata

- global server
- manga
- chapter
- category

* [#213] Use "ReaderSettings" from the manga metadata

- get ReaderSettings from manga metadata
- remove unnecessary check "make sure settings has all the keys"
    in case the stored settings in the metadata are outdated they will be filled with default values

* [#213] Reload manga only in case "mangaId" changed

In case the chapter is still from the same manga, a reload is unnecessary

* [#213] Only update the changed reader setting

Otherwise the app has to send patch requests to the server for every setting even if it didn't change

* [#213] Hide "openButton" on first render in case "navBar" is shown

The "openButton" was always set to be visible event in case the navBar was shown on the first render

* [#213] Open the "ReaderNavBar" if needed after receiving new settings

Otherwise, the drawer won't open in case the "navBar" was hidden on the first render since the default state in that case was set to false

* [#213] Update "ReaderSettings" after receiving the manga response

Otherwise, the default settings aren't getting removed

* [#213] Hide/Show "OpenButton" when opening/closing the drawer

Otherwise, the button stays hidden until it gets updated due to scrolling

* [#213] Keep "ReaderNavBar" state when opening prev/next chapter

In case the navBar wasn't sticky but opened, it got closed when the prev/next chapter got opened

* [#213] Prevent "ReaderNavBar" from closing when changing "staticNav" setting
2023-01-06 19:45:29 +03:30
Daniel
34bafee3aa fix library update progress rendering (#210)
* Fix library update progress rendering

The websocket sends a list with mangas for each category (completed, running, pending) instead of a number.
This resulted in the progress to always be 0

* Prevent TypeError

The "UpdateStatus" can have a "statusMap" that contains not data.

Co-authored-by: schroda <github@dasch.simplelogin.com>
2023-01-01 20:28:23 +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
7312e92d07 Fix "back" pagination on double page layout in reader for spread pages (#203)
* Update logic for determining if page should be single or double in double layout to cover issue #181

* Simplify code, add special handling for last page
2022-11-26 19:30:33 +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
bfca70a44c Add safezone to scroll end detection to prevent edge cases when scrolling to the end would not detect end (#201) 2022-11-26 16:20:53 +03:30
Valter Martinek
12cfc81aa8 Hide overflowing text in reader title if text can't be wrapped (#199) 2022-11-24 23:35:18 +03:30
Valter Martinek
7aa4d2f3de Verticall scroll navigation and fix (#200)
* Remove scroll tracking from Page component

* Replace initial scrolling trigger with initialPage prop to be more clear on when to scroll to inital page

* Add current page tracking back to HorizontalPager

* Memoize prevChapter and nextChapter functions

* Rewrite navigation in vertical pager to scroll by screen percentage instead of whole pages, refactor code

* Handle last pages explicitly to fix issue with small last pages
2022-11-24 23:35:05 +03:30
Valter Martinek
31a3679e06 Scroll window to top when PagedPager changes page (#198) 2022-11-24 23:34:39 +03:30
Valter Martinek
62816338f3 Refactor and fix sorting in library (#197) 2022-11-24 23:34:30 +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
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
Valter Martinek
68f67273aa Feature/batch chapter actions (#194)
* Add batch delete chapters

* Add remaining batch actions
2022-11-21 04:03:21 +03:30
Valter Martinek
1510c5a093 Memoize empty view face so it does not change on rerender (#193) 2022-11-10 21:31:29 +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
Aria Moradi
e828582fd4 update browserlist 2022-11-07 20:23:43 +03:30
Valter Martinek
dcc1634b6f Update typescript dependency (#190) 2022-11-06 23:43:09 +03:30
Valter Martinek
a64aad126a Check download queue for changes and reload chapters if any chapter download changes state. (#189) 2022-11-06 23:19:44 +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
robo
14a9ffa558 fix mangadex filters (#177) 2022-06-25 00:36:12 +04:30
Marc-Olivier Leblanc
bc65e3f053 fix download queue delete button (#176)
Co-authored-by: Marc-Olivier Leblanc <leblanc.marc-olivier.4@courrier.uqam.ca>
2022-06-16 17:59:43 +04: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
robo
a0796d2a05 fix default width (#171)
will look broken for everyone till they change that setting from 6 to like 200-300
2022-04-10 11:00:07 +04:30
amr
13e6456190 unified library options (#168)
* Unified the way options are being handled. now everything uses the LibraryOptionsContext, removed the no-longer used useLibraryOptions hook

* removed query from library options. since it doesn't make sense for this to be cached

* fixed a bug in the useLocalStorage implementation
2022-04-07 15:23:14 +04: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
6215ad4663 fix search source click (#164) 2022-03-20 19:21:36 +03:30
robo
eeaee05ae7 18+ tag on source/extension cards (#160)
* 18+ to source card

* 18+ extensions card
2022-03-13 11:36:18 +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
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
70b84b810f source layouts (#153) 2022-03-07 00:32:06 +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
robo
08a53053b2 move sorts to copy tachiyomi (#151)
is now in a tab along with filter ad display same as tachiyomi
2022-03-06 02:38:32 +03:30
robo
a50824c129 fix manga badges setting menu that turns the update/download badges on and off (#150) 2022-03-05 09:14:59 +03:30
robo
68351aa12f Source filter scroll fix (array of filters on submit) (#149)
* scrolling filters issue fix

scrolling after changing filters and not submitting works properly now

* fixed it

wasn't something i introduced just then, just forgot to fix

* source filters array on submit
2022-03-05 01:18:33 +03:30
robo
bdd03f6698 Update LibraryOptions.tsx (#146) 2022-03-04 14:41:46 +03:30
robo
9c512b2a95 Source genre sorts design (#147)
design thing to copy tachiyomi 1 to 1
(only a slight functional change nothing screenshot-able)
(clicking a new sort always sets to ascending)
2022-03-04 14:41:17 +03:30
robo
964186ce42 Source filters, move search to SourceMangas (#142)
* source genre filter

much the same as the library version

* undo

* base

base + SelectFilter + CheckBoxFilter
haven't done useQueryParam yet

* gui done

left to do:
1.saving the input data (so it don't disappear when closing the drawer)
2.post to update
3.reload list after drawer close

* done ish

* done im tired

* ok, actually done now

worked out the breaking that was happening in the last commit

im probably using useState for more than is nessessary, only really needed to do triggerUpdate and Data

* key error/warning fix

* issues all done

* remove junk

* jank back button fix

i re-used the query querystring

* reove single search

* boi was that a pain to fix

* Update App.tsx
2022-03-04 04:55:10 +03:30
robo
06aa40630f more Download Queue info (#138)
* Download Queue info

add Imanga type definition to IDownloadChapter

add source name to queue
add manga name to queue

* more like tachi

* add back state and % data

* yup forgot to remove after
2022-03-04 00:35:14 +03:30
abhijeetChawla
03df6fbdf6 Resolved Merged Conflicts (#127) 2022-03-03 16:19:01 +03:30
abhijeetChawla
052c9c3ba6 add NavBarContextProvider (#128) 2022-03-03 13:09:18 +03:30
Silenc3IsGold3n
7d890ea093 Close button fix (#141)
* Close button now points to library instead of back

* Redirect back to specific manga page always

Co-authored-by: a <a@a.a>
2022-03-02 13:34:00 +03:30
robo
d4221044cc sorting (#136)
* sorting

add menu
add sort by left to Read
add sort alphabetical
add sort by ID
add Asc/Desc

* woops

* woops

* Camel case
2022-02-24 09:46:21 +03:30
robo
55a3f8ed23 fix scrolling 8px (#135)
ChapterCount Header has a top margin of 8px that wasn't accounted for
2022-02-23 22:21:46 +03:30
Aria Moradi
20b0e66093 make all links work by catching 404 2022-02-21 08:29:47 +03:30
Aria Moradi
daab8ab7a5 move text 2022-02-21 01:44:11 +03:30