Commit graph

113 commits

Author SHA1 Message Date
King Omar
c16b159e04 Constitution 9.2: members encouraged to propose amendments, still can't vote 2026-07-01 04:24:56 +10:00
King Omar
6e3b71578e Constitution v2.0 updates: RAD abbreviation, Mickey logo, blackmail clause
- Change abbreviation from [TRP] to RAD
- Clause 1.2: add Mickey Mouse obscene gesture logo reference
- Add clause 14: Coercion, Blackmail and Compromised Members (6 sub-clauses
  covering duty to disclose, void acts, suspension, removal, protection from
  liability, and definition of dark forces)
- Update adopted date to 1 July 2026

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 04:23:15 +10:00
King Omar
71ce5e8226 Add contact email potato@theradicalparty.com 2026-07-01 04:20:25 +10:00
King Omar
1b4414c575 Add Constitution v2.0 section for AEC federal registration
Collapsible section with full draft constitution: 13 clauses covering
name, objects (direct democracy/CIR), open membership, National Council
governance, Convenor reserved powers, officers, candidate endorsement,
amendment, finances, transition/devolution, winding up, disputes.

Includes drafting notes box (styled separately, marked for deletion
before lodgement). Footer link added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 04:11:51 +10:00
King Omar
78454eee26 Switch background audio to Not Like Us (trimmed from 36s)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 23:53:36 +10:00
King Omar
bf18f882da Remove 'ban face coverings' from Switzerland examples 2026-06-27 03:41:40 +10:00
King Omar
fe1245faf9 67 policies (very specific) 2026-06-27 03:27:54 +10:00
King Omar
7f004104e2 Fix comments: remove 1s queue, direct fetch, optimistic rendering
The queue (COMMENT_REQUEST_DELAY=1000ms) was causing all comment loads to
wait 1 second regardless of context. Comments are always user-triggered
(toggle click, modal open, post submit) so batching was pointless overhead.

- loadComments() now does a direct async fetch — no queue, no delay
- submitComment() optimistically renders the new comment instantly (faded)
  then replaces with real server data once the POST confirms
- Remove batchLoadComments, queueCommentLoad, updateCommentCount, and all
  queue machinery (commentRequestQueue, commentRequestTimeout, etc.)
- Toggle arrow direction preserved during count updates
- All containers updated via querySelectorAll (feed card + modal)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:26:17 +10:00
King Omar
89c548bb86 Replace broken share/image buttons with clean text actions
Remove custom-copy-button (relied on missing image file) and share-img-btn
(emoji clashed with monospace aesthetic). Replace both with .card-action-btn
text buttons: 'share ↗' and 'card ↗' — monospace, grey, pink on hover,
consistent with the rest of the card UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:19:56 +10:00
King Omar
b726dc1e24 Redesign petition SVG share image; remove flag/report button
SVG: clean two-zone layout — dark header with RADICAL wordmark + PETITION
badge, full-width text area with left accent bar and large quote mark,
footer band with signature count, author, date and CTA. Proper word-wrap
centred in the card. Looks like a real share card now.

Remove flag button and handleFlag from proposal cards entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:13:53 +10:00
King Omar
a07d3f6887 Fix comments loading: reset timeout, querySelectorAll for modals, remove dupes
- commentRequestTimeout never reset to null — comments only loaded once ever
- querySelector missed modal containers when same proposal was in feed + modal
- Switch to querySelectorAll so feed card and modal both update simultaneously
- Toggle count now updates on load (not just after posting)
- Remove two duplicate loadComments and submitComment definitions
- Simplify loadModalComments to delegate to loadComments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:12:33 +10:00
King Omar
3b715e34bd Fix login link size in footer — remove emoji, drop login-link class
The 🔐 emoji was rendering taller than surrounding text causing the
link to appear oversized. Removed emoji and login-link class entirely;
.footer-links a already handles all the needed styling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:10:18 +10:00
King Omar
5e55dbe900 Force AEC membership modal on 3rd vote or first petition; shrink login button
- Replace email-only capture with full AEC membership modal (name, DOB,
  address, suburb, state, postcode, email, phone, electoral roll consent)
- Trigger modal on first upvote (petition signature) OR after 3rd vote
- Modal posts to /api/join and emails details to party contact
- localStorage 'radical_member_joined' tracks completion/dismiss per device
- Shrink .login-link to match other footer links (was pink button, now text)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 03:00:40 +10:00
King Omar
05e5604b09 Add 'The Only Policy' about section with Switzerland direct democracy content
Replaces dead 'About Us' footer link with a real section explaining RADICAL's
single goal: pass one law so 100k signatures forces a binding referendum.
Includes Switzerland comparison (working since 1891), four-step plan, and
styled to match the rest of the site.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 01:56:26 +10:00
King Omar
a6e7989a10 Add Join The Movement form, fix login route, fix images, update copyright to 2026
- Add /api/join worker endpoint that emails membership details to party contact
- Register /api/login route (was missing — emoji login was broken)
- Add full AEC-compliant member registration form in index.html (#join section)
- Update copyright year to 2026 in index.html and login.html
- Fix dictator/target image URLs: radical.omar-c29.workers.dev → theradicalparty.com
- Add onerror handlers to all login page images for graceful degradation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 01:31:30 +10:00
King Omar
5c291d29ea feat: leaderboard, milestones, email capture, postcode, flag, stats bar
- Vote state now persists on page load (user_vote in proposals query)
- Stats bar: live votes-today / citizens / proposals counts
- Leaderboard section: top 10 proposals with milestone progress bars
- Milestone system: 100→viral, 500→community, 1k→publish, 5k→minister, 10k→media
- Email capture modal after 3rd vote (postcode optional)
- Milestone email notifications via Resend (requires RESEND_API_KEY secret)
- Weekly digest cron (Monday 9am AEST) to all subscribers
- Share-as-image button opens dynamic SVG in new tab
- Flag/report button hides proposals after 5 flags
- Proposals with hidden=1 excluded from all feeds
- DB: users.email, users.postcode, proposals.flag_count, proposals.hidden,
       proposal_flags, milestone_notifications tables

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 01:07:30 +10:00
King Omar
876d0c438c fix: votes, comments and feed refresh all broken due to safeFetch misuse
safeFetch already returns parsed JSON and throws on non-2xx — callers were
treating the result as a Response object and checking .ok / .json(), which
made votes, comment votes, and comment posts silently fail every time.

Also: fetchProposals was missing cache:'no-store' so newly posted proposals
were invisible until the 24hr browser cache expired; getProposals was sending
24hr Cache-Control so Cloudflare CDN served stale data; getShareableImageUrl
had a double slash (/api//petition-svg); wrangler.toml had an invalid [pages]
stanza that caused a warning on every deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 00:35:31 +10:00
Omar Najjar
92a4d3fb06 x 2025-04-30 20:02:30 +10:00
Omar Najjar
73645b029c x 2025-04-30 19:57:56 +10:00
Omar Najjar
73e02e500e x 2025-04-30 19:49:58 +10:00
Omar Najjar
927313e8da Revert "x"
This reverts commit 330bd1ff61.
2025-04-30 19:46:18 +10:00
Omar Najjar
330bd1ff61 x 2025-04-30 19:19:43 +10:00
Omar Najjar
da90747631 X 2025-04-13 04:55:51 +10:00
Omar Najjar
25e2921d74 x 2025-04-13 04:47:32 +10:00
Omar Najjar
c785511f3f x 2025-04-13 04:41:44 +10:00
Omar Najjar
1b3c0db99f x 2025-04-13 04:34:23 +10:00
Omar Najjar
ae357d2ab8 x 2025-04-13 04:16:17 +10:00
Omar Najjar
e35571fd3b x 2025-04-13 02:55:28 +10:00
Omar Najjar
95a66ea6b0 x 2025-04-13 02:27:50 +10:00
Omar Najjar
ecf43500a1 x 2025-04-13 01:54:12 +10:00
Omar Najjar
eb9f79d8a7 x 2025-04-13 01:39:56 +10:00
Omar Najjar
85101e7ddc x 2025-04-13 01:11:21 +10:00
Omar Najjar
626e635bee x 2025-04-02 22:22:26 +11:00
Omar Najjar
e38cbc75e6 x 2025-04-02 22:07:54 +11:00
Omar Najjar
62d4d8f2da x 2025-04-02 21:52:18 +11:00
Omar Najjar
d24883d4a4 x 2025-04-02 21:36:26 +11:00
Omar Najjar
0bed3f7b27 x 2025-04-02 21:27:40 +11:00
Omar Najjar
3cb78a90d8 x 2025-04-02 20:37:49 +11:00
Omar Najjar
6eae507ea6 x 2025-03-24 00:12:14 +11:00
Omar Najjar
bdc96fff27 ADDING LOGIN 2025-03-23 21:30:50 +11:00
Omar Najjar
1c1e0f8df3 x 2025-03-15 22:54:57 +11:00
Omar Najjar
2e5c99636a pwa 2025-03-15 22:35:29 +11:00
Omar Najjar
5a16edc1a2 remove 2025-03-15 15:45:05 +11:00
Omar Najjar
627db33e43 x 2025-03-15 15:38:49 +11:00
Omar Najjar
e160f3eba7 x 2025-03-15 14:54:01 +11:00
Omar Najjar
ca020174db x 2025-03-15 14:49:49 +11:00
Omar Najjar
7ffc5724f3 x test 2025-03-15 14:44:19 +11:00
Omar Najjar
7cb8bc76e7 test 2025-03-15 14:39:16 +11:00
Omar Najjar
5912a337e6 x 2025-03-15 14:29:07 +11:00
Omar Najjar
0de9791b9a meta tags seo update 2025-03-15 14:21:38 +11:00