mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 01:50:47 -04:00
comments and descriptions
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// Spectator app compatibility root.
|
||||
// Spectator App Root
|
||||
// Purpose: Defines the Spectator App Root module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import SpectatorContent from './SpectatorContent.jsx';
|
||||
|
||||
export default function SpectatorAppRoot() {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Main spectator screen layout and feed wiring.
|
||||
// Spectator Content
|
||||
// Purpose: Defines the Spectator Content module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import { useSession } from '../../context/SessionContext.jsx';
|
||||
import { useTelemetryFrames } from '../../context/TelemetryContext.jsx';
|
||||
import { useVideoRequests } from '../../hooks/useVideoRequests.js';
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Log panel wrapper row for spectator layout.
|
||||
// Logs Row
|
||||
// Purpose: Defines the Logs Row module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import LogPanel from '../../../components/LogPanel/index.jsx';
|
||||
|
||||
export default function LogsRow({ className = '' }) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Rover grid row for spectator view.
|
||||
// Rover Row
|
||||
// Purpose: Defines the Rover Row module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import RoverSpectatorCard from './RoverSpectatorCard.jsx';
|
||||
|
||||
export default function RoverRow({ roster, frames, videoSources, snapshotFeeds, audioSources, session, canSpectateVideo }) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Single rover spectator card containing live/snapshot tile and HUD.
|
||||
// Rover Spectator Card
|
||||
// Purpose: Defines the Rover Spectator Card module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import VideoTile from '../../../components/VideoTile/index.jsx';
|
||||
import { formatDriverLabel } from '../utils.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Secondary panel row showing room cameras.
|
||||
// Secondary Row
|
||||
// Purpose: Defines the Secondary Row module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import RoomCameraPanel from '../../../components/RoomCameraPanel/index.jsx';
|
||||
|
||||
export default function SecondaryRow() {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Detect portrait-oriented viewport layout mode for spectator UI.
|
||||
// use Portrait Layout
|
||||
// Purpose: Defines the use Portrait Layout module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export default function usePortraitLayout() {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// Spectator app display formatting helpers.
|
||||
// utils
|
||||
// Purpose: Defines the utils module and the local helpers/components used in this file.
|
||||
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
|
||||
export function formatDriverLabel({ roverId, session }) {
|
||||
const activeDriverId = session?.activeDrivers?.[roverId] || null;
|
||||
const user = (session?.users || []).find((entry) => entry.socketId === activeDriverId);
|
||||
|
||||
Reference in New Issue
Block a user