Notify from the installed web app when a generation finishes.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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)
|
||||
})
|
||||
Reference in New Issue
Block a user