diff --git a/plugins/dagu-ocr/CHANGELOG.md b/plugins/dagu-ocr/CHANGELOG.md index a61fb84e2..21330837f 100644 --- a/plugins/dagu-ocr/CHANGELOG.md +++ b/plugins/dagu-ocr/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 1.2.3 - 2026-11-12 + +### 新增 + +- 固定截图支持右键菜单:复制、删除、编辑、OCR 与翻译;编辑以当前固定图片重新进入标注器,OCR / 翻译会回到主页面处理。 + +### 修复 + +- 修复固定截图被普通窗口遮挡和拖动不跟随的问题:创建固定窗口后重新声明置顶,并禁用图片原生拖拽,让指针拖动始终移动窗口。 +- 修复固定截图右键 OCR / 翻译可能无响应的问题:固定期间不再退出插件主视图,并等待识别处理完成后再关闭固定子窗口,避免宿主回收插件进程或把主窗口保持在 0 高度。 + ## 1.2.2 - 2026-11-11 ### 修复 diff --git a/plugins/dagu-ocr/README.md b/plugins/dagu-ocr/README.md index e92e70bbf..5dcb8d67e 100644 --- a/plugins/dagu-ocr/README.md +++ b/plugins/dagu-ocr/README.md @@ -5,7 +5,7 @@ 常见用法举几个例子: - 想给别人圈重点 → 截图后直接在全屏画面上框选、画矩形/箭头、加文字,再复制成图片发出去。 -- 想把截图钉在屏幕上做参考 → 截图后点「固定」,图片会置顶显示,可拖动、滚轮缩放。 +- 想把截图钉在屏幕上做参考 → 截图后点「固定」,图片会置顶显示,可拖动、滚轮缩放,右键还能继续复制、编辑、OCR 或翻译。 - 随手截了张图想裁剪、打马赛克 → 用「编辑图片」就地处理。 - 截图里的字看不清,想变成可复制文本 → 截图后点「图片 OCR」。 - 遇到一段英文/日文,想看懂 → 选中图片点「翻译」,或直接在输入框里粘贴文字翻译。 @@ -20,6 +20,10 @@  +固定截图:右键可直接复制、删除、编辑、OCR 或翻译;「编辑」会以这张固定图重新进入标注器。 + + + 主工作区:左边是当前图片(可滚轮放大、拖动查看),右边是识别结果(可直接编辑),左右等宽;图片标题行可复制图片,下方可以复制结果、重新识别或翻译。  diff --git a/plugins/dagu-ocr/docs/screenshots/pin-context-menu.png b/plugins/dagu-ocr/docs/screenshots/pin-context-menu.png new file mode 100644 index 000000000..947ccebe7 Binary files /dev/null and b/plugins/dagu-ocr/docs/screenshots/pin-context-menu.png differ diff --git a/plugins/dagu-ocr/pin.html b/plugins/dagu-ocr/pin.html index 49e63a34d..7d43e354b 100644 --- a/plugins/dagu-ocr/pin.html +++ b/plugins/dagu-ocr/pin.html @@ -12,7 +12,10 @@ cursor: move; user-select: none; } - #pin-image { width: 100%; height: 100%; display: block; object-fit: fill; } + #pin-image { + width: 100%; height: 100%; display: block; object-fit: fill; + touch-action: none; -webkit-user-drag: none; + } #pin-close { position: fixed; top: 6px; right: 6px; width: 26px; height: 26px; @@ -32,12 +35,35 @@ opacity: 0; transition: opacity .18s ease; pointer-events: none; } #pin-hint.visible { opacity: 1; } + #pin-menu { + position: fixed; z-index: 20; min-width: 108px; padding: 4px; + max-height: calc(100% - 8px); overflow-y: auto; + display: flex; flex-direction: column; gap: 2px; + border: 1px solid rgba(148, 163, 184, .32); border-radius: 10px; + background: rgba(17, 20, 24, .94); box-shadow: 0 12px 30px rgba(15, 23, 42, .32); + backdrop-filter: blur(8px); + } + #pin-menu[hidden] { display: none; } + #pin-menu button { + display: flex; align-items: center; min-height: 26px; padding: 0 10px; + border: none; border-radius: 7px; background: transparent; color: #e5e7eb; + font: 400 12px/1 Inter, "Segoe UI", "Microsoft YaHei", sans-serif; + cursor: pointer; text-align: left; + } + #pin-menu button:hover, #pin-menu button:focus-visible { background: #0ea5e9; color: #fff; outline: none; }