From 0745ad14f01160abc2f437917d37f3bd7c4d3e09 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Thu, 28 May 2026 01:23:10 +0200 Subject: [PATCH] feat(push): owner enrolment UI, service worker and VAPID keygen (T10) EnableNotifications subscribes the owner's device with the public VAPID key and stores it; sw.js receives pushes and opens /defects on click; `pnpm vapid:keys` mints the key pair. --- .pnpm-store/v11/index.db | Bin 0 -> 8192 bytes app/components/EnableNotifications.vue | 116 +++++++++++++++++++++++++ app/pages/defects.vue | 3 +- package.json | 5 +- pnpm-lock.yaml | 93 ++++++++++++++++++++ public/sw.js | 33 +++++++ scripts/generate-vapid.ts | 10 +++ 7 files changed, 258 insertions(+), 2 deletions(-) create mode 100644 .pnpm-store/v11/index.db create mode 100644 app/components/EnableNotifications.vue create mode 100644 public/sw.js create mode 100644 scripts/generate-vapid.ts diff --git a/.pnpm-store/v11/index.db b/.pnpm-store/v11/index.db new file mode 100644 index 0000000000000000000000000000000000000000..e6114c6ea8dcb445ae2d8b54ed3d0e04718717ff GIT binary patch literal 8192 zcmeIuzpBD86bA4#2p0s=&GDX11#$5OY&BppTCFMSqD0LV@%|C%po4=C;XCfB*y_009U<00Izz00bZafgB3lKCO>xt!CY>pipIV>wEYDQ#G?7q-|A44BRz*ko}y78W!h}e%vF6aP~>|v kx0l=(WA#c7>G359KmY;|fB*y_009U<00Izz00dHjf5$8{)c^nh literal 0 HcmV?d00001 diff --git a/app/components/EnableNotifications.vue b/app/components/EnableNotifications.vue new file mode 100644 index 0000000..7ae9dd4 --- /dev/null +++ b/app/components/EnableNotifications.vue @@ -0,0 +1,116 @@ + + + diff --git a/app/pages/defects.vue b/app/pages/defects.vue index bad2bac..8fd9bd8 100644 --- a/app/pages/defects.vue +++ b/app/pages/defects.vue @@ -29,9 +29,10 @@ const openSection = ref(null)