Commit Graph

2426 Commits

Author SHA1 Message Date
schroda
6f8d5bb9dc Remove unnecessary styling II
Missed in 157a549cc7
2025-03-25 00:04:12 +01:00
schroda
157a549cc7 Remove unnecessary styling 2025-03-24 23:46:57 +01:00
schroda
2120390e93 Align card list styling with rest of lists 2025-03-24 23:45:48 +01:00
Constantin Piber
541eeb0445 Reader preserve current page on window resize (#905)
* 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>
2025-03-24 23:45:06 +01:00
Constantin Piber
c9c1b8625a Reader preserve current page on reader mode change (#906)
* Reader: Re-scroll on reader mode change

* Simplify reading mode restore

https://github.com/Suwayomi/Suwayomi-WebUI/pull/906#discussion_r2009147119

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>

* Move effect as per suggestion

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>

---------

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
2025-03-24 23:24:36 +01:00
Constantin Piber
8079cadae5 Basic modal for switching extension settings (#907)
* 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>
2025-03-24 23:24:12 +01:00
Constantin Piber
1fd7624e98 Fixes places inreader where navbar width was not considered (#908)
* 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>
2025-03-24 23:23:50 +01:00
schroda
dc88b42191 Fix preloading of reader pages
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
2025-03-23 16:40:49 +01:00
schroda
ae29904ed2 Make "hideHistory" settings global 2025-03-23 04:04:09 +01:00
schroda
b673047517 Update to server gql library update changes 2025-03-23 04:04:08 +01:00
schroda
072c71c116 Handle graphql exception errors
Extract stack trace from error message and show it as an information that is collapsed by default
2025-03-22 20:37:43 +01:00
schroda
8fac3ce352 Handle white spaces in error messages 2025-03-22 03:21:09 +01:00
schroda
f570b7c9ed Optionally hide history 2025-03-22 01:16:38 +01:00
schroda
39a9b7e0ac Limit navbar titles to one line 2025-03-20 15:07:28 +01:00
schroda
1388b53567 Rename "Downloads queue" to "Download queue" 2025-03-20 15:07:01 +01:00
schroda
29656c5790 [skip ci] Fix github issue templates "labels" 2025-03-20 01:44:45 +01:00
schroda
3374ca3903 [skip ci] Update readme "feature" section 2025-03-20 01:03:47 +01:00
schroda
4363572e6f [skip ci] Update "bug report" template 2025-03-20 00:45:28 +01:00
schroda
771feca797 [skip ci] Fix "bug report" template 2025-03-20 00:39:01 +01:00
schroda
15788e01c6 Remove "issue moderator" workflow 2025-03-20 00:30:57 +01:00
schroda
97b37d3957 Update github issue templates 2025-03-20 00:30:53 +01:00
schroda
3ca4aa2eff Remove "Settings" from setting page titles 2025-03-17 12:07:02 +01:00
schroda
90c1d72d13 Sort "en.json" alphabetically 2025-03-17 12:07:00 +01:00
schroda
2fead95c15 Change downloads settings name back to "Downloads" 2025-03-17 12:06:58 +01:00
schroda
180b975063 Add missing error message to create/update category mutation 2025-03-16 23:25:06 +01:00
schroda
a2acddab5f Show tooltip for metadata on ChapterCards
Text that was too long got cut of, but it was never shown as the tooltip, which caused the information about the full text to get lost
2025-03-10 23:31:50 +01:00
schroda
efd9a45912 Properly resume chapter from "Updates" page 2025-03-10 23:24:29 +01:00
schroda
003e77ade2 Extract "retry chapter download" button into component 2025-03-10 23:24:26 +01:00
schroda
6f6994a433 Extract "add chapter download" button into component 2025-03-10 23:24:06 +01:00
schroda
35c2172355 Extract "chapter metadata" into component 2025-03-10 22:59:21 +01:00
schroda
ac4bdebb61 Extract "chapter thumbnail" into component 2025-03-10 22:20:46 +01:00
schroda
50493af71c Use correct error message for download retry failure 2025-03-10 22:01:30 +01:00
schroda
61eec0cd0e Add "last read timestamp" to history chapter card 2025-03-10 22:01:29 +01:00
schroda
c7611e4ae1 Remove unnecessary virtuoso "group item counts" mapping 2025-03-10 21:58:13 +01:00
schroda
e9b42db10f Add "groupByDate" to "Chapters" 2025-03-10 21:58:11 +01:00
schroda
86525ec2a2 Fix library category tabs after re-ordering categories 2025-03-10 21:57:36 +01:00
Jack
9e5fa7d81a Add history page (#897)
* 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>
2025-03-10 21:53:40 +01:00
schroda
c4ba483efe Add new languages to resources 2025-03-09 16:26:23 +01:00
schroda
cf348db5b8 Rename "Downloads" to "Download queue" 2025-03-09 16:26:22 +01:00
schroda
2ba0aea679 Move "category settings" to "LibrarySettings" 2025-03-09 16:26:21 +01:00
schroda
95ac4832bd Fix "main route" detection
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
2025-03-09 16:19:33 +01:00
schroda
df719df666 Show "Download" page only on desktop in nav bar 2025-03-09 16:19:32 +01:00
schroda
6afc9f22b6 Introduce "more" page
- moves "Settings" into "more" page
2025-03-09 16:19:31 +01:00
Hosted Weblate
f350aa8c41 Translations update from Hosted Weblate
Co-authored-by: David <david@parejarodriguez.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Infy's Tagalog Translations <ced.paltep10@gmail.com>
Co-authored-by: Kaleb <kalebcarvalho1@gmail.com>
Co-authored-by: plum7x <plumgift@hotmail.com>
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
Co-authored-by: 张锡铎 <Duoduo12138@outlook.com>
Co-authored-by: 清水汐音 <chenzhongjie19940725@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/es/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/fil/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/pt/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/ta/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/zh_Hant/
Translation: Suwayomi/Suwayomi-WebUI
2025-03-09 16:18:44 +01:00
schroda
f7b6006cc0 Delete chapters on migration again
Regression a29c113b5f
2025-03-06 21:09:07 +01:00
schroda
6ebf13d328 Properly log errors 2025-03-03 23:59:58 +01:00
schroda
1d9c3738fd [skip ci] Remove unnecessary prop source
Should have been removed with 52c8734c59
2025-02-25 18:00:08 +01:00
schroda
537ab5850d Fix TypeError
Forgot to remove prop in 52c8734c59
2025-02-25 17:59:28 +01:00
CrystailX
ae204b2a06 Support non-Latin characters in library search function (#885)
* support multilingual library search

* prevent multiple spaces
2025-02-25 17:56:00 +01:00
schroda
52c8734c59 Fix opening chapter via chapter selection in reader
Guard should have been removed with 4a9d2903b8
2025-02-23 13:21:32 +01:00