This commit is contained in:
2025-02-02 20:49:20 -05:00
parent bd614ef97e
commit 082626deea
2 changed files with 71 additions and 116 deletions

View File

@@ -1,9 +1,5 @@
<!-- components/content-appeals-form.html
// https://bitvid.network?modal=appeals => open contentAppealsModal
//
// Admin: npub13yarr7j6vjqjjkahd63dmr27curypehx45ucue286ac7sft27y0srnpmpe
// Form:
// Responces:
https://bitvid.network?modal=appeals => open contentAppealsModal
-->
<div
id="contentAppealsModal"
@@ -26,11 +22,13 @@
<div
class="modal-content bg-gray-900 w-full max-w-[90%] lg:max-w-6xl my-0 rounded-lg overflow-hidden relative"
>
<!-- Header bar (sticky) with exit button -->
<!-- Header bar (sticky) with improved title styling -->
<div
class="sticky top-0 bg-gradient-to-b from-black/80 to-transparent p-4 flex items-center justify-between"
class="sticky top-0 bg-gradient-to-b from-black/80 to-transparent p-4 flex items-center justify-between border-b border-gray-700"
>
<h2 class="text-2xl font-bold text-white mb-0">Content Appeals Form</h2>
<h2 class="text-3xl font-extrabold text-white tracking-wide pb-2">
Content Appeals Form
</h2>
<button
id="closeContentAppealsModal"
class="flex items-center justify-center w-10 h-10 rounded-full bg-black/50 hover:bg-black/70 transition-all duration-200 backdrop-blur focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-black focus:ring-blue-500"

View File

@@ -8,13 +8,21 @@
<style>
/* Override for form page to match modal field styling */
/* Make body text white and background transparent */
/* Remove width constraints from body so our container can be full width */
body {
background-color: transparent;
color: #fff;
font-family: system-ui, -apple-system, sans-serif;
margin: 20px;
max-width: 800px;
/* Removed max-width */
}
/* Override the .container to use the full available width */
.container {
width: 100%;
max-width: 100%;
margin: 0;
padding: 0;
}
/* Card-like container for the form, similar to modal-content */
@@ -116,29 +124,18 @@
<body>
<div class="container">
<div class="form-container">
<h1>bitvid Content Appeals Form</h1>
<p>
If you believe your content was unfairly blocked or restricted on bitvid,
please complete this form. Appeals will be reviewed manually, and
decisions will be communicated back to you.
</p>
<form id="dm-form">
<h2>1. User Information</h2>
<label for="npubInput">Nostr Public Key (npub):</label>
<input
type="text"
id="npubInput"
placeholder="Enter your npub"
required
/>
<input type="text" id="npubInput" placeholder="Enter your npub" required />
<label for="contactMethod">Contact Method (if applicable):</label>
<input
type="text"
id="contactMethod"
placeholder="Nostr DM, email, or other"
/>
<input type="text" id="contactMethod" placeholder="Nostr DM, email, or other" />
<h2>2. Content Details</h2>
<label for="videoTitle">Title of the Video:</label>
@@ -151,36 +148,20 @@
<input type="date" id="submissionDate" />
<h2>3. Reason for Appeal</h2>
<label for="reasonBlocked"
>Why do you believe your content was unfairly blocked?</label
>
<textarea
id="reasonBlocked"
rows="3"
placeholder="Explain in detail"
></textarea>
<label for="reasonBlocked">Why do you believe your content was unfairly blocked?</label>
<textarea id="reasonBlocked" rows="3" placeholder="Explain in detail"></textarea>
<label for="fitsGuidelines"
>Does your content fit within bitvid's Community Guidelines?</label
>
<label for="fitsGuidelines">Does your content fit within bitvid's Community Guidelines?</label>
<select id="fitsGuidelines">
<option value="">Select an option</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
<label for="guidelinesCited"
>If yes, which guideline(s) support your appeal?</label
>
<textarea
id="guidelinesCited"
rows="2"
placeholder="Cite the specific guidelines"
></textarea>
<label for="guidelinesCited">If yes, which guideline(s) support your appeal?</label>
<textarea id="guidelinesCited" rows="2" placeholder="Cite the specific guidelines"></textarea>
<label for="editedContent"
>Was this content edited after being blocked?</label
>
<label for="editedContent">Was this content edited after being blocked?</label>
<select id="editedContent">
<option value="">Select an option</option>
<option value="Yes">Yes</option>
@@ -188,30 +169,14 @@
</select>
<label for="changesMade">If yes, what changes were made?</label>
<textarea
id="changesMade"
rows="2"
placeholder="Describe the modifications"
></textarea>
<textarea id="changesMade" rows="2" placeholder="Describe the modifications"></textarea>
<h2>4. Additional Context</h2>
<label for="misunderstanding"
>Was there any misunderstanding or misclassification?</label
>
<textarea
id="misunderstanding"
rows="2"
placeholder="Provide context"
></textarea>
<label for="misunderstanding">Was there any misunderstanding or misclassification?</label>
<textarea id="misunderstanding" rows="2" placeholder="Provide context"></textarea>
<label for="externalReferences"
>Are there external references that validate your appeal?</label
>
<textarea
id="externalReferences"
rows="2"
placeholder="Links, citations, or additional info"
></textarea>
<label for="externalReferences">Are there external references that validate your appeal?</label>
<textarea id="externalReferences" rows="2" placeholder="Links, citations, or additional info"></textarea>
<h2>5. Declaration</h2>
<p>
@@ -228,11 +193,9 @@
<button type="submit">Submit Appeal</button>
</form>
<div id="status"></div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
// Logging functions for both on-page and console output.
@@ -249,12 +212,10 @@
function clear() {
document.getElementById("status").innerHTML = "";
}
if (!window.NostrTools) {
log("NostrTools not loaded. Check console or ad-blockers.", "error");
return;
}
const {
generateSecretKey,
getPublicKey,
@@ -264,19 +225,15 @@
SimplePool,
Relay,
} = window.NostrTools;
const RELAYS = [
"wss://relay.snort.social",
"wss://relay.damus.io",
"wss://relay.primal.net",
];
const pool = new SimplePool();
document.getElementById("dm-form").addEventListener("submit", async (ev) => {
ev.preventDefault();
clear();
try {
// Retrieve user input.
const npub = document.getElementById("npubInput").value.trim();