diff --git a/backend/src/plugins/cors.ts b/backend/src/plugins/cors.ts index 3428d5d..0dc492d 100644 --- a/backend/src/plugins/cors.ts +++ b/backend/src/plugins/cors.ts @@ -9,6 +9,7 @@ export default fp(async (server: FastifyInstance) => { "http://localhost:3001", // dein Nuxt-Frontend "http://127.0.0.1:3000", // dein Nuxt-Frontend "http://192.168.1.227:3001", // dein Nuxt-Frontend + "http://192.168.1.234:3000", // dein Nuxt-Frontend "http://192.168.1.113:3000", // dein Nuxt-Frontend "https://beta.fedeo.de", // dein Nuxt-Frontend "https://app.fedeo.de", // dein Nuxt-Frontend diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index b304226..20c8874 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -7,7 +7,7 @@ export default defineNuxtConfig({ } }, - modules: ['@pinia/nuxt', '@nuxt/ui', '@nuxtjs/supabase', "nuxt-editorjs", '@nuxtjs/fontaine', 'nuxt-viewport', '@nuxtjs/leaflet', '@vueuse/nuxt'], + modules: ['@vite-pwa/nuxt','@pinia/nuxt', '@nuxt/ui', '@nuxtjs/supabase', "nuxt-editorjs", '@nuxtjs/fontaine', 'nuxt-viewport', '@nuxtjs/leaflet', '@vueuse/nuxt'], ssr: false, @@ -96,5 +96,68 @@ export default defineNuxtConfig({ } }, + pwa: { + /* Automatische Updates des Service Workers (optional, aber empfohlen) */ + registerType: 'autoUpdate', + + manifest: { + name: 'FEDEO', + short_name: 'FEDEO', + description: 'FEDEO', + theme_color: '#69c350', + background_color: '#ffffff', + + /* WICHTIG: Dies sorgt dafür, dass die URL-Leiste verschwindet */ + display: 'standalone', + + /* Icons sind essentiell für den Home Screen */ + icons: [ + { + src: '192.png', + sizes: '192x192', + type: 'image/png' + }, + { + src: '512.png', + sizes: '512x512', + type: 'image/png' + }, + { + src: '512.png', + sizes: '512x512', + type: 'image/png', + purpose: 'any maskable' + } + ] + }, + + /* WICHTIG FÜR SAFARI / iOS */ + workbox: { + navigateFallback: '/', + }, + + devOptions: { + enabled: true, // Damit du es auch lokal testen kannst + type: 'module', + }, + }, + + app: { + head: { + meta: [ + // Sagt iOS, dass es eine WebApp ist + { name: 'apple-mobile-web-app-capable', content: 'yes' }, + // Steuert die Farbe der Statusleiste (weiß, schwarz oder transparent) + { name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' }, + // Name der App unter dem Icon + { name: 'apple-mobile-web-app-title', content: 'FEDEO' }, + ], + link: [ + // Wichtig: Das Icon für den Home Screen + { rel: 'apple-touch-icon', href: '/512.png' } + ] + } + }, + compatibilityDate: '2024-12-18' }) \ No newline at end of file diff --git a/frontend/public/180.png b/frontend/public/180.png new file mode 100644 index 0000000..7fdbef0 Binary files /dev/null and b/frontend/public/180.png differ diff --git a/frontend/public/192.png b/frontend/public/192.png new file mode 100644 index 0000000..2e6cccb Binary files /dev/null and b/frontend/public/192.png differ diff --git a/frontend/public/512.png b/frontend/public/512.png new file mode 100644 index 0000000..1196ab1 Binary files /dev/null and b/frontend/public/512.png differ