Merge pull request #110 from PR0M3TH3AN/codex/add-zap-button-to-video-player-modal

Add zap button to video modal
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2025-09-25 20:17:50 -04:00
commit a05e0c77fd
2 files changed
+20

No files matched your search

+13
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
+7
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) {