Commit Graph
142 Commits
Author SHA1 Message Date
troyeguo 19403b96f0 feat: implement isReadingRawPDF utility and refactor related components for improved PDF handling 2026-09-23 10:31:31 +08:00
troyeguo 03de0fe0b6 Refactor Reader component to simplify PDF format check and annotation toggle logic 2026-09-06 10:49:05 +08:00
troyeguo 3517be0639 fix: update component import and refactor conditional rendering logic in Reader 2026-09-06 10:38:34 +08:00
troyeguo f621e36aae fix: adjust right panel visibility logic and update hover styles for better user experience 2026-08-23 20:25:52 +08:00
troyeguo 7042bcce2f Refactor TextToSpeech and Reader components for improved readability
- Cleaned up conditional statements in TextToSpeech and Reader components for better readability.
- Added console log for debugging purposes in TextToSpeech.
- Adjusted styling properties in Reader component for consistency.
- Enhanced toast message formatting in TextToSpeech for clarity.
2026-08-19 10:30:57 +08:00
troyeguo bfbd40df13 Merge branch 'dev' into feature-next-stable 2026-08-05 17:10:06 +08:00
troyeguo 97a6a0fe28 Refactor mouse event handling by removing unused edge proximity logic and related event listeners 2026-08-01 15:25:41 +08:00
troyeguo 877c08a6f6 Add auto-show feature for quick buttons in Reader component 2026-08-01 08:41:54 +08:00
troyeguo 6a9ce2d412 Adjust edge proximity detection threshold and correct mouse Y-coordinate calculation 2026-08-01 08:32:28 +08:00
troyeguo 673aa05fc4 refactor: replace window.require with window.electronAPI for improved module access
- Updated file handling in coverUtil, dictUtil, export, fontUtil, restore, sqlUtil, and other utility files to use window.electronAPI for accessing Electron modules.
- Refactored IPC calls to utilize the new context bridge for better security and maintainability.
- Introduced a preload script to expose necessary APIs to the renderer process, enhancing the overall architecture.
- Ensured compatibility with Electron's security model by removing direct access to Node.js modules from the renderer.
2026-07-30 14:00:29 +08:00
troyeguo 5ea74a45a8 feat(popupBox): add renderBookFunc to props and update syncDockedToRedux logic 2026-07-22 15:31:55 +08:00
troyeguo eac4c67e32 feat: add isDockedRight state management and update related components 2026-07-22 10:19:47 +08:00
troyeguo ebbc424797 feat(popupBox): enhance docking functionality and adjust snap thresholds 2026-07-22 08:54:25 +08:00
troyeguo 8defed23e9 Reduce opacity of reader setting icon for improved visibility
Refactor unzipOldConfig and unzipOldBook functions to use async/await for better readability and performance
2026-07-16 14:07:37 +08:00
troyeguo 68b3cd5882 Increase opacity of reader setting icon for better visibility 2026-07-16 10:48:57 +08:00
troyeguo 6507bb902b Remove "Hide menu button" option from settings and localization files
- Deleted the "Hide menu button" setting from the reader settings component and its related actions, reducers, and state management.
- Removed corresponding translations for "Hide menu button" from various localization files (e.g., ar.json, bg.json, bn.json, etc.).
2026-07-14 10:37:23 +08:00
troyeguo a4b6edbec1 refactor: update CSS styles for improved visibility and consistency in Reader component 2026-07-14 10:26:23 +08:00
troyeguo f51790c9d3 Remove unused settings and localization entries for navigation, AI, audiobook, scale, and PDF conversion buttons 2026-07-13 19:12:32 +08:00
troyeguo a79ce176fe feat: implement throttling for mousemove events to improve performance 2026-07-13 18:13:47 +08:00
troyeguo 170e8067ef feat: add mouse position event handling for edge proximity detection 2026-07-13 15:57:39 +08:00
troyeguo 2405b0b25e Enhance background color handling for specific books
- Updated the Viewer component to set the current book key and handle background color when a book is identified as a separate style book.
- Ensured that the current book key is cleared when the book does not match the specified criteria.
- Made similar adjustments in the Reader component to maintain consistency in background color handling.
2026-07-13 15:08:58 +08:00
troyeguo c1417ee26e refactor: reorder fetch calls and background color handling in Reader component 2026-07-12 09:51:53 +08:00
troyeguo f21a35ffca feat: implement background color handling for separate style books in Reader component 2026-07-12 09:42:09 +08:00
troyeguo 9b490e2d60 Enhance annotation button visibility for scanned PDF books
Updated the condition for displaying the annotation button to ensure it only appears for PDF books that are scanned and not included in the conversion list. This change improves the user experience by preventing unnecessary annotation options for unsupported formats.
2026-07-11 14:51:12 +08:00
troyeguo c9552a4286 Refactor annotation dialog and viewer components
- Moved BRUSH_COLORS and BRUSH_WIDTHS constants to common utility file for better reusability.
- Updated annotationDialog component to import brush settings from the new common file.
- Added console log for annotation data in pageWidget component for debugging purposes.
- Modified viewer component to initialize brush color and width from reader configuration.
- Adjusted the isDrawing property in the reader component to toggle based on annotation dialog state.
2026-07-11 14:39:53 +08:00
troyeguo 0b49dbfccb feat(annotationDialog): enhance annotation functionality and UI adjustments
- Updated AnnotationDialog to apply brush color and width changes immediately to the HTML book's rendition.
- Added htmlBook prop to AnnotationDialog for accessing the rendition methods.
- Adjusted dialog width from 300px to 200px for better UI consistency.
- Improved rendering of brush styles by ensuring correct border radius calculation.
- Enhanced Reader component to trigger drawing mode when the annotation dialog is opened.
- Minor style adjustments for better visual feedback on annotation and speech states.
2026-07-11 14:28:54 +08:00
troyeguo 36b8bf4fbc feat: add annotation feature with customizable brush color and width
- Added new translation keys for "Annotation", "Brush color", and "Brush width" in English and Chinese locale files.
- Implemented AnnotationDialog component for users to select brush color and width for annotations.
- Integrated AnnotationDialog into the Reader component, allowing users to toggle its visibility.
- Updated Redux store to manage the state of the annotation dialog and its visibility.
- Created styles for the annotation dialog to enhance user experience.
2026-07-11 14:16:14 +08:00
troyeguo 1304937021 feat: implement dynamic OCR engine selection based on book description 2026-07-09 16:58:53 +08:00
troyeguoandCursor 964ab6cc41 Add toggle shortcuts for reading panels on all sides.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 20:07:39 +08:00
troyeguo 7207f9d11b fix bug 2026-06-22 20:42:06 +08:00
troyeguo 2e18a390cd pdf crop 2026-06-22 18:51:22 +08:00
troyeguo c472c345ae fix bug 2026-06-21 20:55:40 +08:00
troyeguo 3d6e180cbb fix bug 2026-06-21 20:31:08 +08:00
troyeguo 921d934ce2 feat: update opacity for chapter navigation containers for better visibility 2026-06-21 15:21:08 +08:00
troyeguo 9898973ff3 feat: refactor edge panel hover handling with dedicated methods for enter and leave events 2026-06-20 10:17:21 +08:00
troyeguo 6413b022b3 Increase time intervals for updating current time and duration in PageWidget and Reader components 2026-06-20 09:12:54 +08:00
troyeguo 3b1ca57add feat(reader): enhance close handling for reader and tab interactions
- Added separate IPC listeners for "before-reader-close" and "before-tab-close" to manage close events more effectively.
- Updated the onBeforeClose method to send signals for both reader and tab closures, ensuring proper cleanup and state management.
2026-05-19 08:42:51 +08:00
troyeguo 4d3dea9583 Refactor chapter navigation and button components in Reader
- Updated previous and next chapter navigation buttons to improve structure and styling.
- Added conditional rendering for audiobook and AI buttons based on props.
- Simplified event handling for navigation and speech dialog interactions.
- Enhanced layout and positioning of buttons for better user experience.
2026-05-10 11:44:33 +08:00
troyeguo 9b9545cfd6 feat: add handleFetchUserInfo action and update UNSAFE_componentWillMount for user info fetching 2026-05-06 08:27:18 +08:00
troyeguo 48a30d6e5b refactor: enforce minimum window dimensions and improve reader window close logic 2026-04-29 16:07:15 +08:00
troyeguo 855a846154 feat: Add customizable popup menu options and AI features
- Introduced new popup options: "Read from here" and "Ask AI" in both English and Chinese localization files.
- Enhanced PopupOption component to handle new options and their interactions.
- Implemented PopupOptionDialog for customizing the popup menu, allowing users to enable/disable options with a limit of 8.
- Added functionality to start text-to-speech from selected text and to open an AI assistant with the selected text.
- Updated Redux actions and reducers to manage the state of the new popup options and speech settings.
- Improved styling for the new popup options and dialog components.
2026-04-28 19:24:37 +08:00
troyeguo 51e4b4cc86 refactor: update PDF conversion logic to use list configuration for current book 2026-04-27 14:56:04 +08:00
troyeguo 28aa8c2cc6 Refactor reading time utilities: consolidate imports and remove redundant file
- Merged ReadingTimeUtil import into ConfigService import in reader and stats components.
- Deleted the ReadingTimeUtil file as its functionality is now integrated into ConfigService.
2026-04-24 16:30:05 +08:00
troyeguo 853409c0ed feat: refactor ReadingTimeUtil to support platform-specific unload handling and update method calls 2026-04-24 16:25:03 +08:00
troyeguo 39cfc43ece Refactor code structure for improved readability and maintainability 2026-04-24 12:28:08 +08:00
troyeguo f1cead8c2e feat: implement reading time tracking with event-driven storage management 2026-04-24 10:28:57 +08:00
troyeguo 252e217485 refactor: enhance Toaster component styling for better text handling 2026-04-16 11:45:25 +08:00
troyeguo db73b98989 Enhance SpeechDialog component with isSettingLocked prop
- Updated SpeechDialog to adjust its right position based on isSettingLocked prop.
- Added isSettingLocked to the Redux state mapping in speechDialog index file.
- Modified SpeechDialogProps interface to include isSettingLocked.
- Adjusted Reader component to conditionally render SpeechDialog based on isSpeechOpen state.
2026-04-11 17:04:30 +08:00
troyeguo fba041abb3 feat: integrate custom AI plugins for dictionary and assistance functionalities 2026-04-07 19:13:58 +08:00
troyeguo 30f6553b11 feat: add Discord Rich Presence support
- Added translation for "Enable Discord Rich Presence" and its description in Chinese.
- Introduced a new setting option for enabling Discord Rich Presence in the settings panel.
- Implemented functionality to update Discord Rich Presence with the current book information when reading.
- Added methods to clear Discord Rich Presence when the reader is closed.
- Updated the percentage display in the reading progress to show as a percentage.
2026-04-07 09:37:59 +08:00