aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-01 16:36:25 -0700
committerAdam Soltys <[email protected]>2026-10-01 16:36:42 -0700
commit62b6b80d9c8d03d6caadb0648059ba94e34f8b1d (patch)
tree5b000d01723975b091fdaa1bda20e6ff84139dd8 /src/features
parentbf42c148664cc97c6b3fd0c66014883de875adc7 (diff)
downloadcoinosv3-62b6b80d9c8d03d6caadb0648059ba94e34f8b1d.tar.gz
coinosv3-62b6b80d9c8d03d6caadb0648059ba94e34f8b1d.zip
Clear abandoned payments, reset profile Pay and restore native messaging Back
Diffstat (limited to 'src/features')
-rw-r--r--src/features/ark.js7
-rw-r--r--src/features/messages.js17
-rw-r--r--src/features/names.js1
-rw-r--r--src/features/zaps.js1
4 files changed, 18 insertions, 8 deletions
diff --git a/src/features/ark.js b/src/features/ark.js
index 566c402..8fe21cc 100644
--- a/src/features/ark.js
+++ b/src/features/ark.js
@@ -1895,7 +1895,7 @@ export function arkFeature(ctx) {
function arkZapView() {
// While resolving, show the SHAPE of the card that's coming — same
- // title, same recipient chip, a spinner where the form will be. The
+ // title, same recipient portrait, a spinner where the form will be. The
// screen fills in rather than being replaced.
if (ui.arkZap && ui.arkZap.status === 'lookup') return zapSkeleton(ui.arkZap.pk, ui.arkZap.npub);
if (ui.arkZapped) {
@@ -3488,6 +3488,11 @@ export function arkFeature(ctx) {
}
return false;
},
+ resetSend() {
+ ui.arkLnFromSavings = null; ui.arkLnFromSavingsOk = false; ui.arkOffboardSend = null;
+ ui.arkLnPaid = null; ui.arkLnPay = null; ui.arkZapped = null; ui.arkZap = null;
+ ui.arkSent = null; ui.arkSend = null;
+ },
sendView() {
if (ui.arkLnFromSavings) return arkLnFromSavingsView();
if (ui.arkOffboardSend) return arkOffboardSendView();
diff --git a/src/features/messages.js b/src/features/messages.js
index 7ebc28e..54cbfa3 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -2964,10 +2964,10 @@ export function messagesFeature(ctx) {
//
// The thumbnail we keep locally is the whole picture at this size, so
// a 30px circle never asks the network for the original again. The
- // 64px profile avatar layers them: CSS paints the first layer that
+ // Larger profile/payment avatars layer them: CSS paints the first layer that
// has arrived, so the thumbnail shows instantly and the full-size
// original takes over on top when it lands.
- ? h('div', { class: cls + ' ava-img', style: 'background-image:' + avatarBg(p, cls.includes('profile-avatar')) })
+ ? h('div', { class: cls + ' ava-img', style: 'background-image:' + avatarBg(p, cls.includes('profile-avatar') || cls.includes('send-avatar')) })
: fallbackAvatar(h, pk, p.name, cls);
// A face we keep painting is one worth keeping a thumbnail of.
if (!feedPaint && p && p.picture) makeThumb(pk, p);
@@ -7924,7 +7924,8 @@ export function messagesFeature(ctx) {
ui.noteThread = null;
ui.userSearch = null;
ui.chatOpen = false;
- ctx.showSend(); // and never a lingering payment detail
+ ctx.showSend({ fresh: true });
+ ui.send.recipients[0].address = npubStr;
render();
hook('matchSendText', npubStr);
} }, t('profPay')),
@@ -7988,7 +7989,8 @@ export function messagesFeature(ctx) {
...noteOverlays());
}
- const backBtn = (onClick) => h('button', { class: 'iconbtn chat-back', onClick }, '‹');
+ const backBtn = (toParent) => h('button', { class: 'iconbtn chat-back',
+ onClick: () => ctx.goBack(toParent) }, '‹');
// ---- the post composer ----------------------------------------------------
// Shared by the profile page and the feed. A picture is uploaded the moment
@@ -9982,10 +9984,11 @@ export function messagesFeature(ctx) {
// Accounts page switches to that identity before showing its profile)
profileChip(pk, size, onOpen) {
const big = size === 'lg';
- return h('span', {
- class: 'zap-chip' + (big ? ' lg' : ''),
+ return h(big ? 'button' : 'span', {
+ class: big ? 'send-person' : 'zap-chip',
+ type: big ? 'button' : undefined,
onClick: (e) => { e.stopPropagation(); if (onOpen) onOpen(); else openProfile(pk); },
- }, avatar(pk, 'chat-avatar ' + (big ? 'chip-lg' : 'mini'), false),
+ }, avatar(pk, 'chat-avatar ' + (big ? 'send-avatar' : 'mini'), false),
h('span', { class: big ? '' : 'small' }, displayName(pk)));
},
// A sign-in (Google, passkey, key) that found no wallet on its identity:
diff --git a/src/features/names.js b/src/features/names.js
index a34334f..8f37b36 100644
--- a/src/features/names.js
+++ b/src/features/names.js
@@ -929,6 +929,7 @@ export function namesFeature(ctx) {
if (!ui.send || ui.send.recipients.length !== 1) return false;
return beginResolve(text);
},
+ resetSend() { ui.nameResolve = null; },
// DNS resolution takes visible time — say so under the recipient field
// instead of leaving a picked name looking ignored.
sendFormNote(a) {
diff --git a/src/features/zaps.js b/src/features/zaps.js
index d6b2271..7a5f335 100644
--- a/src/features/zaps.js
+++ b/src/features/zaps.js
@@ -464,6 +464,7 @@ export function zapsFeature(ctx) {
begin({ kind: 'npub', pk, eventId: eventId || null }, shortNpub(npub || npubOf(pk)));
return true;
},
+ resetSend() { ui.zap = null; },
sendView() { return zapView(); },
// Settings → Nostr: the one-tap zap amount.
nostrSettingsCards() {