mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
* Initial plan * ✨ feat: Add print to PDF and save as HTML for mini program webviews - Add IPC channels for Webview_PrintToPDF and Webview_SaveAsHTML - Implement printWebviewToPDF and saveWebviewAsHTML functions in WebviewService - Add keyboard shortcuts handlers (Cmd/Ctrl+P for print, Cmd/Ctrl+S for save) - Update WebviewContainer to handle keyboard shortcuts and trigger print/save actions - Add preload API methods for webview print and save operations Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * ♻️ refactor: Improve webview ID handling and remove unused import - Get webviewId dynamically when shortcuts are triggered instead of caching - Remove unused 'join' import from WebviewService - Add null check for webviewId in shortcut handler Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🐛 fix: Improve doctype serialization for better cross-browser compatibility - Use direct DOCTYPE construction instead of XMLSerializer - More reliable across different browser contexts - Based on code review feedback Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * ✨ enhance: Complete DOCTYPE support with publicId and systemId - Add full DOCTYPE construction including publicId and systemId - Fix grammar in comment (custom -> with custom logic) - Ensures proper HTML5 and XHTML document types are preserved Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🔒 security: Add input validation and improve code structure - Extract shortcut checking logic into isHandledShortcut helper - Add try-catch in executeJavaScript for safety - Escape quotes in DOCTYPE publicId and systemId - Add optional chaining for documentElement - Provide fallback if doctype properties are unexpected Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🐛 fix: Correct DOCTYPE declaration format and quote escaping - Use single quotes and proper escaping for DOCTYPE attributes - Add SYSTEM keyword for systemId-only cases - Ensure PUBLIC is only used with publicId - Fix quote escaping to use backslashes instead of HTML entities - Properly handle all DOCTYPE declaration formats per HTML/SGML spec Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🐛 fix: Correct JavaScript string escaping for quotes - Fix quote escaping from \\\\\' to \\' - Ensures proper backslash escaping in JavaScript template string - Produces correct \' in the final DOCTYPE string Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * fix(i18n): Auto update translations for PR #11104 * ✨ enhance: Use page title for default filename and improve PDF pagination - Get page title from webview and use it as default filename for both PDF and HTML export - Sanitize filename by removing invalid characters and limiting length - Add preferCSSPageSize option to printToPDF for better multi-page support - Fallback to timestamp-based filename if title is unavailable Addresses reviewer feedback and fixes PDF export only capturing first page issue. Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> * 🎨 style: Fix formatting issues - Remove trailing whitespace in WebviewContainer.tsx - Run biome format and lint to ensure code style compliance Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DeJeune <67425183+DeJeune@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: SuYao <sy20010504@gmail.com> |
||
|---|---|---|
| .. | ||
| ai-sdk-provider | ||
| aiCore | ||
| extension-table-plus | ||
| mcp-trace | ||
| shared | ||