ENH - Browser preview + convert app SVGs to WebP

Introduce a browserPreview mode (isBrowserPreview) with adjusted viewport scaling and CSS (.phone-stage--browser-preview) and update related contract tests. Allow apiBase via URL params in nui utils so the dev build can call a local browser API base. Replace many SVG app icons with WebP (and update imports), swap crypto header PNG to WebP, and add a demo wallpaper image. Testserver now installs demo apps and configures a demo wallpaper; smoke tests updated to assert these browser-demo conditions.
This commit is contained in:
Leon.Schmidt
2026-08-19 15:17:26 +02:00
parent dae67a48b8
commit c766cb5044
38 changed files with 161 additions and 271 deletions
@@ -84,4 +84,16 @@ describe('browser development preview contract', () => {
)
expect(mainCss).not.toContain('.phone-stage--dev')
})
it('fills the dedicated browser embed without clipping the hardware controls', () => {
expect(source).toContain("developmentParameters.has('browserPreview')")
expect(source).toContain("'phone-stage--browser-preview': isBrowserPreview")
expect(source).toContain('return (availableScale * 0.94) / PHONE_BASE_SCALE')
expect(mainCss).toMatch(
/\.phone-stage--browser-preview\s*\{[^}]*place-items:\s*center;[^}]*padding:\s*0;/s,
)
expect(mainCss).toMatch(
/\.phone-stage--browser-preview \.phone-device\s*\{[^}]*filter:\s*none;/s,
)
})
})