Currently, a lot of manga have the same whit/black-ish background color, which results of the thumbnails containing a lot of white/black colors.
These changes improve this a little
- reduce impact of white and black colors
- use "precision" mode of algorithm
* Reader: Reset bounds on window size change
19f2d993 introduced a `minWidth` to make sure sizes are consistent over
chapter changes (or when images load later), but when the window itself
changes, this makes the reader incorrectly sized
* Reader: Update size on navbar width change
This happens mostly when the bar is pinned; same effect as previous
commit
* Reader: Attempt to set the page on resize
It's not perfect, but not changing position at all seems impossible due
to how resizes are handled by the browser (since we adjust our content
to the window size)
* Simplify and abstract reader size reset
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* fix: Reader page full width was not properly calculated for static navbar
Only relevant for Fit Content, this did not properly consider the navbar
when the user clamps the content to a custom width
* Refactor: Put reader min sizes to reader itself instead of chapter
This allows some logic simplification.
The `ResizeObserver` can needs to be on an element without restrictions;
previously, the observer would not see the chapter elements get smaller,
since the `min-width` prevented it from shrinking. By applying to the
outer element, we still preserve the centering (since `margin: auto` is
also applied here), but allow the chapter itself to be smaller.
* Reader: Only scroll in continuous reading modes
* Reader: clean up size tracking
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Fixup previous commit stupidness
* Reader: move `minWidth`/`minHeight` back to chapter wrapper
* Apply suggestions from code review
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Also revert `fullWidth` calculation
* Simplify `chapterViewerSize`
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Move size logic entirely to hook
---------
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Basic modal for switching extension settings
* Improve network usage by including field in query directly
Requesting individually is stupid, when it's a field that is already
available on the server
* Improve extension slider usability
- Always render the element, fixes animations
- Store the selected item in state, allows the back-button to re-open
dialog
* Update src/modules/extension/components/ExtensionOptions.tsx
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Update src/modules/extension/components/ExtensionOptions.tsx
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Fix suggestions
* Use dialog instead of optionsPanel
* Extension options remove redundant NSFW info
* Apply suggestions from code review
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Use proper dialog title and content for settings dialog
* Use `string | undefined` instead of `string | null` to satisfy `tsc`
---------
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Fixes two places where navbar was not considered
When set to static, the navbar consumes space, so `vw` units are not
enough.
On small screens, the `left`+`transform` approach does not work nicely,
so just use standard flex alignment, the container is already a flexbox.
* Change card also consider wide viewports
* Update src/modules/reader/components/viewer/ReaderTransitionPage.tsx
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
* Reader: Apply new alignment code also to horizontal scroll mode
---------
Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
There were different issues with the direction the pages got preloaded.
- when resuming a chapter with an initial page > 1, it incorrectly preloaded leading pages instead of trailing ones.
- when going to the previous/next rendered chapter no pages got preloaded at all
* Add History module and integrate it into the app
Introduce the History module with components for displaying chapter updates, including UI for grouped updates by date. Update routing and constants to incorporate the new /history path.
* Replace "Updates" and "History" with unified "Recent" module
Merged the "Updates" and "History" screens into a single unified "Recent" module with corresponding navigation updates. Adjusted GraphQL types and localization files to reflect the changes. This simplifies navigation and improves user experience.
* Refactor History screen to remove unused components.
Removed unused states, layout effects, and props related to last update timestamp. Renamed variables for better clarity and updated labels and error messages to align with the history context. Simplified component structure for improved maintainability.
* ```
Refactor tab handling and integrate dynamic height adjustments.
Renamed enums for better clarity and consistency. Implemented a `tabsMenuHeight` prop to dynamically adjust component layouts based on observed height changes using `useResizeObserver`. Updated the `Updates` component to consider the calculated heights for improved rendering.
```
* Refactor `groupByDate` parameter and add `lastReadAt` field
Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.
* Refactor `groupByDate` parameter and add `lastReadAt` field
Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.
* Refactor `groupByDate` parameter and add `lastReadAt` field
Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.
* Refactor `groupByDate` parameter and add `lastReadAt` field
Renamed `updates` to `histories` in `groupByDate` for clarity and added a debugging log for input data. Updated GraphQL fragment to include the `lastReadAt` field to support additional functionality.
* "Optimize GraphQL type definition formatting in generated file
Condensed the formatting of the GetChaptersHistoryQuery type to a single line for improved readability and consistency. This change does not affect functionality but enhances maintainability of the generated code."
* Remove UpdateChecker component from History screen
The UpdateChecker component and its related navbar action have been removed from the History screen. This simplifies the navbar setup and eliminates unused functionality in this context.
* Refactor chapter fragment and type references
Updated `ChapterRecentListFieldsFragment` to `ChapterUpdateListFieldsFragment` for better alignment with naming conventions. Adjusted type imports and query structures to maintain consistency across files. No functional changes introduced.
* Refactor padding calculation logic in Updates screen.
Renamed state variable and refactored its logic for clarity and consistency. The updated logic now uses a more descriptive name, `listPadding`, to enhance code readability and maintainability.
* Pass `tabsMenuHeight` prop to History component
Added `tabsMenuHeight` prop to the `History` component to properly calculate the height for the `StyledGroupedVirtuoso` element. This ensures consistency with other components and improves layout rendering.
* Revert package.json
* Add last page read tracking to chapter history
Introduced "lastPageRead" and "pageCount" fields to track progress in chapter history. Updated UI to display the last page read along with total pages for chapters. Adjusted localization files to support the new "page" label.
* Remove last page read display from ChapterHistoryCard
The "last page read" information was removed from the ChapterHistoryCard component for a cleaner UI. This change simplifies the card's design by showing only the chapter name and relevant download state.
* Forcing an empty commit.
* Replace "Recent" screen with separate "Updates" and "History".
The "Recent" feature has been split into two distinct screens, "Updates" and "History", for improved clarity and functionality. Routes, icons, and components have been updated accordingly, and redundant code related to "Recent" has been removed.
* Clean
* Revert vi.json
* Remove unnecessary `useLocation` hook and update state logic.
The `useLocation` hook was removed as it was not used elsewhere in the component. The state property for the routing logic was updated to use `Chapters.getReaderOpenChapterLocationState` for better encapsulation and clarity.
* Update history localization by removing unused "page" key
Removed the "page" key from the "history" section in the localization file as it is no longer in use. This cleanup helps keep the translation file consistent and easier to maintain.
---------
Co-authored-by: NamNH <namitonguyen@gmail.com>
There was a possibility that routes were incorrectly detected as main routes which caused the back button to not get shown.
E.g. a route that is only visible on desktop was still considered a main route on mobile devices