mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
new color for dock assist mode
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -11,8 +11,8 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
|
||||
<title>Roomba Rover</title>
|
||||
<script type="module" crossorigin src="/assets/index-BXWYmEhc.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DB8kOgVk.css">
|
||||
<script type="module" crossorigin src="/assets/index-Hq0EgAdl.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-LJWnKvT4.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -206,6 +206,8 @@ export default function DriveDockAction({
|
||||
'border-amber-300/70 bg-amber-900 text-amber-50 hover:bg-amber-800 focus-visible:ring-amber-300';
|
||||
const indigoCta =
|
||||
'border-indigo-300/70 bg-indigo-900 text-indigo-50 hover:bg-indigo-800 focus-visible:ring-indigo-300';
|
||||
const cyanCta =
|
||||
'border-cyan-300/70 bg-cyan-900 text-cyan-50 hover:bg-cyan-800 focus-visible:ring-cyan-300';
|
||||
const orangeCta =
|
||||
'border-amber-300/70 bg-amber-900 text-amber-50 hover:bg-amber-800 focus-visible:ring-amber-300';
|
||||
const forceExpanded = dockingInProgress;
|
||||
@@ -302,9 +304,9 @@ export default function DriveDockAction({
|
||||
className={
|
||||
isMobile
|
||||
? `flex w-full ${baseCardClasses} ${compactHeight} ${ctaText} ${layoutClass} ${ctaSize} ${
|
||||
compactDockedDriving ? orangeCta : indigoCta
|
||||
manualAssistActive ? cyanCta : compactDockedDriving ? orangeCta : indigoCta
|
||||
}`
|
||||
: `${baseCardClasses} ${filledHeight} ${ctaText} ${ctaLayout} ${ctaSize} ${indigoCta}`
|
||||
: `${baseCardClasses} ${filledHeight} ${ctaText} ${ctaLayout} ${ctaSize} ${manualAssistActive ? cyanCta : indigoCta}`
|
||||
}
|
||||
>
|
||||
<div className="flex w-full flex-col items-center gap-0.25">
|
||||
|
||||
@@ -42,7 +42,7 @@ function ManualDockAssistOverlay({ mobileHud = false }) {
|
||||
? 'border-emerald-200/90 bg-emerald-900/90 text-emerald-50'
|
||||
: statusTone === 'warn'
|
||||
? 'border-amber-200/90 bg-amber-900/90 text-amber-50'
|
||||
: 'border-indigo-200/90 bg-indigo-900/90 text-indigo-50';
|
||||
: 'border-cyan-200/90 bg-cyan-900/90 text-cyan-50';
|
||||
|
||||
return (
|
||||
<div className="pointer-events-none absolute inset-0">
|
||||
|
||||
@@ -31,8 +31,11 @@ export function useManualDockAssist(options = {}) {
|
||||
useEffect(() => {
|
||||
if (!manageLifecycle) return;
|
||||
const justDocked = docked && !wasDockedRef.current;
|
||||
const justUndocked = !docked && wasDockedRef.current;
|
||||
if (active && justDocked) {
|
||||
actions.sendSong([{ note: 84, duration: 6 }], { slot: 1 });
|
||||
} else if (active && justUndocked) {
|
||||
actions.sendSong([{ note: 72, duration: 6 }], { slot: 1 });
|
||||
}
|
||||
wasDockedRef.current = docked;
|
||||
}, [actions, active, docked, manageLifecycle]);
|
||||
@@ -62,4 +65,3 @@ export function useManualDockAssist(options = {}) {
|
||||
[active, charging, docked, enterAssist, exitAssist, statusLabel, statusTone, toggleAssist, visible],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user