From 8e7070cbafc70a2cbf8e9f443521c6023988cda9 Mon Sep 17 00:00:00 2001 From: platform-mcp Date: Wed, 24 Jun 2026 02:39:37 +0530 Subject: [PATCH] feat(footer): make push notification button reflect subscription state The WRNexus web-push button always showed "Enable notifications". It now reads WRNexusPush.isSubscribed() on load and renders the correct state: - hides entirely when SDK/browser push support is missing - "Enable notifications" -> calls prompt() (user gesture) - "Unsubscribe" when already subscribed -> calls unsubscribe() - disabled "Notifications blocked" when permission is denied - in-progress disabled state to prevent double-clicks; re-reads state after each action and re-renders the label Co-Authored-By: Claude Opus 4.8 --- src/components/Footer.astro | 112 ++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 6 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index e578af1..c7cee88 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -167,16 +167,21 @@ const currentYear = new Date().getFullYear(); Privacy Policy.

- + @@ -205,9 +210,104 @@ const currentYear = new Date().getFullYear(); - +