mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
fix(frontend): contain hover-video to miximage frame + restore dev HMR
The miximage hover video had no height bound, so a tall/narrow source overflowed the cover. Match the miximage frame's box and `object-fit: cover` it so the clip fills the bezel screen and crops instead of spilling past it. Also gate the PWA dev service worker behind DEV_PWA: it intercepted dev requests and forced full page reloads on every edit (CSS included), defeating HMR. Default dev now gets working HMR; set DEV_PWA=true to test the PWA in dev. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -358,9 +358,10 @@ defineExpose({
|
||||
.game-cover__video {
|
||||
position: absolute;
|
||||
top: 0.75rem;
|
||||
left: 0.35rem;
|
||||
left: 0.3rem;
|
||||
width: 97%;
|
||||
object-fit: contain;
|
||||
aspect-ratio: 745 / 550;
|
||||
object-fit: cover;
|
||||
opacity: 0;
|
||||
transition: opacity 0.35s ease;
|
||||
pointer-events: none;
|
||||
|
||||
@@ -67,6 +67,10 @@ export default defineConfig(({ mode }) => {
|
||||
const backendPort = env.DEV_PORT ?? "5000";
|
||||
// const devMode = env.DEV_MODE === "true";
|
||||
const httpsMode = env.DEV_HTTPS === "true";
|
||||
// The PWA service worker intercepts dev requests and forces full page
|
||||
// reloads on edits (CSS included), defeating HMR. Keep it off in dev unless
|
||||
// explicitly testing the PWA (DEV_PWA=true).
|
||||
const pwaDevEnabled = env.DEV_PWA === "true";
|
||||
|
||||
return {
|
||||
optimizeDeps: {
|
||||
@@ -96,7 +100,7 @@ export default defineConfig(({ mode }) => {
|
||||
],
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
enabled: pwaDevEnabled,
|
||||
type: "module",
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user