mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 09:13:24 +00:00
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:
@@ -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,
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user