fix: serve PWA manifest dynamically to respect runtime APP_NAME env var

Delete static public/manifest.json (hardcoded "Bulwark Webmail") and mark
app/manifest.ts as force-dynamic so Next.js evaluates APP_NAME at request
time instead of build time, fixing the native browser install prompt.

Closes #207
This commit is contained in:
nesgarbo
2026-04-18 13:20:14 +02:00
committed by Linus Rath
parent 440a4e919a
commit 028e78a0c9
2 changed files with 2 additions and 68 deletions
+2
View File
@@ -1,5 +1,7 @@
import type { MetadataRoute } from "next";
export const dynamic = "force-dynamic";
export default function manifest(): MetadataRoute.Manifest {
const appName =
process.env.APP_NAME ||
-68
View File
@@ -1,68 +0,0 @@
{
"name": "Bulwark Webmail",
"short_name": "Bulwark",
"description": "A modern webmail client built for Stalwart Mail Server",
"start_url": "/",
"scope": "/",
"display": "standalone",
"orientation": "portrait-primary",
"theme_color": "#ffffff",
"background_color": "#ffffff",
"icons": [
{
"src": "/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-maskable-light-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable",
"media": "(prefers-color-scheme: light)"
},
{
"src": "/icon-maskable-light-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable",
"media": "(prefers-color-scheme: light)"
},
{
"src": "/icon-maskable-dark-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable",
"media": "(prefers-color-scheme: dark)"
},
{
"src": "/icon-maskable-dark-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable",
"media": "(prefers-color-scheme: dark)"
}
],
"categories": ["productivity"],
"screenshots": [
{
"src": "/screenshot-540x720.png",
"sizes": "540x720",
"type": "image/png",
"form_factor": "narrow"
},
{
"src": "/screenshot-1280x720.png",
"sizes": "1280x720",
"type": "image/png",
"form_factor": "wide"
}
]
}