mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
spam fix
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||||
<title>Multi Roomba Rover</title>
|
<title>Multi Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-256lFfdi.js"></script>
|
<script type="module" crossorigin src="/assets/index-Gqg6Q6EF.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-lg9md4T4.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-lg9md4T4.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -105,17 +105,8 @@ modeEvents.on('change', () => {
|
|||||||
syncAll();
|
syncAll();
|
||||||
});
|
});
|
||||||
|
|
||||||
managerEvents.on('rover', () => {
|
|
||||||
if (pendingNightVisionSync) {
|
|
||||||
clearTimeout(pendingNightVisionSync);
|
|
||||||
pendingNightVisionSync = null;
|
|
||||||
}
|
|
||||||
logger.info('Rover roster change; syncing all clients');
|
|
||||||
syncAll();
|
|
||||||
});
|
|
||||||
|
|
||||||
managerEvents.on('rover', (event = {}) => {
|
managerEvents.on('rover', (event = {}) => {
|
||||||
if (event.action !== 'nightVision') return;
|
if (event.action === 'nightVision') {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const elapsed = now - lastNightVisionSync;
|
const elapsed = now - lastNightVisionSync;
|
||||||
if (elapsed >= NIGHT_VISION_SYNC_COOLDOWN_MS) {
|
if (elapsed >= NIGHT_VISION_SYNC_COOLDOWN_MS) {
|
||||||
@@ -133,6 +124,14 @@ managerEvents.on('rover', (event = {}) => {
|
|||||||
syncAll();
|
syncAll();
|
||||||
}, delay);
|
}, delay);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pendingNightVisionSync) {
|
||||||
|
clearTimeout(pendingNightVisionSync);
|
||||||
|
pendingNightVisionSync = null;
|
||||||
|
}
|
||||||
|
logger.info('Rover roster change; syncing all clients');
|
||||||
|
syncAll();
|
||||||
});
|
});
|
||||||
|
|
||||||
managerEvents.on('lock', ({ roverId, locked }) => {
|
managerEvents.on('lock', ({ roverId, locked }) => {
|
||||||
|
|||||||
@@ -65,7 +65,12 @@ export default function ControlSummary() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="grid h-full grid-rows-[1fr_1fr_auto] gap-0.5">
|
<div className="grid h-full grid-rows-[1fr_1fr_auto] gap-0.5">
|
||||||
<div className="row-span-2">
|
<div className="row-span-2">
|
||||||
<DriveDockAction layout="desktop" expand={hideInlineControls} driveDockState={driveDockState} />
|
<DriveDockAction
|
||||||
|
layout="desktop"
|
||||||
|
expand={hideInlineControls}
|
||||||
|
fill={!hideInlineControls}
|
||||||
|
driveDockState={driveDockState}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{!hideInlineControls ? <InlineCameraTilt keymap={keymap} /> : null}
|
{!hideInlineControls ? <InlineCameraTilt keymap={keymap} /> : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ function DockModal({ instructions, onConfirm, onCancel, pending }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function DriveDockAction({ layout = 'desktop', expand = false, driveDockState }) {
|
export default function DriveDockAction({ layout = 'desktop', expand = false, fill = false, driveDockState }) {
|
||||||
const isMobile = layout === 'mobile';
|
const isMobile = layout === 'mobile';
|
||||||
const {
|
const {
|
||||||
state: { roverId, keymap },
|
state: { roverId, keymap },
|
||||||
@@ -186,7 +186,7 @@ export default function DriveDockAction({ layout = 'desktop', expand = false, dr
|
|||||||
'border-amber-300/70 bg-amber-900 text-amber-50 hover:bg-amber-800 focus-visible:ring-amber-300';
|
'border-amber-300/70 bg-amber-900 text-amber-50 hover:bg-amber-800 focus-visible:ring-amber-300';
|
||||||
const indigoCta =
|
const indigoCta =
|
||||||
'border-indigo-300/70 bg-indigo-900 text-indigo-50 hover:bg-indigo-800 focus-visible:ring-indigo-300';
|
'border-indigo-300/70 bg-indigo-900 text-indigo-50 hover:bg-indigo-800 focus-visible:ring-indigo-300';
|
||||||
const filledHeight = expand ? 'h-full flex-1' : '';
|
const filledHeight = expand ? 'h-full flex-1' : fill ? 'flex-1' : '';
|
||||||
|
|
||||||
if (!driving && !dockingInProgress) {
|
if (!driving && !dockingInProgress) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ function DriveDockPanel() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="panel-section flex h-full flex-col gap-0.5">
|
<section className="panel-section flex h-full flex-col gap-0.5">
|
||||||
<DriveDockAction layout="desktop" expand={hideInlineControls} driveDockState={driveDockState} />
|
<DriveDockAction
|
||||||
|
layout="desktop"
|
||||||
|
expand={hideInlineControls}
|
||||||
|
fill={!hideInlineControls}
|
||||||
|
driveDockState={driveDockState}
|
||||||
|
/>
|
||||||
{!hideInlineControls ? <InlineCameraTilt keymap={keymap} /> : null}
|
{!hideInlineControls ? <InlineCameraTilt keymap={keymap} /> : null}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user