Commit Graph

19 Commits

Author SHA1 Message Date
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
ed74f7c851 Make remaining image requests abortable (#645) 2024-03-08 00:24:01 +01:00
schroda
79d35404d3 Fix/double page mode not aborting preload image requests (#628)
* Use request manager to preload images in DoublePagedPager

Was forgotten to update along with f852ce70e7

The requests for the preload also never got aborted

* Revoke object urls after load
2024-03-01 18:27:46 +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
d244ba6538 Fit double page reader pages correctly to windows width (#595)
The max-width, which is for a single page, was applied to each page of the double page reader, which resulted in both of them being able to take up 100% of the available width
2024-02-13 01:53:18 +01:00
schroda
4ffd3584c6 Handle RTL reading direction for double page reader (#594)
Changing the reading direction for the double page reader did nothing.
It just always was LTR.

Regression introduced with 4d75474b39
2024-02-13 01:53:10 +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
Robert Perez
9962e0713d Adding page loading with Double Page Mode. (#480)
* page loading works and looks good now to make double page work with it

* Update double page spinner styling

* Render pages everytime the component gets rendered

- remove refs because they do not trigger a rerender
- remove initial render interval
- remove page rendering via portal

During the initial render nothing got rendered (pages or placeholder) because for that to happen, the images had to be loaded.
Thus, the loading placeholder never got shown.

* Enable skipping forward while pages are loading

---------

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
2024-01-15 00:29:51 +01:00
schroda
5a5b12a9e1 [ESLint] Prefer named exports (#427) 2023-10-28 00:32:02 +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
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
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
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
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
Aria Moradi
864e1e4fb0 migrate DoublePage to Mui 5 (#88) 2021-12-04 10:24:16 +03:30
Aria Moradi
04a1898ea7 Revert "migrate some components to Mui5 new styling system (#72)"
This reverts commit 72ef61e286.
2021-11-15 17:21:31 +03:30
abhijeetChawla
72ef61e286 migrate some components to Mui5 new styling system (#72)
* - Changed the value in Manga from 960 to 900( md breakpooint)
- The CicularLoader in About  and Reader screens is now centered to the whole screen
- Changed relative imports in About screen to absolute imports
- removed changed styles from Browse Screen, PageNumber

* Migrated Source Card, Extension Card and LoadingPlaceHolder to MUI system

* Migrated CategorySelect and LandSelect to using the sx prop

* migrated ReaderNavbar to mui 5

* - Removed Unused Styles from Page
- Migrated DoublePage, doublePagedPager, PagedPager, Vertical Pager and Horizontal Pager.

* Replaced style prop with sx prop

* removed useStyles completely from the project except for the Manga Screen

* added a comment

* Fixed the Source Card Buttons padding

* Removed the trailing backspace

Co-authored-by: Sascha Hahne <ntbm@users.noreply.github.com>

Co-authored-by: Sascha Hahne <ntbm@users.noreply.github.com>
2021-11-14 13:51:08 +03:30
Aria Moradi
091d97c914 refactor 2021-10-30 16:10:34 +03:30