Copy photo event IDs reliably, add "Copy share link" #138

Merged
raucao merged 3 commits from copy-photo-id into master 2026-11-29 13:35:07 +00:00
3 Commits
Author SHA1 Message Date
raucao 543d810ab2 Remove the unused canUseClipboard helper
CI / Lint (pull_request) Successful in 55s
CI / Test (pull_request) Successful in 1m22s
Release Drafter / Update release notes draft (pull_request) Successful in 15s
canCopyText covers the same capability checks and is the one the app actually uses.
2026-11-29 17:31:45 +04:00
raucao 47830f7224 Add a Copy share link action to the photo gallery
CI / Lint (pull_request) Successful in 48s
CI / Test (pull_request) Successful in 1m10s
The new menu item copies an absolute <origin>/e/<nevent> link. The /e/ route resolves the event from relays, reads its i tag and opens the place with the photo focused, so recipients land directly on the photo in Marco.

Extract the nevent-building logic into buildEventReference() so the raw event ID copy and the share link share one implementation, and use sentence case for the menu labels.
2026-11-29 17:27:17 +04:00
raucao d8365b4ce6 Copy via the shared clipboard helper and keep the gallery open
The photo event ID button called navigator.clipboard.writeText directly, so copying failed on insecure origins where that API is unavailable. Route it (and the invoice and connection-link copies) through app/utils/share.js copyText, which falls back to execCommand.

copyEventId also never stopped the click from bubbling. Because closeMenu() runs after an await, the dropdown unmounted before the event reached the overlay's background-click handler, whose detached-target check then closed the gallery. Stop propagation synchronously like the zap and delete actions.
2026-11-29 17:20:07 +04:00