feat: restructure into XFlow monorepo with Nuxt 4, Modular Onion Monolith, Android client, and Desktop CLI

This commit is contained in:
XFlow Deploy
2026-09-28 08:57:32 +05:00
parent edcd30c829
commit 0837b3f612
204 changed files with 24616 additions and 39 deletions
@@ -0,0 +1,26 @@
export default defineNuxtPlugin(() => {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
console.log('[PWA] Service Worker ready:', registration.scope)
})
// Handle push messages when app is open
navigator.serviceWorker.addEventListener('message', event => {
if (event.data?.type === 'PUSH_RECEIVED') {
const { title, body } = event.data.payload || {}
// Local alarm: vibrate and show notification
if (navigator.vibrate) {
navigator.vibrate([200, 100, 200])
}
if ('Notification' in window && Notification.permission === 'granted') {
new Notification(title || 'XFlow Alarm', {
body: body || 'Alarm triggered',
icon: '/pwa-192x192.svg',
badge: '/favicon.svg',
...({ vibrate: [200, 100, 200] } as any)
})
}
}
})
}
})