From f52c54074448a860c2b7cbaa601e796fde155b0d Mon Sep 17 00:00:00 2001 From: archipelago Date: Wed, 29 Jul 2026 13:51:36 -0400 Subject: [PATCH] fix(peer-files): free-image lightbox, click-to-open routing, in-app open after every payment rail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Card click now dispatches through openItem(): owned -> cached viewer, paid+playable -> 10% preview, paid non-playable -> pay modal (image is never fetched pre-purchase), FREE image -> full-screen lightbox streaming from /api/peer-content (fixes the click no-op where the old ternary fell through to undefined for non-playable free items) - Viewer footer caption is state-aware: green 'Owned · unlocked' only for owned items, neutral 'Free · shared by peer' for free ones; Save streams free files instead of calling content.owned-get - Lightning / invoice-QR / on-chain payment successes now share openPurchased() with the ecash flow: mark owned, autoplay audio in the bottom bar or open image/video in the viewer (previously a browser download that silently fails on the mobile companion) - closeViewer only revokes blob: URLs (free items use plain stream URLs) - Added a regression test: free image click opens the lightbox Co-Authored-By: Claude Fable 5 --- neode-ui/src/views/PeerFiles.vue | 132 +++++++++++++----- .../views/__tests__/PeerFilesRefresh.test.ts | 50 +++++++ 2 files changed, 146 insertions(+), 36 deletions(-) diff --git a/neode-ui/src/views/PeerFiles.vue b/neode-ui/src/views/PeerFiles.vue index 0caf201b..9154d47a 100644 --- a/neode-ui/src/views/PeerFiles.vue +++ b/neode-ui/src/views/PeerFiles.vue @@ -88,7 +88,7 @@

{{ viewerItem.filename.split('/').pop() }}

-

Owned · unlocked

+

Owned · unlocked

+

Free · shared by peer