feat: add image editor by CorrectRoadH · Pull Request #12330 · logseq/logseq
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds an in-app image editor for image asset blocks (crop + rotate), gated to supported image formats and disabled on mobile, integrating it into the existing asset dropdown/actions and UI event system.
Changes:
- Added new image editor modal component (rotate/crop + save back to the original asset).
- Wired a new UI event (
:editor/show-block-image-editor) to open the editor dialog with i18n title and unsupported-format warning. - Added asset dropdown entry (“Edit image”) and new i18n strings (EN + zh-CN).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/resources/dicts/zh-cn.edn |
Adds zh-CN strings for the new image editor actions and notifications. |
src/resources/dicts/en.edn |
Adds English strings for the new image editor actions and notifications. |
src/main/frontend/handler/events/ui.cljs |
Adds a UI event handler to open the image editor dialog and handle unsupported formats. |
src/main/frontend/components/block_image_editor.cljs |
Introduces the new image editor implementation (canvas rotate/crop + save). |
src/main/frontend/components/block.cljs |
Adds the “Edit image” dropdown action and introduces reload behavior for refreshed asset rendering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.