mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-18 02:20:47 -04:00
rename old room controls to lights and rename new thing to activity controls
Container image / image (push) Failing after 1m2s
Container image / image (push) Failing after 1m2s
This commit is contained in:
@@ -68,8 +68,8 @@ export const ACTIONS = [
|
||||
{ id: 'videoFilterCycle', label: 'Cycle video filter', kind: 'button', section: 'Camera' },
|
||||
{ id: 'songNoteUp', label: 'Play higher note', kind: 'button', section: 'Audio and chat', driveMode: 'single' },
|
||||
{ id: 'songNoteDown', label: 'Play lower note', kind: 'button', section: 'Audio and chat', driveMode: 'single' },
|
||||
{ id: 'homeAssistantOn', label: 'Turn next room control on', kind: 'button', section: 'Room controls' },
|
||||
{ id: 'homeAssistantOff', label: 'Turn next room control off', kind: 'button', section: 'Room controls' },
|
||||
{ id: 'homeAssistantOn', label: 'Turn next room light on', kind: 'button', section: 'Room lights' },
|
||||
{ id: 'homeAssistantOff', label: 'Turn next room light off', kind: 'button', section: 'Room lights' },
|
||||
/* Digital aux actions provide exact parity with the keyboard help surface. They coexist with
|
||||
analog brush controls so each operator can choose proportional triggers or discrete buttons. */
|
||||
{ id: 'auxMainForward', label: 'Main brush forward', kind: 'button', section: 'Aux buttons' },
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function HomeAssistantActivitiesPanel() {
|
||||
const connected = state.connected && socketConnected;
|
||||
// Reuse the room-control auto-fit grid and compact tile rhythm, while keeping
|
||||
// all data and commands in the Activities namespace on both device layouts.
|
||||
return <CardFrame title="Home Assistant" bodyClassName="space-y-0.5 text-sm"
|
||||
return <CardFrame title="Activity Controls" bodyClassName="space-y-0.5 text-sm"
|
||||
actions={<span className={`rounded px-1 py-0.5 text-xs font-semibold leading-none ${connected ? 'bg-emerald-900 text-emerald-100' : 'bg-amber-900 text-amber-100'}`}>{connected ? 'Connected' : 'Offline'}</span>}>
|
||||
{!connected ? <p className="px-0.5 text-xs text-amber-200">{socketConnected ? 'Home Assistant is offline.' : 'Server disconnected.'} Values may be out of date.</p> : null}
|
||||
{!allowed ? <p className="px-0.5 text-xs text-slate-400">Controls are read-only with your current access.</p> : null}
|
||||
|
||||
@@ -174,7 +174,7 @@ export default function HomeAssistantControls() {
|
||||
|
||||
/*
|
||||
Feature existence is owned here, not by each layout that happens to mount
|
||||
room controls. Disabled integrations render nothing; enabled integrations
|
||||
room lights. Disabled integrations render nothing; enabled integrations
|
||||
can still show offline/configuration states inside the panel.
|
||||
*/
|
||||
if (!enabled) return null;
|
||||
@@ -199,7 +199,7 @@ function HomeAssistantControlsContent() {
|
||||
|
||||
if (!ha?.enabled) {
|
||||
return (
|
||||
<CardFrame title="Room Controls" bodyClassName="space-y-0.5 text-sm text-slate-400">
|
||||
<CardFrame title="Room Lights" bodyClassName="space-y-0.5 text-sm text-slate-400">
|
||||
<p className="text-slate-500">Not configured on the server.</p>
|
||||
</CardFrame>
|
||||
);
|
||||
@@ -207,7 +207,7 @@ function HomeAssistantControlsContent() {
|
||||
|
||||
if (entities.length === 0) {
|
||||
return (
|
||||
<CardFrame title="Room Controls" bodyClassName="space-y-0.5 text-sm text-slate-400">
|
||||
<CardFrame title="Room Lights" bodyClassName="space-y-0.5 text-sm text-slate-400">
|
||||
<p className="text-slate-500">No lights or switches configured.</p>
|
||||
</CardFrame>
|
||||
);
|
||||
@@ -233,16 +233,16 @@ function HomeAssistantControlsContent() {
|
||||
);
|
||||
|
||||
return (
|
||||
<CardFrame title="Room Controls" actions={actions} bodyClassName="space-y-0.5 text-base">
|
||||
<CardFrame title="Room Lights" actions={actions} bodyClassName="space-y-0.5 text-base">
|
||||
{lightPolicyLocked ? (
|
||||
<p className="rounded border border-amber-600/60 bg-amber-900/40 px-1 py-0.5 text-xs text-amber-100">
|
||||
{adminCanControlLockedLights
|
||||
? lockState === 'off'
|
||||
? 'Lights are locked off. Admin room controls remain available.'
|
||||
: 'Lights are locked on. Admin room controls remain available.'
|
||||
? 'Lights are locked off. Admin room lights remain available.'
|
||||
: 'Lights are locked on. Admin room lights remain available.'
|
||||
: lockState === 'off'
|
||||
? 'Lights are locked off. Room controls are disabled.'
|
||||
: 'Lights are locked on. Room controls are disabled.'}
|
||||
? 'Lights are locked off. Room lights are disabled.'
|
||||
: 'Lights are locked on. Room lights are disabled.'}
|
||||
</p>
|
||||
) : null}
|
||||
{/* Each lamp declares only the smallest width at which its title, status,
|
||||
|
||||
@@ -36,8 +36,8 @@ const KEY_ACTIONS = [
|
||||
{ id: 'chatFocus', label: 'Toggle Chat', group: 'Chat' },
|
||||
{ id: 'songNoteUp', label: 'Song Note Up', group: 'Audio' },
|
||||
{ id: 'songNoteDown', label: 'Song Note Down', group: 'Audio' },
|
||||
{ id: 'homeAssistantOn', label: 'Room Controls On (Cycle)', group: 'Room Controls' },
|
||||
{ id: 'homeAssistantOff', label: 'Room Controls Off (Cycle)', group: 'Room Controls' },
|
||||
{ id: 'homeAssistantOn', label: 'Room Lights On (Cycle)', group: 'Room Lights' },
|
||||
{ id: 'homeAssistantOff', label: 'Room Lights Off (Cycle)', group: 'Room Lights' },
|
||||
];
|
||||
|
||||
function groupActions(actions) {
|
||||
|
||||
@@ -556,7 +556,7 @@ function PtzDesktopFullscreen({ ptz, releasePending }) {
|
||||
<PtzControlReference />
|
||||
<ReplaySourcesPanel panelId="ptz-controller-replay" defaultSelectedKey={`ptz:${PTZ_CAMERA_ID}`} />
|
||||
{/*
|
||||
Desktop keeps room controls as the final sidebar tool so camera
|
||||
Desktop keeps room lights as the final sidebar tool so camera
|
||||
turn controls and replay remain above the less-frequent room-wide
|
||||
actions. HomeAssistantControls owns its own feature and policy gate.
|
||||
*/}
|
||||
@@ -604,7 +604,7 @@ function PtzMobileLandscape({ ptz, onClose, releasePending = false }) {
|
||||
</main>
|
||||
{/*
|
||||
The right control column is naturally taller than the viewport.
|
||||
Placing room controls after the fixed-height video uses that left-
|
||||
Placing room lights after the fixed-height video uses that left-
|
||||
column space while the whole landscape page continues scrolling as
|
||||
one surface.
|
||||
*/}
|
||||
@@ -678,7 +678,7 @@ function PtzMobilePortrait({ ptz, onClose, releasePending = false }) {
|
||||
</div>
|
||||
<PtzQueueSummary ptz={ptz} />
|
||||
<ChatPanel title="Chat" allowSpectatorInput inputTarget="overlay" />
|
||||
{/* Portrait keeps room controls immediately after chat as requested. */}
|
||||
{/* Portrait keeps room lights immediately after chat as requested. */}
|
||||
<HomeAssistantControls />
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -189,7 +189,7 @@ export function ControlSystemProvider({ children }) {
|
||||
Automatic drive-mode lighting is convenience behavior for the open room.
|
||||
A room-light lock is an explicit policy decision, including locked-off,
|
||||
so this helper must not issue any Home Assistant commands while that
|
||||
policy is active. Admins can still use the dedicated room controls when
|
||||
policy is active. Admins can still use the dedicated room lights when
|
||||
they need to override individual lamps.
|
||||
*/
|
||||
if (roomLightsLocked) {
|
||||
|
||||
@@ -328,7 +328,7 @@ export default function KeyboardInputManager() {
|
||||
shortcuts are part of the public room-control surface. Admin sessions are
|
||||
allowed through when the current site mode would also allow their socket
|
||||
command, so keyboard behavior matches the server-side authorization and
|
||||
the clickable Room Controls panel.
|
||||
the clickable Room Lights panel.
|
||||
*/
|
||||
if ((ha?.lightPolicy?.locked || ha?.lightPolicy?.lockedOn) && !latest?.adminCanControlLockedLights) return;
|
||||
const entities = ha.entities || [];
|
||||
|
||||
@@ -112,10 +112,10 @@ export const HELP_CONTENT = {
|
||||
},
|
||||
{
|
||||
id: 'room-controls',
|
||||
title: 'Room Controls',
|
||||
title: 'Room Lights',
|
||||
items: [
|
||||
{ action: 'homeAssistantOn', label: 'Next room control on' },
|
||||
{ action: 'homeAssistantOff', label: 'Next room control off (reverse)' },
|
||||
{ action: 'homeAssistantOn', label: 'Next room light on' },
|
||||
{ action: 'homeAssistantOff', label: 'Next room light off (reverse)' },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -163,7 +163,7 @@ export const HELP_CONTENT = {
|
||||
type: 'list',
|
||||
title: 'More controls',
|
||||
items: [
|
||||
'Chat, Activities, VIP, Room Controls, Help, and Settings are below the rover controls.',
|
||||
'Chat, Activities, VIP, Room Lights, Help, and Settings are below the rover controls.',
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -200,7 +200,7 @@ export const HELP_CONTENT = {
|
||||
type: 'list',
|
||||
title: 'More controls',
|
||||
items: [
|
||||
'Chat, Activities, VIP, Room Controls, Help, and Settings are below the rover controls.',
|
||||
'Chat, Activities, VIP, Room Lights, Help, and Settings are below the rover controls.',
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -21,7 +21,7 @@ export default function MobileTabs() {
|
||||
<Tab id="chat">Chat</Tab>
|
||||
<Tab id="activities">Activities</Tab>
|
||||
<VipTabButton compact />
|
||||
<Tab id="roomcontrols">Room Controls</Tab>
|
||||
<Tab id="roomcontrols">Room Lights</Tab>
|
||||
<Tab id="help">Help</Tab>
|
||||
<Tab id="settings">Settings</Tab>
|
||||
</TabList>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Mobile Room Controls Tab
|
||||
// Mobile Room Lights Tab
|
||||
// Purpose: Owns the concrete mobile room-controls card order.
|
||||
import { TabPanel } from '../../../../../components/Tabs/index.jsx';
|
||||
import HomeAssistantControls from '../../../../../components/HomeAssistantControls/index.jsx';
|
||||
|
||||
Reference in New Issue
Block a user