remove status line stuff

This commit is contained in:
legop3
2026-04-26 21:17:59 -04:00
parent f565d886a8
commit 7847f5e79c
3 changed files with 15 additions and 22 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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-C8eHY4sq.js"></script> <script type="module" crossorigin src="/assets/index-DXZzGFh7.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CxK87LGk.css"> <link rel="stylesheet" crossorigin href="/assets/index-CxK87LGk.css">
</head> </head>
<body> <body>
+6 -13
View File
@@ -52,7 +52,6 @@ export default function VipNeatoCard({
fullWidth = false, fullWidth = false,
}) { }) {
const [working, setWorking] = useState(''); const [working, setWorking] = useState('');
const [message, setMessage] = useState('');
const wrapClass = fullWidth ? 'w-full' : 'w-full max-w-xl'; const wrapClass = fullWidth ? 'w-full' : 'w-full max-w-xl';
const configured = Boolean(neato?.configured); const configured = Boolean(neato?.configured);
@@ -86,7 +85,6 @@ export default function VipNeatoCard({
toneClass: 'bg-emerald-600 hover:bg-emerald-500 text-white', toneClass: 'bg-emerald-600 hover:bg-emerald-500 text-white',
canRun: canStart, canRun: canStart,
fn: onStart, fn: onStart,
successMessage: 'Start cleaning command sent.',
}; };
} }
return { return {
@@ -96,7 +94,6 @@ export default function VipNeatoCard({
toneClass: 'bg-sky-600 hover:bg-sky-500 text-white', toneClass: 'bg-sky-600 hover:bg-sky-500 text-white',
canRun: canSendHome, canRun: canSendHome,
fn: onSendHome, fn: onSendHome,
successMessage: 'Send to dock command sent.',
}; };
}, [docked, canStart, onStart, canSendHome, onSendHome]); }, [docked, canStart, onStart, canSendHome, onSendHome]);
@@ -104,15 +101,13 @@ export default function VipNeatoCard({
const canRunLocate = configured && connected && canLocate; const canRunLocate = configured && connected && canLocate;
const canRunClearErrors = configured && connected && canClearErrors; const canRunClearErrors = configured && connected && canClearErrors;
const runAction = async (key, fn, successMessage) => { const runAction = async (key, fn) => {
if (!fn) return; if (!fn) return;
setWorking(key); setWorking(key);
setMessage('');
try { try {
await fn(); await fn();
setMessage(successMessage); } catch {
} catch (err) { // Keep UI minimal; errors are intentionally silent in-panel.
setMessage(err?.message || 'Action failed.');
} finally { } finally {
setWorking(''); setWorking('');
} }
@@ -149,7 +144,7 @@ export default function VipNeatoCard({
<button <button
type="button" type="button"
disabled={!canRunPrimary || Boolean(working)} disabled={!canRunPrimary || Boolean(working)}
onClick={() => runAction(primaryAction.key, primaryAction.fn, primaryAction.successMessage)} onClick={() => runAction(primaryAction.key, primaryAction.fn)}
className={`rounded-md px-1 py-1 text-base font-semibold transition disabled:opacity-50 ${primaryAction.toneClass}`} className={`rounded-md px-1 py-1 text-base font-semibold transition disabled:opacity-50 ${primaryAction.toneClass}`}
> >
{working === primaryAction.key ? primaryAction.pending : primaryAction.label} {working === primaryAction.key ? primaryAction.pending : primaryAction.label}
@@ -159,7 +154,7 @@ export default function VipNeatoCard({
<button <button
type="button" type="button"
disabled={!canRunLocate || Boolean(working)} disabled={!canRunLocate || Boolean(working)}
onClick={() => runAction('locate', onLocate, 'Play sound command sent.')} onClick={() => runAction('locate', onLocate)}
className="rounded-md bg-fuchsia-600 px-1 py-0.75 text-sm font-semibold text-white transition hover:bg-fuchsia-500 disabled:opacity-50" className="rounded-md bg-fuchsia-600 px-1 py-0.75 text-sm font-semibold text-white transition hover:bg-fuchsia-500 disabled:opacity-50"
> >
{working === 'locate' ? 'Playing...' : 'Play sound'} {working === 'locate' ? 'Playing...' : 'Play sound'}
@@ -167,7 +162,7 @@ export default function VipNeatoCard({
<button <button
type="button" type="button"
disabled={!canRunClearErrors || Boolean(working)} disabled={!canRunClearErrors || Boolean(working)}
onClick={() => runAction('clearErrors', onClearErrors, 'Clear errors command sent.')} onClick={() => runAction('clearErrors', onClearErrors)}
className="rounded-md bg-amber-500 px-1 py-0.75 text-sm font-semibold text-slate-900 transition hover:bg-amber-400 disabled:opacity-50" className="rounded-md bg-amber-500 px-1 py-0.75 text-sm font-semibold text-slate-900 transition hover:bg-amber-400 disabled:opacity-50"
> >
{working === 'clearErrors' ? 'Clearing...' : 'Clear errors'} {working === 'clearErrors' ? 'Clearing...' : 'Clear errors'}
@@ -204,8 +199,6 @@ export default function VipNeatoCard({
: 'Waiting for required Neato entities in Home Assistant.'} : 'Waiting for required Neato entities in Home Assistant.'}
</p> </p>
) : null} ) : null}
{message ? <div className="text-xs text-slate-300 text-center">{message}</div> : null}
</div> </div>
</section> </section>
); );