Commit Graph

2253 Commits

Author SHA1 Message Date
troyeguo
f080dfd175 feat: Implement card scaling feature for BookCardItem and BookList components 2026-04-08 16:22:18 +08:00
troyeguo
a3309cc880 fix: Ensure existing configuration is validated before usage in DataSetting component 2026-04-08 15:56:12 +08:00
troyeguo
701711028a Refactor data setting configuration handling to use setObjectConfig for improved structure and clarity
- Replaced setReaderConfig with setObjectConfig for saving and retrieving folder paths.
- Updated JSON parsing to directly handle objects instead of strings.
- Enhanced error handling and default value management for better reliability.
2026-04-08 15:45:34 +08:00
troyeguo
57ed996db4 feat: Add "Clear all style" functionality to SettingPanel
- Implemented a new method `handleClearAllStyle` to clear specific style settings from localStorage.
- Added a menu toggle in the SettingPanel for accessing the "Clear all style" action.
- Updated the interface to include `isShowMenu` state for managing menu visibility.
- Styled the new menu for better user interaction.
2026-04-08 15:33:20 +08:00
troyeguo
9512eacd0b Remove auto-sync functionality for updated notes in PopupNote component 2026-04-08 11:40:37 +08:00
troyeguo
d5a078386a feat: add select action handling in popup menu and dropdown settings
- Implemented selection actions in PopupMenu component, allowing for translation, dictionary lookup, highlighting, note creation, and text-to-speech functionalities.
- Integrated createHighlight utility for managing highlights and notes.
- Updated PopupOption to utilize the new highlight creation process.
- Enhanced DropdownList to manage select action settings.
- Added new state management for select action in reader settings.
- Removed unused dropdown option for "Nothing".
2026-04-08 10:49:49 +08:00
troyeguo
564e988c84 feat: update AI assistance prompt handling based on interaction mode 2026-04-08 10:00:24 +08:00
troyeguo
214679728a feat: add "Action after selecting text" option and improve note syncing
- Added new translation for "Action after selecting text" in Chinese.
- Introduced a new dropdown option for actions after selecting text, including Translate, Dictionary, Highlight, Take a note, Speak the text, and Nothing.
- Refactored PopupNote and PopupOption components to instantiate NoteSyncManager for syncing notes and highlights.
- Removed deprecated MarkdownSyncService, NoteSyncManager, NotionSyncService, ReadwiseSyncService, and YuqueSyncService implementations to streamline note syncing process.
2026-04-08 09:41:23 +08:00
troyeguo
9cc8bfe81a feat: enhance AI service initialization and configuration handling in popups 2026-04-08 08:37:26 +08:00
troyeguo
9b4d72e485 feat: update AI dictionary prompt to remove automatic source language reference 2026-04-08 08:06:09 +08:00
troyeguo
fba041abb3 feat: integrate custom AI plugins for dictionary and assistance functionalities 2026-04-07 19:13:58 +08:00
troyeguo
299c272f9c feat: add custom AI model prompts and integrate chat stream functionality 2026-04-07 18:57:47 +08:00
troyeguo
2f64e29d11 feat: add AI model prompts and configuration options for translation, dictionary, and assistance 2026-04-07 17:26:54 +08:00
troyeguo
3174198e85 feat: add AI model configuration options for translation, dictionary, and assistance 2026-04-07 17:01:49 +08:00
troyeguo
904a4e5d71 feat: add AI settings management with provider and model configuration 2026-04-07 16:43:53 +08:00
troyeguo
e33ada74d2 feat: add Notion, Yuque, and Readwise integration settings and improve placeholder text 2026-04-07 15:00:13 +08:00
troyeguo
c0d8496a5e refactor: update authentication fields structure for sync services 2026-04-07 14:36:23 +08:00
troyeguo
437aa87892 fix: reorder description for clarity in markdown sync setting 2026-04-07 14:24:28 +08:00
troyeguo
0a3117df96 feat: add local markdown file sync for notes and highlights in Electron 2026-04-07 12:30:33 +08:00
troyeguo
dfea4845d6 feat: implement auto-sync for notes and highlights to Notion, Yuque, and Readwise
- Added NoteSyncManager to handle synchronization of notes and highlights to enabled destinations.
- Integrated Notion, Yuque, and Readwise sync services with respective configurations.
- Updated PopupNote and PopupOption components to trigger auto-sync on note/highlight creation.
- Introduced new settings for enabling/disabling sync options for Notion, Yuque, and Readwise in the settings panel.
- Enhanced DataSetting component to manage sync settings and prompt for authentication when enabling sync.
2026-04-07 12:06:43 +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
4b32218321 feat(i18n): add script for managing translation files and patching nan.h
- Implemented a script to list locale folders and identify missing translation terms in English.
- Added functionality to copy missing terms from Chinese translations to English.
- Enhanced the script to fill in missing terms for other languages based on the updated English file.
- Created a patch script for nan.h to comment out the inclusion of nan_scriptorigin.h for cross-platform compatibility.
2026-04-07 08:59:10 +08:00
troyeguo
8f91fd8460 feat: add discord-rpc dependency and update related packages in yarn.lock 2026-04-07 08:38:37 +08:00
troyeguo
03a66fafea refactor: remove AboutDialog component and related styles; update settings components for new version handling 2026-04-06 20:17:27 +08:00
troyeguo
6596d3025e feat: add export functionality for books, notes, and highlights in Data settings; update translations 2026-04-06 20:01:20 +08:00
troyeguo
362125e52a feat: add Data settings component; implement storage location management and snapshot restoration 2026-04-06 19:47:20 +08:00
troyeguo
0462e73578 feat: add About and Data settings components; implement localization and update UI elements 2026-04-06 19:22:22 +08:00
troyeguo
27cfcfca9b refactor: clean up unused state variables and imports in settings components 2026-04-06 17:55:25 +08:00
troyeguo
99ab8c7d05 feat: refactor settings dialog components; add appearance and reading settings 2026-04-06 17:39:34 +08:00
troyeguo
5a46ed650e feat: add translations for "About" and "AI service"; update icon font and styles
- Added Chinese translations for "About" and "AI service" in translation.json.
- Updated icomoon font files (eot, svg, ttf, woff) to new versions.
- Added new user icon to icomoon.svg and updated style.css to include new icon styles.
- Modified SettingDialog component to include "About" and "AI service" in the sidebar.
2026-04-06 17:20:29 +08:00
troyeguo
d96c4b0de7 feat: enhance setting dialog layout and sidebar functionality 2026-04-06 15:55:42 +08:00
troyeguo
8bddf4724d fix: update version number to 2.3.1 and enhance user prompts for Pro feature upgrades 2026-04-06 14:56:55 +08:00
troyeguo
6dc4fe4c2c fix: update AI features description in English and Chinese READMEs 2026-04-06 14:15:53 +08:00
troyeguo
b7ede3f4fd fix: update iCloud reference in multiple language READMEs and revert version number in package.json 2026-04-05 17:39:14 +08:00
troyeguo
0e0cba3a31 fix: update translation terminology and refactor batch translation handling
- Changed "Side by side translation" to "Bilingual translation" in translation files and dropdown list for consistency.
- Refactored handleBatchTranslation method to accept an interval parameter for controlling translation frequency.
- Updated logging for batch translation to improve clarity.
- Removed deprecated convertLangMap and replaced it with KookitConfig.ConvertLangMap for language conversion.
2026-04-04 18:12:20 +08:00
troyeguo
0db7b067df Refactor StyleUtil to accept bookKey for CSS customization
- Updated ThemeList and Viewer components to pass currentBook.key to StyleUtil.addDefaultCss.
- Modified StyleUtil to accept bookKey parameter in addDefaultCss and getDefaultCss methods for dynamic CSS application based on the current book.
2026-04-03 17:29:43 +08:00
troyeguo
b56bfa59ef feat: add trimSpecialCharacters utility function and update TTS logic for improved text handling 2026-04-03 16:41:34 +08:00
troyeguo
52a9905b2d feat: add validation for text length in TTS analysis and display error message 2026-04-03 11:39:14 +08:00
troyeguo
6fc51b20bb feat: implement authentication checks for full translation mode and multi-role features 2026-04-03 11:30:51 +08:00
troyeguo
67ec4e608b feat: add role analysis messages and improve page end detection for multi-role TTS 2026-04-02 16:58:45 +08:00
troyeguo
02315687ed feat: add multi-role voice type selection and update voice filtering logic 2026-04-02 16:37:28 +08:00
troyeguo
0113b2b647 feat: enhance TextToSpeech and TTSUtil for improved voice handling and audio caching 2026-04-02 15:50:25 +08:00
troyeguo
ec1787396b feat: add multi-role speech functionality with AI analysis for character voices
- Updated translation.json to include new strings for multi-role speech and narrator voice.
- Modified SpeechDialog component to increase height and enable scrolling.
- Enhanced TextToSpeech component to support multi-role speech, allowing different characters to read aloud with distinct voices.
- Implemented voice selection for narrator, male, and female roles in the TextToSpeech component.
- Added getSplitSentence utility function to handle sentence splitting for multi-role analysis.
- Updated interface to include multiRoleEnabled state.
2026-04-02 15:08:55 +08:00
troyeguo
8bc7a2f2fb feat: enhance batch translation handling by adding book key check and reducing trigger interval 2026-04-02 09:30:07 +08:00
troyeguo
a0d5eb7968 feat: update full translation mode handling across components 2026-04-02 08:52:59 +08:00
troyeguo
90a1d058b1 Fix: Update AI voice character quota display to show free credits if available 2026-04-02 08:35:21 +08:00
troyeguo
456b37e0e5 feat: add language conversion and batch translation handling
- Introduced `convertLangMap` in `common.ts` to map language codes to their respective names.
- Updated `handleBatchTranslation` in `component.tsx` to utilize the new language mapping for batch translation requests.
- Refactored `getDefaultTransTarget` to use `convertLangMap` instead of a hardcoded language map.
- Added `detectLanguage` function in `reader.ts` to facilitate language detection for text inputs.
2026-04-01 18:15:26 +08:00
troyeguo
9d952beae5 feat: implement batch translation handling in Background component
- Added a new method `handleBatchTranslation` to manage batch translations when the page changes.
- Introduced a throttle mechanism to limit batch translation requests to every 10 seconds.
- Integrated `getBatchTrans` utility to fetch translations and handle results accordingly.
- Updated the `componentDidUpdate` lifecycle method to call `handleBatchTranslation` on page change events.
- Enhanced error handling in the `getBatchTrans` utility function for better user feedback.
2026-03-31 21:14:29 +08:00
troyeguo
8402ff8dd3 feat: add full text translation options and integrate into settings
- Added new translation options in the Chinese locale file: "Full text translation", "Side by side translation", "Disable", and "Only translation".
- Integrated full translation mode into various components including ActionDialog, ImportLocal, and Viewer.
- Updated DropdownList to include full translation mode settings with options for disabling, side by side translation, and only translation.
- Enhanced state management in DropdownList and its interface to accommodate the new full translation mode.
- Updated constants for dropdown list to include full translation options.
2026-03-31 19:50:58 +08:00
troyeguo
4427202d5c feat: add file size sorting option and enhance sorting logic for books 2026-03-31 09:57:21 +08:00