Commit Graph

325 Commits

Author SHA1 Message Date
troyeguo
cebf9391de Refactor code structure for improved readability and maintainability 2026-04-28 16:30:26 +08:00
troyeguo
ee98fea65f feat: add book path selection feature in edit dialog
- Added a new field for selecting and displaying the book path in the edit dialog.
- Integrated Electron's IPC to allow users to select a book path from the file system.
- Updated the state management to include the book path and ensure it is saved with the book details.
- Enhanced the UI to provide options for locating and selecting the book path.
- Added corresponding styles for the new book path UI elements.
2026-04-27 15:35:50 +08:00
troyeguo
f1cead8c2e feat: implement reading time tracking with event-driven storage management 2026-04-24 10:28:57 +08:00
troyeguo
19bc092bb4 fix: remove nodeIntegrationInSubFrames option from webPreferences in createMainWin 2026-04-23 08:08:23 +08:00
troyeguo
640aefa392 Remove unnecessary console.log statement from discord RPC clear handler 2026-04-17 17:56:30 +08:00
troyeguo
5af3ad03b2 Update icon fonts and enhance settings dialogs
- Updated icon font files (eot, svg, ttf, woff) with new versions.
- Modified CSS to reference updated font files with new query strings.
- Added new "Reading" section in the settings dialog sidebar.
- Restored "Background" option in the settings dialog sidebar.
- Enhanced backup dialog to handle settings more effectively.
- Added success toast notifications for dropdown list actions.
- Adjusted reading status filter dropdown width for better UI.
2026-04-16 15:17:38 +08:00
troyeguo
529bc0cc19 refactor: replace console.log with console.info for consistent logging 2026-04-14 09:10:18 +08:00
troyeguo
18b5f65ea4 Enhance removeSyncUtil method to clear queue before deletion of sync utility 2026-04-13 12:23:54 +08:00
troyeguo
58c1e5268f Refactor code structure for improved readability and maintainability 2026-04-09 16:19:32 +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
troyeguo
dbfa3c7732 feat: implement quit behavior to minimize to tray functionality 2026-03-30 09:44:29 +08:00
troyeguo
2230deb8e1 feat: implement minimize to tray functionality on close 2026-03-30 09:34:43 +08:00
troyeguo
4b5f9350ec Implement initial structure for code changes 2026-03-26 21:27:25 +08:00
troyeguo
7eb3a35d83 feat: improve installation process by killing Koodo Reader process before update 2026-03-22 16:53:25 +08:00
troyeguo
99b4c304a6 feat: implement cloud URL validation via Electron IPC 2026-03-22 16:27:53 +08:00
troyeguo
3ee501c714 Remove unnecessary console.log statements across multiple components to clean up the codebase and improve readability. 2026-03-06 09:19:33 +08:00
troyeguo
bec82b6cfb Refactor code structure for improved readability and maintainability 2026-03-04 18:11:35 +08:00
troyeguo
825e57f748 Refactor book format checks to only consider "PDF" format
- Updated various components to remove checks for "DJVU" format, focusing solely on "PDF".
- Adjusted conditions in BookCardItem, BookCoverItem, BookListItem, and others to streamline format handling.
- Removed "DJVU" support from routing and supported formats.
- Ensured consistency across components regarding PDF handling and configuration checks.
2026-03-03 20:20:23 +08:00
troyeguo
d71cd19960 refactor: remove unused file path checks and streamline book opening logic 2026-03-02 10:50:45 +08:00
troyeguo
c7ce763f4e feat: add duplicate bookmark check and error message for existing bookmarks 2026-03-01 14:58:52 +08:00
troyeguo
2ccb83d1da feat: update translations and settings for book opening behavior
- Updated Chinese translations for book opening settings and quota reset message.
- Refactored book path handling in ActionDialog to check both local and library paths.
- Added new setting for auto-maximize book window on open.
- Removed deprecated auto-fullscreen setting from GeneralSetting.
- Updated interfaces and constants to reflect changes in settings.
- Enhanced TTS audio quota message to include reset information.
2026-03-01 10:45:41 +08:00
troyeguo
897096bb78 feat: set minimum width and height for main window options 2026-02-26 10:00:22 +08:00
troyeguo
607f5bb492 Add support for DJVU format across the application
- Updated emptyCover component to change background color for DJVU format.
- Added route for DJVU in the router configuration.
- Included DJVU in the list of supported formats.
- Enhanced GooglePickerUtil to recognize DJVU file type.
2026-02-23 19:47:54 +08:00
troyeguo
3c6a9f1c68 fix: enhance cover handling by validating base64 data before processing 2026-02-23 16:18:24 +08:00
troyeguo
d42b715b19 Refactor token management and remove debug logs
- Replaced direct token deletion calls with a new `handleClearToken` utility function in multiple components (SupportDialog, UpdateDialog, AccountSetting) to streamline token management.
- Removed unnecessary console log statements across various components to clean up the codebase.
- Deleted the unused `i18n-mobile-script.js` file.
- Updated the `handleExitApp` function to include token clearing before redirecting to the login page.
2026-02-13 11:13:09 +08:00
troyeguo
713ba52068 Refactor authentication token handling and sync service logic
- Removed redundant token validation and error handling from the Header component.
- Introduced `prepareThirdConfig` function to streamline token refresh and validation for third-party services.
- Updated `getCloudConfig` to utilize the new `prepareThirdConfig` for better token management.
- Simplified `SyncService` to eliminate unnecessary dependencies on third-party requests during initialization.
- Enhanced error handling and user feedback for token authorization failures in the third-party request module.
2026-02-06 21:39:42 +08:00
troyeguo
98cd3c1087 feat: Add iCloud Drive folder error message and enhance sync settings
- Added a new translation for the error message when the iCloud Drive folder is not found in the default path.
- Updated the Header component to log cloud sync records and compare results for better debugging.
- Enhanced the SyncSetting component to handle iCloud Drive path retrieval and provide user feedback on binding success or failure.
- Modified the getICloudDrivePath function to improve path detection for macOS and Windows, ensuring compatibility with the Koodo Reader application.
- Cleaned up the code in various utility files for better readability and maintainability.
2026-01-31 15:50:18 +08:00
troyeguo
f4e4e6deea Update main.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-28 16:27:00 +08:00
troyeguo
8a799e2a81 format with prettier 2026-01-28 16:10:13 +08:00
troyeguo
20bb5770b5 Refactor searchBox and textToSpeech components for improved readability and consistency; remove unnecessary console logs; adjust formatting in getDictText and getTTSAudio functions for better code clarity. 2026-01-21 15:59:18 +08:00
troyeguo
3577d2c19a fix: delay log file writing to avoid potential race conditions 2026-01-15 17:03:40 +08:00
troyeguo
9bf376de2d Refactor search functionality and improve UI feedback
- Extracted search result retrieval logic into a separate method in SearchBox component for better readability and maintainability.
- Updated importDialog CSS to adjust positioning of elements for improved layout.
- Added conditional toast notifications in TextToSpeech component to only show messages when audio is enabled.
- Enhanced error handling in common utility functions by increasing toast duration for better user visibility.
- Modified SQL queries in BookUtil to use parameterized queries for improved security and performance.
- Improved case-insensitive search functionality in BookUtil to ensure consistent results regardless of input case.
2026-01-15 16:46:41 +08:00
troyeguo
e5f5b5f5c8 Refactor background component and related files for improved readability and functionality
- Simplified the rendering logic in the Background component by introducing a helper function to determine dark mode and shadow opacity.
- Updated BackgroundProps interface to include backgroundColor.
- Modified mapStateToProps in background index to include backgroundColor from the state.
- Enhanced deleteDialog component to fetch full details of deleted books before deletion.
- Added handleColor prop to PopupNote component for better color management.
- Updated language label for Portuguese in settingList.
- Improved performance in bookList and cardList components by optimizing data fetching.
- Refactored noteList component to streamline note handling and mapping.
- Cleaned up backup utility by removing unnecessary config backup steps.
2026-01-04 15:18:08 +08:00
troyeguo
19fff2542e feat: add Google Drive Picker selection prompt and improve import functionality
- Added a prompt in Chinese for users to select books in the Google Drive Picker.
- Enhanced the Google Picker handling in the ImportDialog component to open an external URL for selection.
- Updated the displayed books count in the BookList component to a fixed value of 24.
- Improved logging for debugging purposes across various components, including ImportLocal and ContentList.
- Refactored backup functions to ensure proper directory creation for configuration files.
- Updated dependencies in yarn.lock for better compatibility and performance.
2026-01-01 16:43:12 +08:00
troyeguo
2885ca50c5 feat: add new translations and settings for text style and account deletion
- Added translations for overwriting default text style, account deletion instructions, and related UI elements in zh-CN locale.
- Updated global CSS to adjust the width of custom confirmation dialog.
- Enhanced import and setting dialogs to include new settings for overwriting text style.
- Modified account settings to provide instructions for account deletion via mobile app.
- Updated sync settings to conditionally handle snapshot retrieval based on Electron environment.
- Improved error handling for CORS issues with a suggestion to use the desktop app.
- Ensured snapshot retrieval is only attempted in Electron environment.
2025-12-31 09:58:09 +08:00
troyeguo
8643666c12 feat: enhance database interactions and refactor note handling across components 2025-12-25 18:09:52 +08:00
troyeguo
777893cad9 feat: refactor database commands and update view mode handling across components 2025-12-25 14:43:03 +08:00
troyeguo
88266a5bd4 feat: implement custom database commands and optimize book handling logic 2025-12-24 17:58:17 +08:00
troyeguo
0c82228003 feat: Enhance popup functionality and improve login handling
- Updated PopupBox to send menuMode type when checking URL window status.
- Modified PopupDict and PopupTrans to include a type parameter when opening external URLs.
- Refactored Header component to ensure 'isFinshReading' is set correctly and added logging for sync operations.
- Improved AccountSetting component to streamline login and binding processes, ensuring proper error handling and user feedback.
- Enhanced openExternalUrl utility to accept a type parameter for better URL handling in Electron.
- Added console logging for configuration string during backup to assist in debugging.
2025-12-20 17:15:47 +08:00
troyeguo
59378b253c feat: Enhance PopupBox and PopupDict components with URL visibility control
- Added `isShowUrl` state to `PopupBox` and `PopupDict` components to manage URL display based on Electron environment.
- Implemented logic in `PopupBox` to hide the component when `isShowUrl` is true and menu mode is either "dict" or "trans".
- Updated interfaces for `PopupBox` and `PopupDict` to include `isShowUrl` state.
- Modified `Header` component to await backup operations for improved synchronization.
- Added functionality in `GeneralSetting` to read and apply configuration from `config.json` upon changing storage location.
- Enhanced `SettingDialog` with bold styling for new plugin indication.
- Added console logging for debugging highlighters in `Viewer` component.
2025-12-17 17:48:13 +08:00
troyeguo
5667fbff30 feat: add debug log retrieval feature and improve error handling
- Added a new translation key for "Get debug logs" in Chinese localization.
- Implemented a UI element in the settings to trigger debug log retrieval.
- Enhanced error handling across various components to display error messages using toast notifications.
- Updated the sync settings to inform users about Aliyun Drive's restrictions.
- Added a new dependency `electron-log` for improved logging capabilities.
2025-12-17 11:29:02 +08:00
troyeguo
0b8e76785b feat: Implement logging mechanism to send console logs from main process to renderer 2025-12-15 21:38:07 +08:00
troyeguo
05cf34bc4d style: update input field styling in SortShelfDialog component 2025-12-12 18:34:58 +08:00
troyeguo
babd663cb5 fix: update public API URL to koodoreader.com 2025-12-11 17:41:23 +08:00
troyeguo
bd99e3ace5 Remove unnecessary console.log statements across multiple components to clean up the codebase and improve readability. 2025-11-29 17:59:13 +08:00
troyeguo
b09b84ad3b Refactor BookUtil.reloadBooks to accept currentBook parameter; update related components to pass currentBook during reload. Optimize resize event handling in Viewer component with debounce. Adjust handleFinishReading and handleSuccess methods in Header component for better sync logic. Add serverRegion setting in loginRegister function. Implement scale event throttling in mouseEvent utility. 2025-11-28 21:18:02 +08:00
troyeguo
4e309c3f58 feat(addDialog): add action type selection for copying or moving books 2025-10-31 16:17:12 +08:00
troyeguo
7417932eae feat(header): append version and client info to FAQ referer URL
fix(request): update dictionary text formatting for better readability
2025-10-24 18:07:47 +08:00
troyeguo
6e65291ab2 Refactor header component to handle reading finish event and visibility change
- Added ipcRenderer listener for "reading-finished" event to trigger handleFinishReading method.
- Consolidated logic in visibilitychange event to call handleFinishReading instead of duplicating fetch calls.
- Moved fetch logic into handleFinishReading method for better code organization and reusability.
2025-10-19 15:36:33 +08:00
troyeguo
ec27a7953f Remove unnecessary console.log statements from PopupMenu, PopupRefer, and OperationPanel components to clean up the code and improve performance. 2025-10-19 08:38:20 +08:00