Add zap button to video modal

This commit is contained in:
thePR0M3TH3AN
2025-09-25 20:16:05 -04:00
parent 069fcb1b7f
commit 27e45f56b5
2 changed files with 20 additions and 0 deletions

View File

@@ -51,6 +51,19 @@
class="icon-image"
/>
</button>
<!-- Zap Button (circular) -->
<button
id="modalZapBtn"
type="button"
class="icon-button"
aria-label="Send a zap"
>
<img
src="assets/svg/lightning-bolt.svg"
alt="Zap"
class="icon-image"
/>
</button>
<!-- Share Button (circular) -->
<button id="shareBtn" class="icon-button">
<img

View File

@@ -480,6 +480,7 @@ class bitvidApp {
this.creatorNpub = null;
this.copyMagnetBtn = null;
this.shareBtn = null;
this.modalZapBtn = null;
this.modalPosterCleanup = null;
this.cleanupPromise = null;
@@ -845,6 +846,7 @@ class bitvidApp {
// Copy/Share buttons
this.copyMagnetBtn = document.getElementById("copyMagnetBtn") || null;
this.shareBtn = document.getElementById("shareBtn") || null;
this.modalZapBtn = document.getElementById("modalZapBtn") || null;
// Attach existing event listeners for copy/share
if (this.copyMagnetBtn) {
@@ -869,6 +871,11 @@ class bitvidApp {
.catch(() => this.showError("Failed to copy the link."));
});
}
if (this.modalZapBtn) {
this.modalZapBtn.addEventListener("click", () => {
window.alert("Zaps coming soon.");
});
}
// Add click handlers for avatar and name => channel profile
if (this.creatorAvatar) {