Feature: configurable PWA install screenshots (per-domain)

Admins can upload custom mobile/desktop screenshots shown in the browser's
PWA install dialog, replacing the hardcoded Bulwark ones. Two new config keys
(pwaScreenshotMobileUrl/DesktopUrl), upload widgets in the admin Branding tab,
a sharp-based /api/pwa-screenshot/[variant] resize route, and manifest.ts picks
the custom screenshots when configured.

Like the other branding fields, screenshots are per-domain: they are
BRANDING_OVERRIDE_KEYS, the manifest and the /api/pwa-screenshot route resolve
them from the request host (domain override -> global -> Bulwark default), and
the admin Branding tab + upload/delete route handle them in a per-domain scope,
mirroring pwaIconUrl/faviconUrl.
This commit is contained in:
dealerweb
2026-05-30 15:45:59 +02:00
committed by Linus Rath
parent 8353b28b33
commit 66c5f0f52c
7 changed files with 141 additions and 7 deletions
+4
View File
@@ -15,6 +15,8 @@ export const BRANDING_OVERRIDE_KEYS = [
'appDescription',
'faviconUrl',
'pwaIconUrl',
'pwaScreenshotMobileUrl',
'pwaScreenshotDesktopUrl',
'pwaThemeColor',
'pwaBackgroundColor',
'appLogoLightUrl',
@@ -42,6 +44,8 @@ export interface DomainBrandingEntry {
appDescription?: string;
faviconUrl?: string;
pwaIconUrl?: string;
pwaScreenshotMobileUrl?: string;
pwaScreenshotDesktopUrl?: string;
pwaThemeColor?: string;
pwaBackgroundColor?: string;
appLogoLightUrl?: string;