940 Commits

Author SHA1 Message Date
troyeguo
db2210a4ea Increase concurrency limit for audio processing from 5 to 10 for improved performance 2026-06-11 18:49:26 +08:00
troyeguo
b147573119 Reduce default speech speed from 10 to 5 in TextToSpeech component for improved clarity 2026-06-11 17:41:08 +08:00
troyeguo
a62cdc89f8 Increase concurrency limits in TTS processing and add logging for getTTSAudio parameters 2026-06-11 11:40:12 +08:00
troyeguo
7be6780450 Enhance Text-to-Speech functionality and Sync Settings validation
- Updated `checkReachPageEnd` function to include `currentBook` parameter for better handling of multi-role voice books.
- Added logging for debugging purposes to track page end checks.
- Modified conditions in `SyncSetting` component to restrict WebDAV access based on authentication status and Electron environment.
2026-06-10 18:44:09 +08:00
troyeguo
3403fa9788 Remove console log statements from MetadataDialog and TextToSpeech components to clean up the code. 2026-06-09 14:33:58 +08:00
troyeguo
54e7ed29fb fix: update URL prompt text for clarity in English and Chinese translations 2026-06-08 17:38:57 +08:00
troyeguo
ebb67296a7 Refactor metadata fetching logic in MetadataDialog component
- Improved error handling by checking for response code and data presence.
- Consolidated state updates for loading and error messages.
- Added console log for debugging metadata search results.
2026-06-08 17:12:21 +08:00
troyeguo
589b8305e1 fix: update Chinese translations for sync features and improve text matching logic
- Updated translations in zh-CN.json for clarity and consistency in sync feature descriptions.
- Added console log for debugging in TextToSpeech component to track visible text list.
- Enhanced string comparison in findLastMatchIndex function to ignore leading/trailing whitespace.
2026-06-08 15:07:13 +08:00
troyeguo
d1420e4169 Refactor word synchronization logic into WordSyncManager class
- Removed the syncWordToEudic and syncWordToAnki methods from PopupDict class.
- Introduced WordSyncManager to handle synchronization with Eudic and Anki.
- Updated the saveWord method to utilize the new WordSyncManager for syncing words.
2026-06-06 16:47:34 +08:00
troyeguo
5856c516ac refactor: simplify IPC listener management and enhance restore functionality 2026-06-05 17:29:02 +08:00
troyeguo
360b5d042b refactor: remove unused CSS import and update TypeScript configuration 2026-06-05 16:17:29 +08:00
troyeguo
174f000936 refactor: remove private access modifier from utility methods in ImportLocal component 2026-06-05 15:51:50 +08:00
troyeguo
8535da00ad Refactor components to improve logging and remove console statements
- Removed unnecessary console logs from ImportLocal, TextToSpeech, Header, and Viewer components to clean up the code and enhance performance.
- Streamlined the components for better readability and maintainability by eliminating debug statements that are no longer needed.
2026-06-03 15:44:10 +08:00
troyeguo
6e172670d1 Update styles and components for pin keypad functionality
- Added new styles for pin keypad elements in dark.css and default.css, enhancing visual consistency.
- Refactored component rendering in ProtectionOverlay and MoreSetting to streamline pin key display logic.
- Removed unnecessary background color definitions in protection.css for cleaner styling.
- Updated theme utility to include new selectors for biometric and pin key elements, improving theme management.
2026-06-03 08:32:24 +08:00
troyeguo
baa6b0b85c Refactor ImportLocal component to streamline supported formats check
- Simplified the filtering logic for supported formats in the ImportLocal component by removing unnecessary file types from the check.
- Improved code readability by consolidating the filter conditions into a single line.
- Ensured that only relevant formats are considered for import, enhancing user experience.
2026-06-02 17:32:48 +08:00
troyeguo
15bc656749 Refactor synchronization conditions in ImportLocal and Manager components
- Updated the cloud synchronization logic in ImportLocal and Manager components to check for the 'isDisableAutoSync' setting before executing the sync function.
- Improved code readability by consolidating the conditional statements for synchronization.
- Ensured consistent behavior across components when handling book imports and synchronization.
2026-06-02 15:07:35 +08:00
troyeguo
3e96ea294c Refactor cloud synchronization logic in ImportLocal and Manager components
- Updated the cloud synchronization calls in ImportLocal and Manager components to conditionally execute based on the default sync option setting.
- Improved code readability by consolidating the cloud sync function calls into a single conditional statement.
- Ensured consistent handling of synchronization after importing books across both components.
2026-06-02 10:25:44 +08:00
troyeguo
e43d987be1 Refactor components for improved functionality and UI consistency
- Updated color codes in emptyCover component for better visual consistency.
- Added HTML entity decoding in ImportLocal component to handle special characters in titles.
- Adjusted width of popupNote component for responsive design.
- Enhanced page number handling in PageWidget and ProgressPanel components to prevent errors when page info is unavailable.
- Removed deprecated warning message in accountSetting component for cleaner UI.
- Slightly adjusted sidebar width for better layout.
2026-06-02 10:11:21 +08:00
troyeguo
42752f0d41 Enhance ImportLocal component with URL import functionality
- Added IPC listener for "import-url-from-link" to handle external URL imports.
- Updated handleURLImport method to accept an external URL parameter, improving flexibility.
- Ensured proper cleanup of IPC listener in component lifecycle to prevent memory leaks.
- Refactored URL handling logic for better readability and maintainability.
2026-06-01 11:44:27 +08:00
troyeguo
e0660be64e Add @mozilla/readability dependency and enhance HTML import functionality in ImportLocal component
- Introduced the @mozilla/readability library to improve HTML content extraction from URLs.
- Enhanced the importHtmlFromURL method to fetch, parse, and sanitize HTML content, ensuring relative URLs are converted to absolute.
- Added utility functions for escaping HTML and making URLs absolute within the imported content.
- Updated type definitions to include Readability class for TypeScript support.
2026-06-01 11:16:08 +08:00
troyeguo
4126067539 Implement throttling for resize event handlers across multiple components
- Introduced a `throttle` utility function to optimize resize event handling in the Background, ImportLocal, Header, BookList, Viewer, and main application logic.
- Replaced existing resize event listeners with throttled versions to improve performance and reduce unnecessary re-renders.
- Ensured proper cleanup of event listeners in component lifecycle methods to prevent memory leaks.
2026-05-31 18:06:43 +08:00
troyeguo
38b5cc977c Refactor components to remove console.log statements for cleaner code
- Removed unnecessary console.log statements from BookCardItem, MetadataDialog, SelectBook, TextToSpeech, common utility functions, CoverUtil, and DatabaseService components.
- Improved code readability and maintainability by eliminating debug logs that are no longer needed.
2026-05-31 17:52:59 +08:00
troyeguo
5a00ae3094 Enhance ImportLocal and Manager components with cloud synchronization functionality
- Integrated `cloudSyncFunc` into the ImportLocal component to trigger synchronization after importing books.
- Updated the Manager component to call `cloudSyncFunc` after importing a book.
- Added `cloudSyncFunc` to the props in both ImportLocal and Manager interfaces and their respective state mappings.
2026-05-31 17:27:15 +08:00
troyeguo
0453cd0f72 Refactor book item components to use original file names when configured
- Updated BookCardItem, BookCoverItem, and BookListItem components to conditionally display the original file name without extension based on user settings.
- Introduced getFileNameWithoutExtension utility function to handle file name extraction.
- Removed redundant code in ImportLocal component related to name assignment.
- Adjusted DictSetting component to utilize the new utility for dictionary file name handling.
2026-05-31 15:52:31 +08:00
troyeguo
48ad5a8d8a Implement scroll reset on setting mode change in SettingDialog component 2026-05-31 15:38:05 +08:00
troyeguo
f5b77ef1bc Update localization files to enhance font installation instructions across multiple languages, clarifying that installed fonts will automatically appear in the dropdown list after restarting the application. 2026-05-31 15:34:00 +08:00
troyeguo
86908f1c38 refactor: streamline backup and restore processes, improve cover handling 2026-05-29 17:15:15 +08:00
troyeguo
e03ffc90e4 Add URL import functionality and corresponding translations
- Implemented a new option to import books from a URL in the ImportLocal component.
- Added user prompts for entering a book download URL and validation for http/https links.
- Included loading feedback during the download process and error handling for failed imports.
- Updated English and Chinese translations for new URL import features.
2026-05-29 16:26:30 +08:00
troyeguo
ea9d271074 refactor: replace SparkMD5 with CryptoJS for MD5 hashing and remove unused dependencies 2026-05-28 16:46:45 +08:00
troyeguo
7649ebe141 refactor: rename getRecordsByBookKeys to getRecordsByKeys for consistency 2026-05-26 17:26:13 +08:00
troyeguo
db7679a24e Add Tufte CSS, Typebase CSS, and Typo CSS stylesheets
- Introduced Tufte CSS for enhanced typography and layout.
- Added Typebase CSS for foundational typography styles.
- Included Typo CSS for comprehensive typographic control and responsive design.
2026-05-26 12:08:18 +08:00
troyeguo
8e0cd83a7c Refactor text-to-speech component to use checkReachPageEnd utility function
- Moved logic for determining if the end of the page is reached into a new utility function `checkReachPageEnd`.
- Added `findLastMatchIndex` helper function to assist with matching visible text against node text.
- Updated the text-to-speech component to utilize the new utility functions for improved readability and maintainability.
- Added console logs for debugging purposes to track visible text lists and last match indices.
2026-05-25 18:17:02 +08:00
troyeguo
1410c236b2 fix: prevent duplicate startup auth checks in ProtectionOverlay 2026-05-24 15:49:26 +08:00
troyeguo
88f8364d33 feat: add 'About' sidebar item in SettingDialog and update dict service prefix 2026-05-23 18:08:49 +08:00
troyeguo
5ca4a53f1b Fix: Prevent browser support warning in BackupDialog when running in Electron 2026-05-23 17:56:46 +08:00
troyeguo
59b724b65f Refactor metadata dialog to streamline fetching and handling book metadata
- Removed unused imports and code related to Apple and Open Library book items.
- Simplified the metadata fetching logic to use a single API call.
- Updated state management for loading and error handling.
- Cleaned up the metadata application logic to focus on cloud book items.
- Removed the "Get more results" button and related functionality.
2026-05-23 17:26:03 +08:00
troyeguo
058a53f93d chore: remove console.log statements from BookCardItem and useBookItem components 2026-05-20 09:54:47 +08:00
troyeguo
ab366903bb Refactor EditDialog component and update protection CSS styles
- Commented out the "Get metadata" button in the EditDialog component for future use.
- Reduced z-index in protection CSS from 99999 to 10 for better layering.
2026-05-20 09:53:09 +08:00
troyeguo
f8b7adf649 feat(useBookItem): update cover loading logic to append timestamp for cache busting 2026-05-19 18:16:44 +08:00
troyeguo
0ebe1f7732 feat(coverUtil): add logic to delete existing cover files before saving new ones 2026-05-19 18:09:30 +08:00
troyeguo
faa4a9295d feat(editDialog): enhance cover handling to support fetching and converting image URLs 2026-05-19 17:40:42 +08:00
troyeguo
0d60cdf331 refactor(ipc): rename file selection handlers for clarity 2026-05-19 15:30:39 +08:00
troyeguo
4b97774d58 Remove unnecessary console.log statements from DeleteIcon, Viewer, and koReaderSync components to clean up the code and improve performance. 2026-05-19 10:59:04 +08:00
troyeguo
74e12788e9 feat(protection): add overlay option to password input dialog 2026-05-19 09:25:51 +08:00
troyeguo
823589b831 feat(backup): enhance cover handling by converting blob to base64 in zipCover function
feat(syncSetting): add authentication check for webdav feature in handleAddDataSource
2026-05-19 09:19:53 +08:00
troyeguo
9b0b616f6c fix(footer): adjust zIndex and opacity for footer component
fix(viewer): update chapter label check and add debug logs
2026-05-18 18:41:59 +08:00
troyeguo
4e5fbda8b8 feat: Enhance delete icon functionality and sidebar styling
- Added logic to handle bookmark deletion in the DeleteIcon component, checking if the current bookmark matches the recorded location before deletion.
- Updated the mapStateToProps in the DeleteIcon index file to include currentBook from the Redux store.
- Modified DeleteIconProps interface to include currentBook of type BookModel.
- Adjusted padding in the Sidebar component for better UI alignment.
- Updated sidebar CSS to refine height calculation for improved layout.
2026-05-18 17:17:13 +08:00
troyeguo
696682719a refactor: reorder sidebar items in SettingDialog for improved layout
feat: optimize audio cache management in TTSUtil by clearing old entries
2026-05-18 09:06:26 +08:00
troyeguo
e2c102a589 feat: add functionality to copy book and note links to clipboard 2026-05-17 18:31:54 +08:00
troyeguo
05a7750988 refactor: rename ActionDialog to MoreAction for consistency 2026-05-17 18:12:33 +08:00