302 Commits

Author SHA1 Message Date
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
troyeguo
a01fd900e6 Refactor NavList component to streamline click handling and improve user interaction
- Consolidated click event handlers for bookmarks and chapter titles in NavList component.
- Added cursor pointer style to bookmark page list item title for better UX.
- Updated Background component to handle changes in reader mode state.
- Added console log for bookLocation in OperationPanel for debugging purposes.
- Integrated IPC call to clear all data in clearAllData utility function.
2025-10-18 10:45:33 +08:00
troyeguo
cd4a873c2a feat: enhance window management with display scaling and visibility checks 2025-10-17 20:57:31 +08:00
troyeguo
b458ec2430 feat: enhance settings dialog and add Tamil language support
- Updated the SettingDialog component to include a new CSS class for setting tabs, improving styling and layout.
- Modified settingDialog.css to define styles for the new setting-tab class, ensuring proper width and text overflow handling.
- Enhanced importLocal.css to improve item layout with better line height and cursor styles.
- Refactored PopupRefer component to improve content extraction logic and added console logs for debugging.
- Added Tamil language support in settingList.tsx and integrated it into the i18n configuration.
- Updated router logic to handle language changes for Tamil.
- Adjusted navigationPanel.css to ensure proper overflow handling.
- Made minor adjustments to sidebar component and CSS for better tooltip integration and layout.
2025-10-13 18:22:48 +08:00
troyeguo
caef7d3b5c feat: implement download cancellation feature and add new settings for book title usage 2025-10-03 21:38:26 +08:00
troyeguo
ba44612d37 Refactor PopupRefer component to remove unnecessary console logs and streamline text content validation; enhance Login component to display a warning message for Microsoft login in China. 2025-09-28 09:59:18 +08:00
troyeguo
ec317cdc3d Remove unnecessary right padding from text input in cardList CSS 2025-09-27 11:02:22 +08:00
troyeguo
5d1c277f6c feat: add download progress tracking and browser download option for Windows
- Added "Download in Browser" option for Windows users in the update dialog.
- Implemented download progress tracking with state management for progress, downloaded size, and total size.
- Updated translation files for Chinese (Simplified and Traditional) to reflect changes in download terminology.
- Refactored download logic to handle both Windows and non-Windows environments.
2025-09-16 17:27:10 +08:00
troyeguo
a2a6afa5e8 feat: integrate auto-updater for application updates and bump version to 2.1.6 2025-09-15 17:57:57 +08:00
troyeguo
061f8adcf3 Refactor code structure for improved readability and maintainability 2025-09-11 08:12:27 +08:00
troyeguo
4dd82cec8e feat: add delay to chatwoot SDK initialization; improve popup menu positioning logic; append referer parameter to FAQ URL 2025-08-28 18:21:46 +08:00
troyeguo
9e92a76eaa refactor: update IPC event name for Google Picker and enhance handling of picker actions
refactor: improve success message for added books in ImportLocal component
2025-08-17 16:56:28 +08:00
troyeguo
9cde3ec1f6 feat: integrate Google Picker functionality with IPC communication and update picker handling 2025-08-17 16:10:23 +08:00
troyeguo
24929eebd6 fix: secure Electron app by disabling insecure content and removing experimental features 2025-08-17 11:40:04 +08:00
troyeguo
84e6967b96 feat(i18n): update OneDrive label and add clear success message in Chinese translation
fix(driveList): change OneDrive label from "Experimental" to "full access"

fix(header): ensure chat box is added on authentication for both Electron and web

refactor(reader): simplify mouse enter logic for panels to improve readability and maintainability
2025-08-17 10:54:44 +08:00
troyeguo
cf41e2bfd9 fix: update release workflow to include multiple OS targets and modify package.json for Linux x64 builds 2025-08-12 09:27:30 +08:00
troyeguo
051084fa93 Remove unnecessary console log in PopupAssist component during ask mode handling 2025-08-10 10:41:26 +08:00
troyeguo
75d0793f4b fix(main): ensure main window is created if destroyed and app is ready 2025-08-09 15:56:57 +08:00
troyeguo
46c6df97ba refactor(main): reorganize single instance handling and restore file path logging 2025-08-09 15:08:55 +08:00
troyeguo
e696f6fd1a refactor(main): streamline single instance handling and remove redundant file writes 2025-08-09 12:07:17 +08:00
troyeguo
b0d027cd0e feat(settings): add option to disable auto scroll between chapters
- Added new translations for disabling auto scroll functionality in Chinese.
- Updated SettingDialog component to include a new setting for disabling auto scroll.
- Modified the interface to include the new isDisableAutoScroll state.
- Updated the reading settings list to include the new auto scroll option.
- Refactored SyncSetting component to remove unused state variables and include necessary ones.
- Adjusted mouse event handling to respect the new auto scroll setting.
- Minor update to user request handling for server region check.
2025-08-09 10:46:56 +08:00
troyeguo
a63f955c63 Enhance authentication URL handling for Microsoft services based on server region
- Updated the import dialog to use region-specific callback URLs for Microsoft and other drives when the server region is set to "china".
- Modified the header component to account for the new "web.koodoreader.cn" hostname.
- Adjusted account settings to utilize region-specific callback URLs for Microsoft during login.
- Enhanced sync settings to ensure the correct callback URL is used based on the server region for Microsoft and related drives.
- Updated viewer component to include server region in state management.
- Refined login component to handle region-specific callback URLs for Microsoft.
- Adjusted user request utility to use the appropriate callback URL based on the service and server region.
2025-08-08 17:40:55 +08:00
troyeguo
ba22949e23 feat: implement IPC handler for opening folders and files in the explorer 2025-08-02 17:24:45 +08:00
troyeguo
f843a4703f feat: add auto maximize window setting and update related UI components 2025-08-02 16:52:30 +08:00