aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-03 22:03:08 -0700
committerAdam Soltys <[email protected]>2026-10-03 22:03:08 -0700
commit4579d926564697289e3e69973ccea4148b13fc40 (patch)
tree968a2a0e4692dea27d92f153fd76ea0179e4b1d4 /src/features
parent00d02cc83954c691d9809461a9fb499e10f686c2 (diff)
downloadcoinosv3-4579d926564697289e3e69973ccea4148b13fc40.tar.gz
coinosv3-4579d926564697289e3e69973ccea4148b13fc40.zip
Media pager: a button opens the post itself (count of replies on it)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011bvzKaZosXGHkigcGcSzAR
Diffstat (limited to 'src/features')
-rw-r--r--src/features/messages.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 8f6eb2d..9c4b50f 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -9968,6 +9968,8 @@ export function messagesFeature(ctx) {
like.querySelector('.i').innerHTML = I_HEART(!!myReactOn(ev.id));
like.querySelector('.n').textContent = s.likes ? String(s.likes) : '';
zap.classList.toggle('on', sats > 0);
+ const replies = replyCount(ev.id);
+ slide.querySelector('.mp-post .n').textContent = replies ? String(replies) : '';
zap.querySelector('.n').textContent = sats ? fmtSats(sats) : '';
}
function pagerSlide(it) {
@@ -9992,6 +9994,10 @@ export function messagesFeature(ctx) {
(myReactOn(ev.id) ? unreact(ev) : reactTo(ev, '❤️')).catch(() => {}).finally(() => pagerCounts(slide));
setTimeout(() => pagerCounts(slide), 50);
}) }, h('span', { class: 'i', html: I_HEART(false) }), h('span', { class: 'n' })),
+ // the post itself, as the feed would open it: the whole text, the replies
+ h('button', { class: 'mp-post', type: 'button', 'aria-label': t('mediaOpenPost'), title: t('mediaOpenPost'), onClick: stop(() => {
+ leavePager(); openNoteThread(ev);
+ }) }, h('span', { class: 'i', html: I_REPLY }), h('span', { class: 'n' })),
h('button', { class: 'mp-zap', type: 'button', 'aria-label': t('zapTitle'), onClick: stop((e) => {
if (signinAsk()) { leavePager(); render(); return; }
// the first zap ever asks for an amount on a page of its own