MCPcopy Create free account
hub / github.com/botbotrobotics/BotBrain / getConnectionText

Function getConnectionText

frontend/src/components/robot-header.tsx:277–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275
276 // Get connection status text with robot name
277 const getConnectionText = () => {
278 if (connection.connectedRobot && connection.online) {
279 return `Connected to ${connection.connectedRobot.name}`;
280 }
281
282 switch (connectionStatus) {
283 case 'connected':
284 return t('robotHeader', 'connected');
285 case 'connecting':
286 return t('robotHeader', 'connecting');
287 case 'error':
288 case 'idle':
289 default:
290 return t('robotHeader', 'disconnected');
291 }
292 };
293
294 // Get connection text color
295 const getConnectionTextClass = () => {

Callers 1

RobotHeaderFunction · 0.85

Calls 1

tFunction · 0.85

Tested by

no test coverage detected