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,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'
|
||||
}]
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user