Commit graph

160 commits

Author SHA1 Message Date
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
8acf1aca19 Fix login images (remote R2 upload) and clarify signup UX
- Upload all 23 images to remote Cloudflare R2 (previous upload was local-only)
- Add 'How it works' panel at top of login page explaining 3-step flow
- Rename button to 'Login / Sign Up →' to make dual purpose obvious
- Label emoji/dictator/target sections as Step 1/2/3 of the key
- New users automatically get an account on first use of any unique combination

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 02:49:33 +10:00
King Omar
2769a29f11 Fix login page: real images from R2, working login flow, anonymous option
- Upload 23 person images to R2 memes bucket (all from Wikimedia Commons)
- Replace all imgur/old-worker URLs with theradicalparty.com/memes/*.jpg
- Fix login redirect: stores session in localStorage, redirects to / after 2.5s
- Add 'Continue anonymously' option explaining anon vs AEC-linked login
- Tighten success screen: shows emoji key, enemy, target then redirects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 02:39:59 +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
b789b35f78 test: verify forgejo → cloudflare direct deploy pipeline 2026-06-05 01:27:09 +10:00
King Omar
39e36dfe76 fix: use SUN in cron expression for Cloudflare compatibility
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 01:17:33 +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
King Omar
4db2a9a6cf test: HOME fix for wrangler auth 2026-06-05 00:23:37 +10:00
King Omar
2cdfdd9d06 test: verify wrangler path fix 2026-06-05 00:23:21 +10:00
King Omar
baca30e94e test: verify deploy hook 2026-06-05 00:23:07 +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
3c675a7a0a Revert "x"
This reverts commit d105a753b4.
2025-04-30 19:45:58 +10:00
Omar Najjar
c00120a85c Revert "x"
This reverts commit 58f39fb352.
2025-04-30 19:45:50 +10:00
Omar Najjar
29936e8365 Revert "x"
This reverts commit 9e6a2ba4fc.
2025-04-30 19:45:42 +10:00
Omar Najjar
9e6a2ba4fc x 2025-04-30 19:29:26 +10:00
Omar Najjar
58f39fb352 x 2025-04-30 19:23:25 +10:00
Omar Najjar
d105a753b4 x 2025-04-30 19:20:42 +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
7d7e5720c2 x 2025-04-13 04:10:26 +10:00
Omar Najjar
3a3e6b4363 x 2025-04-13 03:58:58 +10:00
Omar Najjar
1fa9b3ddc3 x 2025-04-13 03:46:27 +10:00
Omar Najjar
3ca10f079d X 2025-04-13 03:40:07 +10:00
Omar Najjar
99b3f6b326 x 2025-04-13 03:36:47 +10:00
Omar Najjar
e5d43d1147 X 2025-04-13 03:30:59 +10:00
Omar Najjar
225ff45b4f x 2025-04-13 03:23:57 +10:00
Omar Najjar
d58ba122c0 x 2025-04-13 03:10:56 +10:00
Omar Najjar
b77d7372d0 x 2025-04-13 02:58:51 +10:00
Omar Najjar
2689855629 x 2025-04-13 02:57:04 +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
e1e5fb8e92 x 2025-04-13 01:24:01 +10:00
Omar Najjar
85101e7ddc x 2025-04-13 01:11:21 +10:00
Omar Najjar
906c5ffe2c X 2025-04-13 01:00:45 +10:00
Omar Najjar
b7b286c2f0 Merge branch 'main' of https://github.com/kingomarnajjar/radical 2025-04-13 00:44:33 +10:00
Omar Najjar
3fb4b35188 x 2025-04-13 00:44:02 +10:00
Omar Najjar
626e635bee x 2025-04-02 22:22:26 +11:00
Omar Najjar
9e8260d1cb x 2025-04-02 22:14:26 +11:00