Notify from the installed web app when a generation finishes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-01 07:11:12 -05:00
co-authored by Cursor
parent fa32fb0a8e
commit 2635b8838c
7 changed files with 195 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
export default defineNuxtPlugin(() => {
const config = useRuntimeConfig()
const name = String(config.public.instanceName || 'AIGen')
useHead({
meta: [
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
{ name: 'apple-mobile-web-app-title', content: name },
{ name: 'mobile-web-app-capable', content: 'yes' }
],
link: [
{ rel: 'manifest', href: '/manifest.webmanifest' }
]
})
if (!('serviceWorker' in navigator)) return
void navigator.serviceWorker.register('/sw.js').catch(() => null)
})