- This platform is currently in development and only supports
- Chrome and Firefox-based browsers. Other browsers are not
- supported at this time. You may encounter bugs or missing
- features. Give it a sec. Videos might take 10 to 60 seconds to
- load initially.
-
+
+
+ -->
-
-
- bitvid is a decentralized video platform where content is shared
- directly between users. We want you to understand a few
- important points before you continue:
-
-
-
-
- Early Access Status
-
-
- Currently, video posting is invite-only as we carefully
- scale our platform. While anyone can watch videos, content
- creation is limited to approved creators. This helps us
- maintain quality content during our early stages.
+
+
+
+
+
+
+
+
+
+
+
+ Welcome to bitvid
+
+
+
+
+
+ This platform is currently in development and only supports
+ Chrome and Firefox-based browsers. Other browsers are not
+ supported at this time. You may encounter bugs or missing
+ features. Give it a sec. Videos might take 10 to 60 seconds
+ to load initially.
-
-
- Content Responsibility & Moderation
-
-
- While we don't host videos directly, we maintain community
- standards through access control. Users who violate our
- guidelines may be blocked from accessing the platform. All
- content must follow local laws and platform guidelines.
-
-
-
-
Platform Status
-
- bitvid is a work in progress. Features may change or break,
- and security improvements are ongoing. Your feedback and
- patience help us build a better platform.
-
-
-
-
Get Involved
-
- Are you a developer? We'd love your help! Visit our GitHub
- repository to contribute to building the future of
- decentralized video sharing.
-
+
+ bitvid is a decentralized video platform where content is
+ shared directly between users. We want you to understand a few
+ important points before you continue:
+
+
+
+
+
+ Early Access Status
+
+
+ Currently, video posting is invite-only as we carefully
+ scale our platform. While anyone can watch videos, content
+ creation is limited to approved creators. This helps us
+ maintain quality content during our early stages.
+
+
+
+
+ Content Responsibility & Moderation
+
+
+ While we don't host videos directly, we maintain community
+ standards through access control. Users who violate our
+ guidelines may be blocked from accessing the platform. All
+ content must follow local laws and platform guidelines.
+
+
+
+
+ Platform Status
+
+
+ bitvid is a work in progress. Features may change or
+ break, and security improvements are ongoing. Your
+ feedback and patience help us build a better platform.
+
+
+
+
Get Involved
+
+ Are you a developer? We'd love your help! Visit our GitHub
+ repository to contribute to building the future of
+ decentralized video sharing.
+
+
+
+
+
+
+
-
-
-
@@ -343,15 +405,21 @@
}
}
- // Load the login modal and application form modal
Promise.all([
+ // Existing modals
loadModal("components/login-modal.html"),
loadModal("components/application-form.html"),
+ loadModal("components/content-appeals-form.html"),
+
+ // New forms
+ loadModal("components/general-feedback-form.html"),
+ loadModal("components/feature-request-form.html"),
+ loadModal("components/bug-fix-form.html"),
]).then(() => {
- console.log("Modals loaded (login-modal, application-form)");
+ console.log("Modals loaded.");
//
- // 1) Top nav login button => open the login modal
+ // 1) Login button => open login modal
//
const loginNavBtn = document.getElementById("loginButton");
if (loginNavBtn) {
@@ -364,7 +432,7 @@
}
//
- // 2) Close button on the login modal
+ // 2) Close login modal
//
const closeLoginBtn = document.getElementById("closeLoginModal");
if (closeLoginBtn) {
@@ -377,7 +445,7 @@
}
//
- // 3) “Application Form” button inside the login modal => open the application form
+ // 3) “Application Form” button => open application form
//
const openAppFormBtn = document.getElementById("openApplicationModal");
if (openAppFormBtn) {
@@ -396,7 +464,7 @@
}
//
- // 4) Close button on the application form modal
+ // 4) Close application form
//
const closeNostrFormBtn = document.getElementById(
"closeNostrFormModal"
@@ -409,6 +477,114 @@
}
});
}
+
+ //
+ // 5) ?modal=appeals => open content appeals form
+ //
+ const urlParams = new URLSearchParams(window.location.search);
+ const modalParam = urlParams.get("modal");
+ if (modalParam === "appeals") {
+ const appealsModal = document.getElementById("contentAppealsModal");
+ if (appealsModal) {
+ appealsModal.classList.remove("hidden");
+ }
+ }
+
+ //
+ // 6) Close content appeals modal
+ //
+ const closeAppealsBtn = document.getElementById(
+ "closeContentAppealsModal"
+ );
+ if (closeAppealsBtn) {
+ closeAppealsBtn.addEventListener("click", () => {
+ const appealsModal = document.getElementById("contentAppealsModal");
+ if (appealsModal) {
+ appealsModal.classList.add("hidden");
+ }
+ });
+ }
+
+ //
+ // 7) Show disclaimer modal on page load, hide on "I Understand"
+ //
+ const disclaimerModal = document.getElementById("disclaimerModal");
+ const acceptDisclaimerBtn = document.getElementById("acceptDisclaimer");
+ if (disclaimerModal) {
+ // Show immediately
+ disclaimerModal.classList.remove("hidden");
+ if (acceptDisclaimerBtn) {
+ acceptDisclaimerBtn.addEventListener("click", () => {
+ disclaimerModal.classList.add("hidden");
+ });
+ }
+ }
+
+ //
+ // 8) Query param checks for the three new forms
+ //
+ // ?modal=feedback => open generalFeedbackModal
+ // ?modal=feature => open featureRequestModal
+ // ?modal=bug => open bugFixModal
+ //
+ if (modalParam === "feedback") {
+ const feedbackModal = document.getElementById("generalFeedbackModal");
+ if (feedbackModal) {
+ feedbackModal.classList.remove("hidden");
+ }
+ } else if (modalParam === "feature") {
+ const featureModal = document.getElementById("featureRequestModal");
+ if (featureModal) {
+ featureModal.classList.remove("hidden");
+ }
+ } else if (modalParam === "bug") {
+ const bugModal = document.getElementById("bugFixModal");
+ if (bugModal) {
+ bugModal.classList.remove("hidden");
+ }
+ }
+
+ //
+ // 9) Close buttons for the three new forms
+ //
+ // general feedback
+ const closeFeedbackBtn = document.getElementById(
+ "closeGeneralFeedbackModal"
+ );
+ if (closeFeedbackBtn) {
+ closeFeedbackBtn.addEventListener("click", () => {
+ const feedbackModal = document.getElementById(
+ "generalFeedbackModal"
+ );
+ if (feedbackModal) {
+ feedbackModal.classList.add("hidden");
+ }
+ });
+ }
+
+ // feature request
+ const closeFeatureBtn = document.getElementById(
+ "closeFeatureRequestModal"
+ );
+ if (closeFeatureBtn) {
+ closeFeatureBtn.addEventListener("click", () => {
+ const featureModal = document.getElementById("featureRequestModal");
+ if (featureModal) {
+ featureModal.classList.add("hidden");
+ }
+ });
+ }
+
+ // bug fix
+ const closeBugBtn = document.getElementById("closeBugFixModal");
+ if (closeBugBtn) {
+ closeBugBtn.addEventListener("click", () => {
+ const bugModal = document.getElementById("bugFixModal");
+ if (bugModal) {
+ bugModal.classList.add("hidden");
+ }
+ });
+ }
});
diff --git a/src/js/disclaimer.js b/src/js/disclaimer.js
index 435ea40..8725e00 100644
--- a/src/js/disclaimer.js
+++ b/src/js/disclaimer.js
@@ -2,28 +2,35 @@ class DisclaimerModal {
constructor() {
this.modal = document.getElementById("disclaimerModal");
this.acceptButton = document.getElementById("acceptDisclaimer");
+ // If user previously dismissed the disclaimer, we'll store "true" in localStorage:
this.hasSeenDisclaimer = localStorage.getItem("hasSeenDisclaimer");
+ // Set up the click event for the "I Understand" button
this.setupEventListeners();
}
setupEventListeners() {
- const closeModal = () => {
- this.modal.style.display = "none";
- document.body.style.overflow = "unset";
- localStorage.setItem("hasSeenDisclaimer", "true");
- };
-
- // Only keep the accept button event listener
- this.acceptButton.addEventListener("click", closeModal);
+ if (this.acceptButton) {
+ this.acceptButton.addEventListener("click", () => {
+ // Hide the disclaimer by adding the "hidden" class
+ if (this.modal) {
+ this.modal.classList.add("hidden");
+ }
+ // Mark that the user has seen the disclaimer, so we don't show it again
+ localStorage.setItem("hasSeenDisclaimer", "true");
+ });
+ }
}
show() {
+ // Only show it if the user hasn't seen it before
if (!this.hasSeenDisclaimer) {
- this.modal.style.display = "flex";
- document.body.style.overflow = "hidden";
+ if (this.modal) {
+ this.modal.classList.remove("hidden");
+ }
}
}
}
+// Export an instance that you can import in your main script
export const disclaimerModal = new DisclaimerModal();