Skip to content

Feature/photo share#105

Merged
GeniJaho merged 14 commits intomainfrom
feature/photo-share
Apr 4, 2026
Merged

Feature/photo share#105
GeniJaho merged 14 commits intomainfrom
feature/photo-share

Conversation

@FredMark
Copy link
Copy Markdown
Collaborator

New functionality:
If you are on a photo that is interesting, you can click the 'share' button,
It will create a new link that you can share with somebody,

The other person can open the link and without logging in, it will see the photo and most of the meta-data

@GeniJaho GeniJaho force-pushed the feature/photo-share branch from e8c786a to 729a21e Compare April 2, 2026 20:07
GeniJaho added 8 commits April 2, 2026 22:44
- Move share token generation logic into GenerateShareTokenAction
- Extract share endpoint to invokable SharePhotoController
- Remove global $appends on Photo model, append full_path only where needed
- Remove user data from shared photo page (privacy)
- Fix isShareable() redundant instanceof check, remove stale phpstan baseline entries
- Fix ShareIcon double-wrapping and console.log → console.error
- Add 10 feature tests covering share link generation, access control, and expiry
- Show user profile photo (with initials fallback) on shared photo page
- Load only user name and profile_photo_path for privacy
- Translate all Dutch text to English (share page, modal, badges)
- Move share button from photo overlay to between Previous/Next buttons
- Delete ShareIcon component, use inline icon instead
- Fix clipboard copy using execCommand fallback for non-HTTPS contexts
Build explicit data array in ShareController instead of serializing
the full Photo model. Only exposes the fields the share page needs:
image path, file name, date, view count, user name/photo, and item
details with tags.
Users can choose Never, 7, 30, or 90 days expiry when sharing a photo.
The modal shows expiry options first, then the generated link with
expiry date. Each share generation creates a fresh token with the
chosen expiry. The shared photo page displays the expiry date.
- Only generate a new token if one doesn't exist, otherwise just
  update the expiry date
- Extract validation to SharePhotoRequest
- Add test for updating expiry on existing token
- Introduced `RevokeSharePhotoController` with new route to revoke share links.
- Updated `Show.vue` to include a "Delete link" button in the share modal.
- Added feature tests for share link revocation, access control, and guest restrictions.
@GeniJaho GeniJaho merged commit dc554be into main Apr 4, 2026
3 checks passed
@GeniJaho GeniJaho deleted the feature/photo-share branch April 4, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants