mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
descriptgone
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-title" content="Roomba Rover" />
|
||||
<title>Roomba Rover</title>
|
||||
<script type="module" crossorigin src="/assets/index-CytRh6tl.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CIVGcUvT.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-tJ18YrEo.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -27,7 +27,6 @@ export default function RoverDescriptionOverlay({
|
||||
displayKey || `${effectiveRoverId || ''}::${resolvedDescription || ''}`;
|
||||
const [largeVisible, setLargeVisible] = useState(false);
|
||||
const [largeFading, setLargeFading] = useState(false);
|
||||
const baselineIntentRef = useRef(0);
|
||||
const fadeTimerRef = useRef(null);
|
||||
const hideTimerRef = useRef(null);
|
||||
|
||||
@@ -51,14 +50,13 @@ export default function RoverDescriptionOverlay({
|
||||
clearTimeout(hideTimerRef.current);
|
||||
setLargeVisible(true);
|
||||
setLargeFading(false);
|
||||
baselineIntentRef.current = Number(resolvedControlIntentAt) || 0;
|
||||
return undefined;
|
||||
}, [resolvedDescription, resolvedDisplayKey, resolvedControlIntentAt, variant]);
|
||||
}, [resolvedDescription, resolvedDisplayKey, variant]);
|
||||
|
||||
useEffect(() => {
|
||||
if (variant !== 'default' || !resolvedDescription || !largeVisible || largeFading) return;
|
||||
const nextIntent = Number(resolvedControlIntentAt) || 0;
|
||||
if (nextIntent <= baselineIntentRef.current) return;
|
||||
if (nextIntent <= 0) return;
|
||||
if (fadeTimerRef.current || hideTimerRef.current) return;
|
||||
fadeTimerRef.current = setTimeout(() => {
|
||||
setLargeFading(true);
|
||||
|
||||
Reference in New Issue
Block a user