Commit Graph

2435 Commits

Author SHA1 Message Date
troyeguo
15ddeade47 fix: refactor CORS error handling in testCORS function for improved clarity 2026-05-09 18:21:51 +08:00
troyeguo
8debff9c52 fix: add language check for word definition support in SettingSwitch component 2026-05-09 17:52:52 +08:00
troyeguo
95ae2c512d fix: comment out CORS error handling for HTTP URLs in testCORS function 2026-05-09 17:38:20 +08:00
troyeguo
a6e28d262e fix: validate book path before opening folder in EditDialog 2026-05-09 17:35:10 +08:00
troyeguo
f26903dc77 fix: update OS version in release workflow and improve localization strings 2026-05-09 17:23:27 +08:00
troyeguo
2e2058f996 fix: update Windows OS version in package.json modification script 2026-05-07 09:37:31 +08:00
troyeguo
65c4c28874 fix: update Windows OS version in build matrix for consistency 2026-05-07 09:34:45 +08:00
troyeguo
be902e4363 chore: update GitHub actions to use latest versions of checkout and setup-node 2026-05-07 09:19:08 +08:00
troyeguo
199ac33a46 fix bug 2026-05-06 18:53:37 +08:00
troyeguo
829234bf4b style: update theme color delete button styles for improved visibility and interaction 2026-05-06 17:48:24 +08:00
troyeguo
21af7addbd feat: enhance color picker functionality with input support and parsing for background and text colors 2026-05-06 17:40:22 +08:00
troyeguo
8603ba3a09 fix: update device limit warning message for clarity in zh-CN locale and user request handling 2026-05-06 17:30:10 +08:00
troyeguo
54cbdafae5 feat: add device limit warning message and localization
- Added a new warning message for users who have reached the device limit for their account, prompting them to install the latest mobile version of Koodo Reader to manage devices.
- Updated the Chinese localization file (zh-CN.json) to include the new warning message.
2026-05-06 16:44:26 +08:00
troyeguo
19da74c5b3 Refactor EditDialog component to improve structure and readability; remove redundant backupToSyncJson call in backup utility 2026-05-06 15:02:15 +08:00
troyeguo
66a4c87444 Remove unnecessary console logs from various components to clean up the codebase and improve readability. 2026-05-06 09:52:01 +08:00
troyeguo
9b9545cfd6 feat: add handleFetchUserInfo action and update UNSAFE_componentWillMount for user info fetching 2026-05-06 08:27:18 +08:00
troyeguo
ae9abf4702 fix bug 2026-05-05 16:35:53 +08:00
troyeguo
ecc0ba6085 fix: remove browser support and extension requirement from driveList entries 2026-05-05 08:05:09 +08:00
troyeguo
bac34db58a Refactor vexOpenAsync call to remove title prompt in DataSetting component 2026-05-05 07:58:23 +08:00
troyeguo
d382f52d9f feat: add support for browser extension requirement in drive settings
- Updated zh-CN localization to include a message about CORS restrictions and the need for a browser extension.
- Modified driveList to include a `needExtension` property for drives that require the extension.
- Implemented a confirmation dialog in SyncSetting component to guide users to the extension installation if they select a drive that requires it.
2026-05-03 17:54:21 +08:00
troyeguo
351da80ee1 fix: update driveList support to include browser for Yandex, Yiyiwu, and PCloud
chore: add crypto-js dependency to yarn.lock
2026-05-03 10:31:15 +08:00
troyeguo
c35dcb7dd3 Merge branch 'dev' of https://github.com/koodo-reader/koodo-reader into dev 2026-05-03 09:51:44 +08:00
troyeguo
9b18f473dd Merge pull request #1598 from sebastiondev/fix/cwe942-httpserver-permissive-d7a8
fix(httpServer): restrict CORS to allow-listed origins (CWE-942)
2026-05-03 09:47:38 +08:00
troyeguo
3b8d85f6d1 feat: add Footer component for site-specific information display 2026-05-03 09:32:25 +08:00
troyeguo
d3ae261481 refactor: update event handling in AccountSetting and SyncSetting components for improved clarity and consistency 2026-05-02 22:37:09 +08:00
troyeguo
206ef63d86 Update driveList to include browser support for dubox 2026-05-02 22:03:44 +08:00
troyeguo
3867f66285 refactor: update select value bindings in various components for improved state management 2026-05-02 18:48:06 +08:00
troyeguo
e9ef3fc1a3 refactor: simplify key prop assignment in BookList render method 2026-05-02 17:58:12 +08:00
troyeguo
e7f65a7b90 refactor: update supportedFormats handling to use CommonTool for MIME type mapping 2026-05-02 17:34:15 +08:00
troyeguo
833d28d1ee refactor: replace deprecated refs with React.createRef in SearchBox component 2026-05-02 17:30:13 +08:00
troyeguo
8473feecc0 Enhance file import functionality and update drive support options
- Updated the file import component to convert supported formats to the new react-dropzone v14+ accept format.
- Changed the 'accept' prop in the ImportLocal component to use the new format.
- Modified the driveList to include 'browser' as a supported platform for the 'adrive' option, in addition to 'desktop' and 'phone'.
2026-05-02 17:27:18 +08:00
troyeguo
96b1e781ee feat: implement update intervals for text accumulation in PopupAssist, PopupDict, and PopupTrans components 2026-05-02 15:57:28 +08:00
troyeguo
d99b127c52 fix bug 2026-05-02 15:23:47 +08:00
troyeguo
99e09fa3d0 Refactor AI model handling and localization updates
- Updated localization strings in zh-CN.json for AI features to remove spaces.
- Refactored AISetting component to load AI models from ConfigService instead of plugins.
- Removed legacy plugin handling and migrated AI model entries to ConfigService.
- Updated plugin fetching logic to accommodate new AI model structure.
- Cleaned up unused imports and adjusted related interfaces accordingly.
2026-05-02 12:15:36 +08:00
troyeguo
242128a3fa feat: add option to add new parser in dropdown list 2026-05-02 10:49:22 +08:00
Sebastion
271eaed9f8 address review: allow same-origin requests, only enforce CORS on cross-origin 2026-05-01 11:10:59 +01:00
troyeguo
59182359fb feat: add update check functionality and improve version display in AboutSetting 2026-05-01 17:52:46 +08:00
troyeguo
dc0f988d2f fix: ensure stable version check is correctly implemented in update process 2026-05-01 17:29:38 +08:00
troyeguo
b3f4c5f530 fix: handle empty nodeTextList in getSpeechStartIndex method 2026-05-01 16:28:09 +08:00
troyeguo
0cba47491b feat: add separate style option for books
- Added a new setting to enable a separate style for individual books in the reader settings.
- Updated the localization file to include the new setting text in Chinese.
- Modified the SettingSwitch component to manage the state of the separate style setting.
- Enhanced the setting panel to clear separate style configurations when clearing all styles.
- Updated the viewer component to recognize when a book has a separate style applied.
2026-05-01 16:08:44 +08:00
Sebastion
d20921e9d0 fix(httpServer): restrict CORS to allow-listed origins (CWE-942)
Previously the file server unconditionally returned
Access-Control-Allow-Origin: * together with
Access-Control-Allow-Credentials: true. While most browsers reject
that combination, several edge cases (HTTP/2 intermediaries, non-
browser clients, and reverse proxies that rewrite ACAO) still permit
cross-origin authenticated requests, allowing CSRF-style abuse of
/upload, /delete, etc.

This change introduces an ALLOWED_ORIGINS env var. The server now:
  * Echoes the request Origin only when it appears in the allow list
  * Sends Allow-Credentials: true only alongside an explicit origin
  * Adds Vary: Origin to prevent cache poisoning
  * Rejects cross-origin requests with a non-allow-listed Origin
  * Defaults to no allow-listed origins (same-origin only)
2026-05-01 03:34:38 +01:00
troyeguo
d28aa4c7fc fix: improve translation for chapter title description in Chinese locale 2026-05-01 09:52:44 +08:00
troyeguo
92400c7a9d feat: update AI service selection to handle menu state changes 2026-05-01 09:12:04 +08:00
troyeguo
81c3b8a962 fix bug 2026-05-01 07:47:00 +08:00
troyeguo
f5a8034380 feat: add account login option styles and update login method selection UI 2026-04-30 18:23:53 +08:00
troyeguo
8ccf729408 feat: refactor handleAddLoginOption to accept value directly and update login method selection UI 2026-04-30 18:06:54 +08:00
troyeguo
abb2a764dd feat: implement backup functionality using streaming zip creation 2026-04-30 17:24:49 +08:00
troyeguo
a3c0e1b3d3 feat: enhance search list rendering with chapter title display 2026-04-30 16:26:45 +08:00
troyeguo
7270a161df feat: update ConvertDialog to adjust position based on setting lock state
- Modified the style of the ConvertDialog component to dynamically set the right position based on the isSettingLocked prop.
- Added isSettingLocked to the mapStateToProps in the ConvertDialog index file to connect the state.
- Updated the ConvertDialogProps interface to include isSettingLocked.
- Changed the display name of the plugin in the SettingDialog component to use item.name instead of item.plugin.displayName for consistency.
2026-04-30 11:01:10 +08:00
troyeguo
862a7799da Prevent rendering when the first chapter is labeled "Chapter 0" 2026-04-29 17:42:18 +08:00