Compare commits

...

2 commits

Author SHA1 Message Date
Nathan Lamy
fbd7138af9 chore: rewrite sw push
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 2m24s
2025-08-21 12:15:31 +02:00
Nathan Lamy
63dbad65ea ci: add github link 2025-08-21 11:46:26 +02:00
2 changed files with 5 additions and 5 deletions

View file

@ -17,6 +17,7 @@ jobs:
VITE_API_URL: ${{ secrets.VITE_API_URL }} VITE_API_URL: ${{ secrets.VITE_API_URL }}
VITE_TURNSTILE_SITE_KEY: ${{ secrets.VITE_TURNSTILE_SITE_KEY }} VITE_TURNSTILE_SITE_KEY: ${{ secrets.VITE_TURNSTILE_SITE_KEY }}
VITE_PUBLIC_VAPID_KEY: ${{ secrets.VITE_PUBLIC_VAPID_KEY }} VITE_PUBLIC_VAPID_KEY: ${{ secrets.VITE_PUBLIC_VAPID_KEY }}
VITE_GITHUB_URL: ${{ secrets.VITE_GITHUB_URL }}
run: | run: |
npm --version && node --version npm --version && node --version
npm i -g pnpm npm i -g pnpm

View file

@ -23,14 +23,13 @@ self.addEventListener("notificationclick", function (event) {
const clickedNotification = event.notification; const clickedNotification = event.notification;
clickedNotification.close(); clickedNotification.close();
if (event.action == "open" && event.data.id) { if (event.action == "open" && event.data?.id) {
const promiseChain = clients.openWindow( const promiseChain = clients.openWindow(
BASE_URL + "/colles/" + event.data.id BASE_URL + "/colles/" + event.data.id
); );
event.waitUntil(promiseChain); event.waitUntil(promiseChain);
return; } else {
const promiseChain = clients.openWindow(BASE_URL);
event.waitUntil(promiseChain);
} }
const promiseChain = clients.openWindow(BASE_URL);
event.waitUntil(promiseChain);
}); });