Commit Graph
22 Commits
Author SHA1 Message Date
thePR0M3TH3ANandClaude Opus 4.8 878f01b819 submissions(#23): forms publish structured kind-30083 instead of kind-4 DMs
All 5 iframe forms now publish a PUBLIC, structured bitvid submission (kind 30083)
from their ephemeral key instead of a NIP-04 encrypted kind-4 DM — so the admin
Submissions tab can list + approve/deny them.

- application → k=application (+ applicant = the required npub)
- bug-fix → k=bug, feedback → k=feedback, request → k=feature
  (each includes applicant only when the optional npub is filled in)
- content-appeals → k=appeal (no npub field)
Each tags ['d', <id>], ['k', <type>], ['p', <admin hex>], ['t','bitvid-submission'],
['client','bitvid']; the form body goes in plaintext content. The post-publish
verification subscription now watches kind 30083. No encryption anywhere.

Lint + build clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-06 20:44:34 -04:00
thePR0M3TH3ANandClaude Opus 4.8 e4e5c552c7 feat(forms): validate submitter npub on submission forms (#22)
The embed submission forms accepted any free-text identifier and published it,
so they were an easy spam vector. Add a shared, testable NIP-19 validator and
require a well-formed npub before a submission is sent.

- js/utils/validateNpub.js: validateNpubHex() decodes via nostr-tools nip19 and
  returns the 64-char hex pubkey, or null for anything that isn't a real npub
  (free text, wrong prefix, bad checksum, wrong NIP-19 entity). Also exposed as
  window.validateNpubHex for the classic iframe form scripts.
- Application form (required npub): submit is blocked unless valid; the decoded
  hex is written into the application body for canonical storage/matching.
- Feature-request / bug-fix / feedback (optional npub): stays optional, but a
  non-empty value must be a valid npub or submit is blocked with an inline error.
- Tests: tests/validate-npub.test.mjs (real nostr-tools, no implementation mirror).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-25 08:31:45 -04:00
thePR0M3TH3AN 3e160a5035 Update nostr-tools bundle to restore nip46 handshake 2025-10-22 07:18:25 -04:00
thePR0M3TH3AN 4d5de9f01d Sync iframe forms with theme overrides 2025-10-17 11:43:52 -04:00
thePR0M3TH3AN cbf0bd34ee Add overlay root and design tokens 2025-10-16 10:30:07 -04:00
thePR0M3TH3AN 4d95a6415f Remove inline console fallbacks from static views 2025-10-15 15:42:24 -04:00
thePR0M3TH3AN b13104162d Add logger fallbacks for iframe forms and views 2025-10-15 15:22:42 -04:00
thePR0M3TH3AN d705cf176b Revert "Refactor logging to centralized logger" 2025-10-15 11:14:10 -04:00
thePR0M3TH3AN 37ba57aa37 Refactor logging to centralized logger 2025-10-15 11:11:14 -04:00
thePR0M3TH3AN 3f1238b5a9 Remove legacy CSS and enable design system by default 2025-10-12 06:58:50 -04:00
thePR0M3TH3AN 8265f9e2de Add design system feature flag and runtime integration 2025-10-11 16:11:43 -04:00
thePR0M3TH3AN 2153d3f74c Align iframe forms with design tokens 2025-10-10 23:17:27 -04:00
thePR0M3TH3AN 41b2b8fba6 Ensure modal stack stays above sidebar 2025-10-07 08:52:17 -04:00
thePR0M3TH3AN 79aa7f7669 Ensure sidebar state shifts app layout 2025-10-06 20:43:48 -04:00
thePR0M3TH3AN 8ad39b5cf6 Default sidebar to collapsed state by default 2025-10-06 20:06:43 -04:00
thePR0M3TH3AN b3b467755a Stabilize collapsed sidebar rail 2025-10-06 19:57:16 -04:00
thePR0M3TH3AN 957a3ae6fa Fix collapsed sidebar layout and cache busting 2025-10-06 18:58:54 -04:00
thePR0M3TH3AN 58fd6ef7d5 Tighten collapsed sidebar rail spacing 2025-10-06 17:46:02 -04:00
thePR0M3TH3AN 2bafecfb50 Refine sidebar collapse interactions 2025-10-06 17:08:35 -04:00
thePR0M3TH3AN f04c21004a Bust cached sidebar assets 2025-10-06 16:27:13 -04:00
thePR0M3TH3AN fa638e08a5 Align scrollbar styling across modals 2025-09-27 22:11:25 -04:00
Keep Creating Online b6b61e4e15 updated directory structure to fix root Service Worker issues and performance improvements 2025-02-05 16:54:40 -05:00