feat(routers): integrate Banana Pi Client API and onboard LibreSpeed measurements

Discover Ethernet routers under the board, map physical SIM slots, expose vendor controls and real telemetry, and provide packaged VPS speed tests with a live monochrome gauge. Enforce compact typography across Core and Node UI.
This commit is contained in:
DCCONSTRUCTIONS
2026-11-11 23:53:46 +03:00
parent 58ac9fe3d2
commit a49fb00b8e
208 changed files with 7007 additions and 881 deletions
@@ -1,5 +1,5 @@
import {useCallback,useEffect,useRef,useState} from 'react';
import {LoadingRegion,Button,Icon,IconButton,ResourceList,ResourceRow,SettingsCard,StatusBadge} from '@nodedc/ui-react';
import { Description,LoadingRegion,Button,Icon,IconButton,ResourceList,ResourceRow,SettingsCard,StatusBadge} from '@nodedc/ui-react';
import type {SensorDetailProps} from '../../../../packages/sensor-ui/src/extensions';
import {SensorDetailBack} from '../../../../packages/sensor-ui/src/SensorDetailBack';
import {perform} from '../../../../packages/sensor-ui/src/contracts';
@@ -56,16 +56,16 @@ export function X4Detail({device,transport,enabled,previewEnabled=enabled,back,n
<IconButton label="Обновить состояние камеры" loading={pending==='refresh'} disabled={busy||settingsLoading} onClick={()=>void action('refresh')}><Icon name="refresh"/></IconButton>
</>:recovery}/>
{available&&(status.alerts?.temperature_high||status.alerts?.storage_full||status.alerts?.battery_low)&&<SettingsCard title="Состояние камеры">
{status.alerts.temperature_high&&<p>Камера сообщает о перегреве.</p>}
{status.alerts.storage_full&&<p>На карте камеры закончилось место.</p>}
{status.alerts.battery_low&&<p>Камера сообщает о низком заряде.</p>}
{status.alerts.temperature_high&&<Description>Камера сообщает о перегреве.</Description>}
{status.alerts.storage_full&&<Description>На карте камеры закончилось место.</Description>}
{status.alerts.battery_low&&<Description>Камера сообщает о низком заряде.</Description>}
</SettingsCard>}
{available&&recovery}
{/* Keep the decoder attached while unavailable/empty content stays outside the visible layout. */}
<div hidden={!showImage}><LiveViewportSurface video={viewing.video} preview={viewing.preview} pending={viewing.pending} error={viewing.error} device={viewDevice} layer="preview" title="Изображение X4" note="Запись сохраняется на карте памяти камеры." inactiveMessage="Нет свежих данных"/></div>
{sections.capture&&<SettingsCard title="Съёмка" description="Фото и видеозапись сохраняются на карте памяти X4." actions={<StatusBadge tone={status.recording===1?'success':'neutral'}>{recordLabel}</StatusBadge>}>
<div className="sensor-actions">{status.recording===1?<Button disabled={busy} loading={pending==='record.stop'} onClick={()=>void action('record.stop')}>Остановить запись</Button>:mode===7?<Button disabled={busy} loading={pending==='record.start'} onClick={()=>void action('record.start')}>Начать запись</Button>:mode===6?<Button disabled={busy} loading={pending==='photo.capture'} onClick={()=>void action('photo.capture')}>Сделать фото</Button>:null}</div>
{status.recording===1&&<p>Запись продолжится после закрытия просмотра.</p>}
{status.recording===1&&<Description>Запись продолжится после закрытия просмотра.</Description>}
</SettingsCard>}
{available&&(settings||settingsLoading)&&<LoadingRegion loading={(settingsLoading&&!settings)||pending==='settings.apply'} label={pending==='settings.apply'?'Применение настройки':'Получение настроек камеры'}>
{settings&&<CameraSettings value={settings} disabled={busy||status.recording!==0||status.preview!==0} apply={(key,value)=>void action('settings.apply',{mode:settings.mode,key,value})}/>}