mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-03-11 05:18:32 +00:00
Add zap button placeholder on channel profiles
This commit is contained in:
13
assets/svg/lightning-bolt.svg
Normal file
13
assets/svg/lightning-bolt.svg
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="white"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 263 B |
@@ -47,6 +47,8 @@ export async function initChannelProfileView() {
|
|||||||
if (btn) btn.classList.add("hidden");
|
if (btn) btn.classList.add("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setupZapButton();
|
||||||
|
|
||||||
// 4) Load user’s profile (banner, avatar, etc.)
|
// 4) Load user’s profile (banner, avatar, etc.)
|
||||||
await loadUserProfile(hexPub);
|
await loadUserProfile(hexPub);
|
||||||
|
|
||||||
@@ -54,6 +56,22 @@ export async function initChannelProfileView() {
|
|||||||
await loadUserVideos(hexPub);
|
await loadUserVideos(hexPub);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setupZapButton() {
|
||||||
|
const zapButton = document.getElementById("zapButton");
|
||||||
|
if (!zapButton) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (zapButton.dataset.initialized === "true") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
zapButton.addEventListener("click", () => {
|
||||||
|
window.alert("Zaps coming soon.");
|
||||||
|
});
|
||||||
|
zapButton.dataset.initialized = "true";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders a Subscribe / Unsubscribe button with an icon,
|
* Renders a Subscribe / Unsubscribe button with an icon,
|
||||||
* using color #fe0032 and the subscribe-button-icon.svg on the left.
|
* using color #fe0032 and the subscribe-button-icon.svg on the left.
|
||||||
|
|||||||
@@ -43,7 +43,21 @@
|
|||||||
|
|
||||||
<!-- Area for Subscribe/Unsubscribe button -->
|
<!-- Area for Subscribe/Unsubscribe button -->
|
||||||
<div class="px-4 my-4">
|
<div class="px-4 my-4">
|
||||||
<div id="subscribeBtnArea" class="hidden"></div>
|
<div class="flex items-center gap-3">
|
||||||
|
<button
|
||||||
|
id="zapButton"
|
||||||
|
type="button"
|
||||||
|
class="icon-button"
|
||||||
|
aria-label="Send a zap"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="assets/svg/lightning-bolt.svg"
|
||||||
|
alt="Zap"
|
||||||
|
class="icon-image"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<div id="subscribeBtnArea" class="hidden"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="my-6" />
|
<hr class="my-6" />
|
||||||
|
|||||||
Reference in New Issue
Block a user