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
+24
View File
@@ -0,0 +1,24 @@
import { isXaigenStudio } from '~/utils/videoModels'
export default defineEventHandler((event) => {
const pub = useRuntimeConfig().public as { instanceName?: string; studio?: string }
const xaigen = isXaigenStudio(pub)
const name = String(pub.instanceName || (xaigen ? 'xAIGen' : 'AIGen'))
setHeader(event, 'Content-Type', 'application/manifest+json')
setHeader(event, 'Cache-Control', 'no-cache')
return {
name,
short_name: name,
start_url: '/',
scope: '/',
display: 'standalone',
background_color: '#09090b',
theme_color: '#09090b',
icons: [{
src: xaigen ? '/favicon.svg' : '/favicon-aigen.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'any'
}]
}
})