Files
Thiago Vinhas aece7ddc15 feat: Added copy text to clipboard from kvm using OCR (#1207)
* [FEATURE] Added copy text to clipboard from kvm using OCR

* fix: make OCR overlay cover full viewport

Change the semi-transparent background from absolute to fixed
positioning so it extends to the viewport edges, covering the
letterbox/pillarbox areas outside the video container.

* refactor: use Card component for OCR selection size indicator

Replace the manually-styled div with the Card component for the
selection size indicator, consistent with the project's component
library.

* feat: use ConfirmDialog for OCR processing indicator

* refactor: use ConfirmDialog for OCR result panel

* fix: make OCR result textarea readonly with text pre-selected

* refactor: use Cancel and Copy CTAs for OCR dialogs

* chore: machine translate OCR localization keys

* fix: address OCR copy-paste review feedback

  - Fix cursor-pointer showing on disabled button in ConfirmDialog
  - Change CTA from "Copy" to "Copy text" for clarity
  - Fix selection breaking when mouse leaves viewport during drag
  - Add children prop to ConfirmDialog; use description for helper text
  - Fix clipboard.writeText failing in insecure contexts with fallback

* fix: address remaining OCR review feedback

  - Merge processing and result into a single ConfirmDialog so the modal
    doesn't flicker when OCR completes quickly
  - Add dark:text-white to the selection size pill Card
  - Remove duplicate toast in the execCommand fallback (the copy event
    listener already handles it)
  - Sequence dialog close → unmount so HeadlessUI's leave transition plays

* fix: prevent OCR dialog content flash during close animation

When closing the OCR result dialog, the title briefly flashed back to
"Recognizing text..." during the exit animation. This happened because
closeOverlay reset status to "idle" to close the dialog, but the
dialog content ternaries also depended on status, causing them to
evaluate incorrectly during the 200ms HeadlessUI leave transition.

Fix by introducing an isClosing flag that controls the dialog's open
prop independently, leaving status unchanged so dialog content remains
stable during the exit animation.
2026-03-16 14:44:29 +01:00
..