From 8ff3d1298edc1cd3c267ca2c8c61365cbb357216 Mon Sep 17 00:00:00 2001
From: Dorian
Date: Wed, 4 Mar 2026 00:21:20 +0000
Subject: [PATCH] feat(nostr): zap dialog with LNURL-pay and QR (M11.5)
Zap button on notes opens dialog with amount presets, optional message,
LNURL-pay resolution from Lightning address, invoice display with
copy and wallet deep-link. Never holds funds.
Co-Authored-By: Claude Opus 4.6
---
.../app/src/components/content/NostrGrid.vue | 26 ++
.../app/src/components/content/ZapDialog.vue | 225 ++++++++++++++++++
2 files changed, 251 insertions(+)
create mode 100644 packages/app/src/components/content/ZapDialog.vue
diff --git a/packages/app/src/components/content/NostrGrid.vue b/packages/app/src/components/content/NostrGrid.vue
index 25f37f2f..38b492c9 100644
--- a/packages/app/src/components/content/NostrGrid.vue
+++ b/packages/app/src/components/content/NostrGrid.vue
@@ -154,6 +154,12 @@
{{ note.content }}
+
+
+
+
@@ -199,6 +213,7 @@ import { ref, computed, onMounted, nextTick } from 'vue'
import NostrDMs from './NostrDMs.vue'
import NostrRelayManager from './NostrRelayManager.vue'
import NostrProfileEditor from './NostrProfileEditor.vue'
+import ZapDialog from './ZapDialog.vue'
import { useNostr, type NostrNote, type PublishResult } from '@/composables/useNostr'
import { useNostrIdentity } from '@/composables/useNostrIdentity'
@@ -223,6 +238,17 @@ const composeRef = ref(null)
const isPublishing = ref(false)
const publishResults = ref([])
+const zapOpen = ref(false)
+const zapTargetName = ref('')
+const zapLightningAddress = ref(undefined)
+
+function openZap(note: NostrNote) {
+ zapTargetName.value = note.authorName ?? note.pubkey.slice(0, 12)
+ // In a full implementation, we'd fetch the profile to get their Lightning address
+ zapLightningAddress.value = undefined
+ zapOpen.value = true
+}
+
const noteKinds = [
{ id: 1, label: 'Notes' },
{ id: 30023, label: 'Articles' },
diff --git a/packages/app/src/components/content/ZapDialog.vue b/packages/app/src/components/content/ZapDialog.vue
new file mode 100644
index 00000000..5be0abd7
--- /dev/null
+++ b/packages/app/src/components/content/ZapDialog.vue
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+
+
{{ targetName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Scan or tap to pay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Open in wallet
+
+
+
+
+
{{ error }}
+
+
+
+
+