mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 17:40:46 -04:00
change layout of replay panel
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
@@ -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="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-SkeU6Ymg.js"></script>
|
<script type="module" crossorigin src="/assets/index-BbhgEbHf.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-C47xw0G6.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-C47xw0G6.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -220,13 +220,17 @@ export default function ReplaySourcesPanel({ panelId = 'replay-sources', fillHei
|
|||||||
<GroupList title="Room Cams" items={grouped.rooms} selected={selected} onToggle={toggleKey} />
|
<GroupList title="Room Cams" items={grouped.rooms} selected={selected} onToggle={toggleKey} />
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<label className="panel-muted block text-xs" htmlFor={`${panelId}-title`}>
|
<div className="flex items-center gap-0.5">
|
||||||
Replay title
|
<label className="panel-muted shrink-0 text-xs" htmlFor={`${panelId}-title`}>
|
||||||
</label>
|
Replay title
|
||||||
|
</label>
|
||||||
|
{/* The label has fixed-width content, while the input owns the remaining row space.
|
||||||
|
This keeps the title control compact without making the input compete with
|
||||||
|
other controls or wrapping unpredictably on narrow panel layouts. */}
|
||||||
<input
|
<input
|
||||||
id={`${panelId}-title`}
|
id={`${panelId}-title`}
|
||||||
type="text"
|
type="text"
|
||||||
className="field-input w-full text-xs"
|
className="field-input min-w-0 flex-1 text-xs"
|
||||||
value={title}
|
value={title}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const next = event.target.value;
|
const next = event.target.value;
|
||||||
@@ -237,27 +241,32 @@ export default function ReplaySourcesPanel({ panelId = 'replay-sources', fillHei
|
|||||||
placeholder={defaultTitle}
|
placeholder={defaultTitle}
|
||||||
maxLength={120}
|
maxLength={120}
|
||||||
/>
|
/>
|
||||||
<label className="surface flex items-center gap-0.5 text-xs">
|
</div>
|
||||||
<input
|
<div className="flex items-center gap-0.5">
|
||||||
type="checkbox"
|
<label className="surface flex shrink-0 items-center gap-0.5 text-xs">
|
||||||
checked={includeSidebar}
|
<input
|
||||||
onChange={(event) => {
|
type="checkbox"
|
||||||
const next = Boolean(event.target.checked);
|
checked={includeSidebar}
|
||||||
setIncludeSidebar(next);
|
onChange={(event) => {
|
||||||
saveSettings((current) => ({ ...(current || {}), [`${panelId}:includeSidebar`]: next }));
|
const next = Boolean(event.target.checked);
|
||||||
}}
|
setIncludeSidebar(next);
|
||||||
className="accent-emerald-400"
|
saveSettings((current) => ({ ...(current || {}), [`${panelId}:includeSidebar`]: next }));
|
||||||
/>
|
}}
|
||||||
<span>Include replay sidebar</span>
|
className="accent-emerald-400"
|
||||||
</label>
|
/>
|
||||||
<button
|
<span>Sidebar</span>
|
||||||
type="button"
|
</label>
|
||||||
className="button-dark w-full text-xs disabled:opacity-40"
|
{/* The sidebar toggle is stable-width, so the replay button can expand into the
|
||||||
onClick={handleReplay}
|
rest of the row and preserve the compact two-row control layout. */}
|
||||||
disabled={replayDisabled}
|
<button
|
||||||
>
|
type="button"
|
||||||
{remainingMs > 0 ? `Replay (${Math.ceil(remainingMs / 1000)}s)` : busy ? 'Replay…' : 'Replay'}
|
className="button-dark min-w-0 flex-1 text-xs disabled:opacity-40"
|
||||||
</button>
|
onClick={handleReplay}
|
||||||
|
disabled={replayDisabled}
|
||||||
|
>
|
||||||
|
{remainingMs > 0 ? `Replay (${Math.ceil(remainingMs / 1000)}s)` : busy ? 'Replay…' : 'Replay'}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
{error ? <div className="text-xs text-amber-400">{error}</div> : null}
|
{error ? <div className="text-xs text-amber-400">{error}</div> : null}
|
||||||
{activeJobStatusText ? (
|
{activeJobStatusText ? (
|
||||||
<div className={`text-xs ${activeReplayJob?.status === 'failed' ? 'text-amber-400' : 'text-emerald-300'}`}>
|
<div className={`text-xs ${activeReplayJob?.status === 'failed' ? 'text-amber-400' : 'text-emerald-300'}`}>
|
||||||
|
|||||||
Reference in New Issue
Block a user