Commit Graph

131 Commits

Author SHA1 Message Date
schroda
e828e0f801 Fix appbar zindex
Appbar was clickable while a drawer was opened
2024-09-09 22:20:49 +02:00
schroda
1423ca23be Set appbar color on light theme 2024-09-09 22:20:46 +02:00
schroda
be471ba06b Update mui theme 2024-09-05 00:10:02 +02:00
schroda
378c97aa1b Update reader open settings button styling
Use dark/white color and transparency to make the button not standout as much
2024-09-04 22:39:19 +02:00
schroda
d1d37c8516 Update mui dependencies 2024-09-04 00:06:16 +02:00
schroda
c5f83cec53 Update reader nav bar styling 2024-09-01 00:19:28 +02:00
schroda
053db4a1e3 Update manga page styling 2024-08-31 23:41:39 +02:00
schroda
74d777a52b Calculate proper appbar width
The appbar width for the title and actions never considered the navbar width and thus, the actions were cut off on smaller screens
2024-08-30 00:31:59 +02:00
schroda
b80622cb17 Prevent grid items from jumping after closing reader
Due to the reader and the "default" nav bar updating the same navbar width in the context, the grid item width calculation resulted in different grid item widths, which caused the items to "jump" after closing the reader
2024-07-29 17:24:37 +02:00
schroda
c770505021 Fix height calculation of app layout components
The height of the app bar was lost after opening and closing the reader because ref was already created but its current value changed.
However, the ResizeObserver was still observing the old element.

Updated other hook usages, which might cause the same issue, as well
2024-07-17 22:53:12 +02:00
schroda
d6ea0bbdf2 Remove fixed width of ReaderNavBar 2024-07-13 15:43:16 +02:00
schroda
847a5c68b2 Reset app bar height to 0 on unmount 2024-07-13 15:35:34 +02:00
schroda
f43b7af3cd Refactor base app layout 2024-07-13 03:46:37 +02:00
schroda
31837392b5 Remove default props usage 2024-07-11 18:13:51 +02:00
schroda
3d21266f92 Reduce requested manga data in queries 2024-07-09 00:30:15 +02:00
schroda
2fa1de578c Reduce requested chapter data in queries 2024-07-09 00:21:46 +02:00
schroda
9b8ace003d Reduce requested category data in queries 2024-07-03 23:24:50 +02:00
schroda
03cfc9b80c Correctly detect multiple scanlators 2024-07-03 23:24:49 +02:00
schroda
36e943214c Remove "default back to" functionality
Caused an infinite loop, because in case the Reader was the initial opened page, got closed and the back button was pressed, the Reader just got opened again.

This happened because in case it was the initial opened page, closing the Reader did not use the browser back navigation and instead opened the Manga page, resulting in it to be pushed in the history stack with the Reader being the previous page
2024-06-14 15:17:05 +02:00
schroda
7337c18c7b Use global navigation history stack
The readers history stack was different to the one from the rest of the app, resulting in an infinite loop when using the closing the reader and using the back button in the manga page, since the back button just opened the reader again.

Regression introduced with 4bb458778e
2024-06-14 15:17:05 +02:00
schroda
403f657945 Enable ripple effect for nav buttons 2024-06-07 14:48:23 +02:00
schroda
cf996d67bb Add "isMobileWidth" util function 2024-05-23 02:37:40 +02:00
schroda
2b2686d323 Always include scanlator in case multiple scanlators exist
Makes more sense compared to the previous logic - to only show the scanlator in case "skip dupe chapters" setting was disabled and duplicated chapters existed - which was also not properly implemented, to be always able to tell if chapters of different scanlators might be viewed
2024-05-14 23:06:36 +02:00
schroda
ca747b383e Show chapter title in Reader chapter select 2024-05-13 03:40:45 +02:00
schroda
741489ad49 Adjust missed styling for rtl direction 2024-04-26 13:00:45 +02:00
schroda
1626771e92 Apply rtl styling for rtl languages 2024-04-25 19:27:59 +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
29860482a6 Feature/browse source manga long press remove add manga from library (#710)
* Extract CategorySelect usage into hook

* Extract logic to change manga in library state into hook

* Change manga in library state on long press when browsing source
2024-04-07 15:33:08 +02:00
schroda
ecd9b7478b Add range selection (#707) 2024-04-05 02:03:00 +02:00
schroda
21acbd5f48 Fix/tracking updating score (#682)
* Use SelectSetting for updating track score

* Create custom Select component
2024-03-29 18:57:52 +01:00
Chance Zibolski
0bf88d3fd1 Update reader width live when updating in reader view (#581)
Basically, instead of updating the width of the image after clicking
`ok`, the width is adjusted live, which makes it easier to figure out
the right value for the manga being viewed.

While implementing this, I realized we can't update the backend every
time we re-render when `liveUpdate` is true, so I've updated the logic
for persisting settings to support skipping the API call to save the
settings in the backend, and only perform the API it when the user
clicks ok on the number setting.

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
2024-03-18 18:35:35 +01:00
schroda
0c22a9012e Feature/cleanup metadata related logic (#657)
* Remove unnecessary parameter from "requestUpdateServerMetadata"

* Streamline updating metadata server settings

* Move metadata related logic
2024-03-16 16:21:15 +01:00
schroda
2047d76ad9 Update workflow actions (#649)
* Update workflow actions

* Fix tsc issues
2024-03-09 00:24:48 +01:00
schroda
4aec3c94ef Feature/support settings per device (#640)
* Optionally prevent deletion and mutation of "MutableListSetting" items

* Save server metadata per device

This makes it possible to e.g. have different settings on a desktop and a smartphone.
2024-03-06 23:07:48 +01:00
schroda
224df1300f Feature/improve back navigation button (#636)
* Improve detection of last page in history

* Use "useBackButton" in reader
2024-03-04 20:40:14 +01:00
schroda
8bdf035ca7 Feature/add option to remove manga from categories when removing from library (#633)
* Optionally remove manga categories when removing them from library

* Use "Mangas::removeFromLibrary"

* Handle uncatched promises
2024-03-02 15:28:58 +01:00
schroda
c5a5c4b8af Fix/add manga to library without dialog not adding default categories (#632)
* Add default categories when adding manga to library without dialog

* Add manga to library and update categories in one mutation
2024-03-02 15:26:15 +01:00
schroda
eb233aef3d Feature/improve add to library category selection dialog (#631)
* Create "Categories" util class

* Only show add to library category selection in case categories exist

* Add edit categories button in select categories dialog

* Add option to disable add to library dialog to the dialog
2024-03-02 15:23:12 +01:00
schroda
ceec260d14 Feature/reader setting add scale small pages (#615)
* Add option to stretch small pages

In case "fit page to window" is enabled, small pages can be scaled up to the available width and height, while maintaining the aspect ratio

* Cleanup "imageStyle" function
2024-02-21 02:42:07 +01:00
schroda
5a9618aefe Correctly update function refs when state changes (#611) 2024-02-18 15:20:30 +01:00
Chance Zibolski
4d75474b39 Fix reader width (#567)
* Fix reader width

The margin: auto on the Box container for the image was preventing 100% width
to actually mean 100%.

Now that 100% is actually possible, I think fitPageToWindow makes more
sense as a default. Additionally, since the image can fill 100% of the
page, it can cover the ReaderNavBar, so set the z-index of the
ReaderNavBar so it's rendered on top of the image and clickable.

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>

* Support configuring reader width for DoublePage readers

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>

* Fix single page of DoublePageReader not being able to take up full width

In case the parent container is flex row, the container does not automatically take up 100% of the available width, thus, the page also was not able to take up 100% of the width

* Fix applying reader width to double pages

The set reader width can't be applied to each page of the double pages because otherwise it will already take up 100% of the available width with the setting only being at 50%.

Instead, the set width has to be divided by 2, so that both pages take up the set reader width

* Prevent double page spinner from being larger than 100% of the available width

* Update width styling of the page spinner

* Always center pages in the middle of the screen

* Take up full height fitting page to window height

---------

Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
2024-01-26 20:51:08 +01:00
Chance Zibolski
5032a0ae94 Make reader width configurable (#565)
Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
2024-01-21 22:33:13 +01:00
schroda
b42c3103f1 Feature/rebrand to suwayomi (#500)
* Rename "Tachidesk-WebUI" to "Suwayomi-WebUI"

* Rename "Tachidesk-Server" to "Suwayomi-Server"

* Rename "Tachidesk" to "Suwayomi"

* Rename variables
2024-01-05 20:11:29 +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
e025efb9dc Feature/add manga to library category select dialog (#519)
* Move "SearchSettings" into "LibrarySettings"

* Change property "setOpen" to "onClose" for "CategorySelect"

* Optionally show category selection when adding manga to library

* Update "ignore filters" translation

* Move "ignore_filters" setting to "metadataServerSettings"
2023-12-27 18:08:16 +01:00
schroda
1345cfe624 Update manga category selection in case categories changed (#518)
After a manga got added to the library, the category selection dialog did not show the categories the manga got automatically added to.
The selection only got updated after the dialog got closed and opened again

Regression was introduced with 446deeae06
2023-12-27 17:20:28 +01:00
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
2caf88ce51 Remove incorrect "ListItemSecondaryAction" usage (#486) 2023-12-09 14:16:59 +01:00
schroda
47b077cbf5 Feature/update dependencies (#477)
* Remove accidentally committed script

* Update dependencies

* [ESLint] Fix issues

* Remove unnecessary "??" operator

* Update "vite" to v5.x

* Disable "no default export" rule in vite config
2023-11-25 18:13:51 +01:00
schroda
35c34b6d1b Feature/search bar improvements (#455)
* Require search to be committed with enter

* Extract back navigation logic into hook

* Navigate to previous page when canceling search

This makes the search the next page in the history stack instead of making it the previous one

* Close and open search depending on the location and available query

* Navigate to previous page in case new query is empty
2023-11-12 03:21:26 +01:00