aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-10 08:26:59 -0700
committerAdam Soltys <[email protected]>2026-10-10 08:26:59 -0700
commit1573c1d5327ebc941f4308e2b0cc88e85a640add (patch)
treedce8dde9381600072ea6a7b1113c773681839e95 /src/features
parent89b16d6363920129744665ceeda5218f6786aaaa (diff)
downloadcoinosv3-1573c1d5327ebc941f4308e2b0cc88e85a640add.tar.gz
coinosv3-1573c1d5327ebc941f4308e2b0cc88e85a640add.zip
GIFs in replies. The thread's reply box gets the same GIF button as the post composer: a pick lands in the draft (preview opened) and the reply goes out with the GIF's NIP-92 imeta. tools/gif-picker-test.js covers it.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3
Diffstat (limited to 'src/features')
-rw-r--r--src/features/messages.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index b271bc9..5040b0f 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -10012,6 +10012,7 @@ export function messagesFeature(ctx) {
});
},
}),
+ gifs.button('reply', 'attach-btn gif-btn'),
h('span', { class: 'grow' }),
h('div', { class: 'row gap6 composer-options' },
previewBtn(!!s.preview, () => { s.preview = !s.preview; render(); }),
@@ -10038,7 +10039,16 @@ export function messagesFeature(ctx) {
} catch (e) { if (!e.silent) toast(e.message); }
s.sending = false; render();
},
- }, s.sending ? h('span', { class: 'spinner sm' }) : t('threadReplySend'))));
+ }, s.sending ? h('span', { class: 'spinner sm' }) : t('threadReplySend'))),
+ // a picked GIF lands in the draft like an attachment, with its imeta
+ gifs.sheet('reply', (g) => {
+ s.draft = ((s.draft || '').replace(/\s+$/, '') + ' ' + g.url).trim();
+ (ui.postMedia ||= []).push(gifMedia(g));
+ const inp = document.querySelector('.thread-reply-input');
+ if (inp) inp.value = s.draft;
+ s.preview = true;
+ render();
+ }));
// rows with the reply box slotted under the focused note (the root when
// nothing narrower is focused; appended at the end if the focused note
// hasn't loaded yet, so the box never disappears entirely)