mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
tweakings
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-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
|
||||||
<title>Roomba Rover</title>
|
<title>Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-BjZM2uht.js"></script>
|
<script type="module" crossorigin src="/assets/index-CMqFLBAu.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-CxKDohQn.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-T_RLfU2D.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -82,19 +82,13 @@ export default function DriverVideoPanel({ layoutFormat = 'desktop' }) {
|
|||||||
? Math.max(0, Math.ceil(msUntilIdleSkip / 1000))
|
? Math.max(0, Math.ceil(msUntilIdleSkip / 1000))
|
||||||
: null;
|
: null;
|
||||||
const turnTimerText = useMemo(() => {
|
const turnTimerText = useMemo(() => {
|
||||||
if (!isTurnsMode) return null;
|
if (!isTurnsMode || !isActiveDriver) return null;
|
||||||
if (isActiveDriver) {
|
return turnSeconds != null ? `${turnSeconds}s left` : 'Your turn';
|
||||||
return turnSeconds != null ? `${turnSeconds}s left` : 'Your turn';
|
}, [isTurnsMode, isActiveDriver, turnSeconds]);
|
||||||
}
|
const notTurnCountdownText = useMemo(() => {
|
||||||
const parts = ['Not your turn'];
|
if (!isNotYourTurn || !isNextDriver || turnSeconds == null) return null;
|
||||||
if (isNextDriver && turnSeconds != null) {
|
return `${turnSeconds} seconds until your turn.`;
|
||||||
parts.push(`your turn in ${turnSeconds}s`);
|
}, [isNotYourTurn, isNextDriver, turnSeconds]);
|
||||||
}
|
|
||||||
if (shouldUsePreview) {
|
|
||||||
parts.push('preview to save upload bandwidth');
|
|
||||||
}
|
|
||||||
return parts.join(' • ');
|
|
||||||
}, [isTurnsMode, isActiveDriver, isNextDriver, turnSeconds, shouldUsePreview]);
|
|
||||||
const entries = roverId
|
const entries = roverId
|
||||||
? [
|
? [
|
||||||
...(shouldShowVideo ? [{ type: 'rover', id: roverId, key: roverId }] : []),
|
...(shouldShowVideo ? [{ type: 'rover', id: roverId, key: roverId }] : []),
|
||||||
@@ -177,6 +171,8 @@ export default function DriverVideoPanel({ layoutFormat = 'desktop' }) {
|
|||||||
isActiveDriver={isActiveDriver}
|
isActiveDriver={isActiveDriver}
|
||||||
idleSkipSeconds={idleSkipSeconds}
|
idleSkipSeconds={idleSkipSeconds}
|
||||||
showNotTurnNotice={isNotYourTurn}
|
showNotTurnNotice={isNotYourTurn}
|
||||||
|
notTurnCountdownText={notTurnCountdownText}
|
||||||
|
showPreviewReason={shouldUsePreview}
|
||||||
notTurnFlashAt={notTurnFlashAt}
|
notTurnFlashAt={notTurnFlashAt}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -148,8 +148,10 @@ function HudOverlay({
|
|||||||
</div>
|
</div>
|
||||||
{turnTimerText ? (
|
{turnTimerText ? (
|
||||||
<div
|
<div
|
||||||
className={`absolute left-1/2 top-0.5 -translate-x-1/2 rounded transition-colors ${
|
className={`absolute right-1 top-1 rounded border transition-colors ${
|
||||||
turnTimerFlashActive ? 'bg-red-900/80 text-red-100' : 'bg-black/70 text-slate-100'
|
turnTimerFlashActive
|
||||||
|
? 'border-red-300/90 bg-red-900/80 text-red-100'
|
||||||
|
: 'border-amber-300/80 bg-black/75 text-amber-200'
|
||||||
} ${timerPadClass} ${timerTextClass}`}
|
} ${timerPadClass} ${timerTextClass}`}
|
||||||
>
|
>
|
||||||
{turnTimerText}
|
{turnTimerText}
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ export default function VideoTile({
|
|||||||
isActiveDriver = false,
|
isActiveDriver = false,
|
||||||
idleSkipSeconds = null,
|
idleSkipSeconds = null,
|
||||||
showNotTurnNotice = false,
|
showNotTurnNotice = false,
|
||||||
|
notTurnCountdownText = null,
|
||||||
|
showPreviewReason = false,
|
||||||
notTurnFlashAt = 0,
|
notTurnFlashAt = 0,
|
||||||
}) {
|
}) {
|
||||||
const discordUrl = useSessionSelector((state) => {
|
const discordUrl = useSessionSelector((state) => {
|
||||||
@@ -687,6 +689,28 @@ export default function VideoTile({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
{!noHud && showNotTurnNotice ? (
|
||||||
|
<div className="pointer-events-none absolute right-1 top-1 z-40">
|
||||||
|
<div
|
||||||
|
className={`max-w-[18rem] rounded border ${
|
||||||
|
noticeFlashActive
|
||||||
|
? 'border-red-300/90 bg-red-900/80 text-red-100'
|
||||||
|
: 'border-amber-300/80 bg-black/75 text-amber-200'
|
||||||
|
} ${mobileHud ? 'px-2 py-1 text-[0.6rem]' : 'px-2.5 py-1.5 text-[0.72rem]'}`}
|
||||||
|
>
|
||||||
|
<div className="font-semibold">Not your turn to drive!</div>
|
||||||
|
{notTurnCountdownText ? <div>{notTurnCountdownText}</div> : null}
|
||||||
|
{showPreviewReason ? <div>Video switched to preview mode to save bandwidth.</div> : null}
|
||||||
|
<div className="pointer-events-auto mt-0.5">
|
||||||
|
<SocialButton
|
||||||
|
id="discord"
|
||||||
|
label="Join our Discord while you wait!"
|
||||||
|
url={discordUrl}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
{!noHud && !showVerticalBattery && (
|
{!noHud && !showVerticalBattery && (
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
|
|||||||
Reference in New Issue
Block a user