- 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.
- 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.
- 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.).
- 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.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Merged ReadingTimeUtil import into ConfigService import in reader and stats components.
- Deleted the ReadingTimeUtil file as its functionality is now integrated into ConfigService.
- 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.
- 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.