From cb18615c1bc0f03f737b013d63b203b307d202ce Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:20:27 -0400 Subject: [PATCH] Refactor NIP-71 form handling and update edit modal --- components/edit-video-modal.html | 561 +++++++++++++++++++++ js/ui/components/EditModal.js | 60 ++- js/ui/components/UploadModal.js | 525 +------------------ js/ui/components/nip71FormManager.js | 723 +++++++++++++++++++++++++++ 4 files changed, 1355 insertions(+), 514 deletions(-) create mode 100644 js/ui/components/nip71FormManager.js diff --git a/components/edit-video-modal.html b/components/edit-video-modal.html index 9b2d9545..9822400e 100644 --- a/components/edit-video-modal.html +++ b/components/edit-video-modal.html @@ -73,6 +73,567 @@ + +
+
+ + NIP-71 event type + +

+ Choose the video format. Kind 21 is a full video, while + Kind 22 is a short. +

+
+ + +
+
+ +
+
+ + +

+ Set the canonical publish time for cross-client ordering. +

+
+
+ + +

+ Plain-language fallback shown when the media cannot load. +

+
+
+ + +

+ Provide the runtime in whole seconds for timeline scrubbing. +

+
+
+ + +

+ Leave blank if the video is safe for all audiences. +

+
+
+ +
+ + +

+ This becomes the event content. Keep it concise for Nostr readers. +

+
+
+ +
+ NIP-71 tags +

+ Use the controls below to describe media variants, captions, chapters, participants, and references. +

+ +
+
+

Image metadata (imeta)

+ +
+

+ Provide dimensions, MIME type, and resource links for each variant. Nested repeaters let you attach multiple + image, fallback, or service values. +

+
+ +
+ +
+
+

+ Caption & subtitle tracks (text-track) +

+ +
+

+ Supply caption or subtitle URLs along with file type and language so players can surface accessibility features. +

+
+ +
+ +
+
+

Chapters & segments (segment)

+ +
+

+ Outline chapters with start and end times, titles, and optional thumbnails. +

+
+ +
+ +
+
+

Hashtags (t)

+ +
+
+ +
+ +
+
+

Participants (p)

+ +
+
+ +
+ +
+
+

Reference links (r)

+ +
+
+ +
+
+