feat: dynamic PWA manifest with configurable name, description and icons
- Add app/manifest.ts to serve /manifest.webmanifest dynamically at runtime - Name, short_name, description, theme_color and background_color are read from env vars (APP_NAME, APP_SHORT_NAME, APP_DESCRIPTION, PWA_THEME_COLOR, PWA_BACKGROUND_COLOR) with Bulwark defaults as fallback - Add /api/pwa-icon/[size] route that auto-generates 192x192 and 512x512 PNG icons from PWA_ICON_URL (or FAVICON_URL as fallback) using Sharp; results are cached in memory - Remove static manifest: '/manifest.json' from layout metadata; Next.js injects the link automatically from app/manifest.ts - Fix pre-existing ESLint no-undef on RequestInit in browser-navigation.ts
This commit is contained in:
@@ -57,6 +57,7 @@ export function getPathPrefix(locale?: string): string {
|
||||
* // Browser at /webmail/en/inbox → /webmail/api/jmap
|
||||
* // Browser at /en/inbox → /api/jmap
|
||||
*/
|
||||
// eslint-disable-next-line no-undef
|
||||
export function apiFetch(input: string, init?: RequestInit): Promise<Response> {
|
||||
if (input.startsWith('/') && !input.startsWith('//')) {
|
||||
return fetch(getPathPrefix() + input, init);
|
||||
|
||||
Reference in New Issue
Block a user