aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-03 13:12:30 -0700
committerAdam Soltys <[email protected]>2026-10-03 13:12:30 -0700
commit543a66ca70323921acf4da9b8e4fca8128cf0b58 (patch)
treed3aef3cd1a703188bae15b95bf06d1911f549334 /src/app.js
parent4444c9ce12cc9c1ed3eca9470e0c1080f80d8027 (diff)
downloadcoinosv3-543a66ca70323921acf4da9b8e4fca8128cf0b58.tar.gz
coinosv3-543a66ca70323921acf4da9b8e4fca8128cf0b58.zip
Feed media views: a grid of pictures, videos to flip through
All / Images / Videos sits under the feed chips (remembered). - Images lays the feed's pictures out as a three-column grid. - Videos opens straight into a full-screen pager: one clip per screen, snapping, the one on screen playing with sound (muted with an Unmute button when the browser refuses), the next a flick or ↓ away. Closing it leaves a grid of the clips. - The pager shows only the media until tapped; a tap shows the author (tap for their profile), the post's words as a caption without the media links (tap to expand), and likes and sats in the bottom right, which also like and zap. - It is a place: Back or Escape closes it. Built outside the morph, so a repaint never restarts a clip; off-screen clips let go of their media. - Near the end of the grid or the pager the feed fetches older posts and new slides are appended. - Toasts now sit above full-screen viewers. tools/feed-media-views-test.js Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ULQZS9MQa6iAsXnrJUD9Du
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app.js b/src/app.js
index 43c5308..7b37ead 100644
--- a/src/app.js
+++ b/src/app.js
@@ -817,7 +817,7 @@ function renderInner() {
const bottomNav = navPage && !lockAsk && !_bootDeciding ? featureHook('bottomNav') : null;
morphChildren(root, [screen, footer(), ...(bottomNav ? [bottomNav] : []), ...(ui.lightbox ? [imageViewer()] : [])]);
promoteLazySrc(root); // sources on the nodes that actually made it into the page
- try { document.documentElement.classList.toggle('no-scroll', !!ui.lightbox); } catch {}
+ try { document.documentElement.classList.toggle('no-scroll', !!(ui.lightbox || ui.mediaPager)); } catch {}
if (fpath) {
const el = nodeAtPath(fpath);
if (el && el !== a && /^(INPUT|SELECT|TEXTAREA|COINOS-TEXT)$/.test(el.tagName)) {
@@ -871,7 +871,7 @@ wallet.subscribe(scheduleRender);
// lightbox: a full-screen photo is a place too — the phone's Back must close
// it, not pop the screen under it (which once walked a viewer straight back
// to the start page, so the photo's × then looked like a logout).
-const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'arkMoveDetail', 'arkReconDetail', 'arkExitDetail', 'giftDetail', 'bump', 'giftMode', 'claimStep', 'chatOpen', 'msgView', 'feedId', 'pubProf', 'arkCoinsPage', 'arkExitPage', 'msgCommunity', 'msgPeer', 'profilePk', 'profEdit', 'profEditFilled', 'profOverThread', 'settingsPage', 'nameEditOpen', 'noteThread', 'userSearch', 'zapSetup', 'hatShop', 'lightbox', 'feedEdit', 'settingsView'];
+const NAV_FIELDS = ['screen', 'tab', 'txDetail', 'arkMoveDetail', 'arkReconDetail', 'arkExitDetail', 'giftDetail', 'bump', 'giftMode', 'claimStep', 'chatOpen', 'msgView', 'feedId', 'pubProf', 'arkCoinsPage', 'arkExitPage', 'msgCommunity', 'msgPeer', 'profilePk', 'profEdit', 'profEditFilled', 'profOverThread', 'settingsPage', 'nameEditOpen', 'noteThread', 'userSearch', 'zapSetup', 'hatShop', 'lightbox', 'mediaPager', 'feedEdit', 'settingsView'];
function navSnapshot() {
const s = {};
for (const f of NAV_FIELDS) s[f] = ui[f] ?? null;
@@ -976,6 +976,7 @@ function restoreNavFromHistory(renderNow = true) {
if (['unlock', 'vault'].includes(nav.screen) && activeAccount()) nav.screen = 'wallet';
for (const f of NAV_FIELDS) if (f in nav) ui[f] = (f === 'profEdit' || f === 'feedEdit') && nav[f] ? structuredClone(nav[f]) : nav[f];
ui.lightbox = null; nav.lightbox = null; // an object URL doesn't survive a reload
+ ui.mediaPager = null; nav.mediaPager = null; // nor does the feed under a media pager, not yet
navStack = [nav];
navIndex = 0;
// A reload is a continuation of the same page, not a navigation. Do not