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:
@@ -23,10 +23,13 @@ const ALLOWED_MIME_TYPES = new Set([
|
||||
|
||||
const VALID_SLOTS = new Set([
|
||||
'faviconUrl',
|
||||
'pwaIconUrl',
|
||||
'appLogoLightUrl',
|
||||
'appLogoDarkUrl',
|
||||
'loginLogoLightUrl',
|
||||
'loginLogoDarkUrl',
|
||||
'pwaScreenshotMobileUrl',
|
||||
'pwaScreenshotDesktopUrl',
|
||||
]);
|
||||
|
||||
const EXT_BY_MIME: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user