Commit Graph

2342 Commits

Author SHA1 Message Date
schroda
eb7397e639 Fix reader image preload for resume "end" mode
In this case the preload direction was incorrect and tried to preload trailing images instead of leading ones
2025-02-10 22:40:52 +01:00
schroda
6b48844c19 Fix current page index for leading/trailing chapter 2025-02-10 22:40:50 +01:00
schroda
174d850093 Preload previous/next chapter in reader 2025-02-10 22:40:49 +01:00
schroda
16c1edaa52 Add release changelog creation script 2025-02-10 00:14:06 +01:00
schroda
61bbadc72a Extract commit changelog creation logic 2025-02-10 00:14:03 +01:00
schroda
7a08a0035f Extract translation changelog creation logic 2025-02-10 00:13:17 +01:00
schroda
a6dbcd0540 Rename "createReleaseChangelog" to "createCommitChangelog" 2025-02-09 23:22:37 +01:00
schroda
d8a682537a Fix "createReleaseChangelog" script 2025-02-09 23:19:51 +01:00
schroda
ece1f4c465 Create "release" github action 2025-02-09 23:09:00 +01:00
schroda
0b752c168c Internationalize system theme mode 2025-02-09 23:06:44 +01:00
schroda
a7df8eb0f4 Show image loading placeholder only when visible
The MUI spinner impacts the cpu usage.
While only a few of them don't matter, rendering multiple of them can impact the cpu usage.

This can be a problem in the reader in case a chapter with a lot of chapters is rendered and a continuous reading mode is being used.
In such a case the cpu usage stays increased until all pages have been loaded
2025-02-08 20:12:41 +01:00
schroda
a4e9e8f264 Introduce "useIntersectionObserver" hook 2025-02-08 19:45:41 +01:00
schroda
050094c991 Update styling of "manga open source" button 2025-02-08 16:16:32 +01:00
schroda
f633059083 Rename "CustomIconButton" to "CustomButton" 2025-02-08 16:03:37 +01:00
schroda
cae52fd782 Add "blend mode" to "custom color filter" 2025-02-08 01:49:37 +01:00
schroda
9d3aeafe0e Use "BasePager" for infinite scroll chapter change detection
There can be cases where when scrolling backward/forward the first/last page never gets visible in the viewport due to a large width/height of another page.
In that case the intersection observer would never trigger and thus, the chapter wouldn't get changed.

By using the Pager, which always takes up the full width/height, this problem will not be possible, since the start/end of the Pager always enters or leaves the viewport.
2025-02-05 22:25:35 +01:00
schroda
b12e28346c Improve reader infinite scroll chapter change detection
A 10% intersection threshold does not work for pages that are so long that 10% of the page will never be in the viewport
2025-02-05 21:23:20 +01:00
schroda
187693ce5a Properly handle not skipping duplicate chapters
The filtered chapter list of the reader state always incorrectly filtered out duplicated chapters even while the setting was disabled
2025-02-05 20:05:36 +01:00
schroda
a32c88a549 Reset "ReaderChapterViewer" min width/height on "ReadingMode" change 2025-02-05 15:48:55 +01:00
schroda
5e8b5545a6 Add comments to functions 2025-02-05 15:26:40 +01:00
schroda
34ebcc4f4c Improve naming of functions and variables 2025-02-05 15:17:48 +01:00
schroda
155f58b92d Consider only relevant element intersection for open prev/next chapter
In the "vertical mode" intersection changes for the left or right side of the element do not matter.
Same for "horizontal mode" the other way around.

If not handled accordingly, it would cause unwanted chapter changes.
2025-02-05 15:17:46 +01:00
schroda
9b58a94f98 Fix image preload amount for current chapter
For the current chapter the "pages to render" always include the current page
2025-02-05 01:27:42 +01:00
schroda
19f2d99345 Center "ReaderChapterViewers"
The viewers can have different sizes which caused theme to not be properly centered.

E.g. for the "vertical mode" in case "chapter 1" is greater in width than "chapter 2", the pages of "chapter 2" were not correctly centered due to the "viewers" having different widths.
2025-02-05 00:34:44 +01:00
schroda
636f48107f Prevent "ReaderChapterViewer" from overlapping each other
Seems like not all browsers handle

width/height: 100%
min-width/min-height: fit-content

correctly.
the "min" setting just never applies and the size is stuck at 100%.
2025-02-04 23:11:34 +01:00
schroda
36cb545156 Properly detect scrollbar for mouse drag scrolling 2025-02-04 22:35:01 +01:00
schroda
2ec42d962a Remove context usage from ReaderPage
In case many chapters are rendered, even just the HOC wrapper component re-render due to the context change increases the render time.

Thus, getting rid of these HOC wrapper re-renders by moving the context usage up to the ReaderViewer decreases the render time.
2025-02-03 17:17:35 +01:00
schroda
b01b23b069 Remove context usage from ReaderChapterViewer
In case many chapters are rendered, even just the HOC wrapper component re-render due to the context change increases the render time.

Thus, getting rid of these HOC wrapper re-renders by moving the context usage up to the ReaderViewer decreases the render time.
2025-02-03 17:17:35 +01:00
schroda
4a9d2903b8 Add infinite scroll to reader 2025-02-03 17:17:35 +01:00
schroda
4789a74785 Add option to open specific chapter via "useOpenChapter" 2025-02-03 17:17:35 +01:00
schroda
45b4874348 Remove unnecessary keys 2025-02-03 17:17:35 +01:00
schroda
c79ccf3523 Improve memoization of "ReaderTransitionPage"
- use chapter properties instead of chapter object
- only pass "handleBack" in case the transition page is for the first or last chapter
2025-02-03 17:17:35 +01:00
schroda
d73bb31df9 Pass non "source props" to "prop source creators" in "withPropsFrom" HOC 2025-02-03 17:17:35 +01:00
schroda
91e8b70d35 Rename "initialChapter" to "chapterForDuplicatesHandling" 2025-02-03 17:17:35 +01:00
schroda
a80e8885fb Introduce "getReaderOpenChapterLocationState" function 2025-02-03 17:17:35 +01:00
schroda
a6f015d5e3 Add comment 2025-02-03 16:30:10 +01:00
schroda
6d47ab05c1 Improve mouse drag detection
Ignore mouse movements in directions where the element does not have a content overflow and thus, scrolling is not possible
2025-02-03 16:30:08 +01:00
schroda
441cdaa6e7 Handle line breaks in tracker search entry summaries 2025-02-03 16:30:07 +01:00
schroda
8ddb259c82 Prevent tooltip on disabled button warning 2025-02-02 00:54:03 +01:00
schroda
dc9f6fc863 Fix "Uncaught ResizeObserver loop completed with undelivered notifications" error
Was caused due to creating a temporary div inside a resize observer callback.
By moving the temp div outside the viewport, it does not the trigger resize observer again
2025-01-31 01:54:39 +01:00
schroda
2c4a17b32f Ensure to always have one page in reader
Current logic requires at least one page.
In case a chapter did not have any page a TypeError occured
2025-01-30 00:19:05 +01:00
schroda
3698c19aba Properly enable cors for images by default 2025-01-26 17:18:27 +01:00
schroda
a81c3c6afa Use dynamic color schemes on manga page 2025-01-26 04:21:00 +01:00
schroda
25e3fc7808 Load images with cors allowed
Without allowing cors it is e.g. not possible to extract colors from an image
2025-01-26 04:20:59 +01:00
schroda
2579ba92a3 Use "img" element instead of css "background image"
CSS does not support loading image with cors allowed
2025-01-26 03:49:51 +01:00
schroda
a56fd08bf6 Include http status on rest fetch failure 2025-01-26 03:30:35 +01:00
schroda
2a4afd642d Set proper color for active chapter card in reader 2025-01-26 03:29:08 +01:00
schroda
5d52fc4455 Inherit color for missed icon buttons 2025-01-26 03:26:24 +01:00
schroda
b7fc1ae6ff Extract theme context logic into its own provider 2025-01-25 19:22:24 +01:00
schroda
ce6722d584 Male library "grid layout" setting global 2025-01-25 00:12:56 +01:00