From f34a64b7a1ac644a79b079a43bb8496cfd3550f2 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 3 Oct 2026 22:21:47 -0700 Subject: Profile: tapping the avatar opens the picture full size Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011bvzKaZosXGHkigcGcSzAR --- src/features/messages.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/features/messages.js b/src/features/messages.js index 3a11c60..8744b5c 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -9065,7 +9065,12 @@ export function messagesFeature(ctx) { h('div', { class: 'row gap6', style: 'align-items:center' }, draftPic ? h('div', { class: 'chat-avatar profile-avatar ava-img', style: `background-image:url(${JSON.stringify(draftPic)})` }) - : avatar(pk, 'chat-avatar profile-avatar', false), + // a tap shows the picture itself, full size + : profileOf(pk)?.picture + ? h('div', { style: 'flex:0 0 auto;cursor:zoom-in', role: 'button', 'aria-label': name, + onClick: (e) => { e.stopPropagation(); ctx.openImage && ctx.openImage(profileOf(pk).picture); } }, + avatar(pk, 'chat-avatar profile-avatar', false)) + : avatar(pk, 'chat-avatar profile-avatar', false), h('div', { class: 'col grow', style: 'min-width:0;gap:2px' }, h('div', { class: 'chat-title' }, draft && draft.name.trim() ? draft.name.trim() : name), nip05 ? h('div', { class: 'muted small break' }, nip05) : null, -- cgit v1.2.3