import { Snowflake, Star } from 'lucide-react'; import { toast } from 'sonner'; import type { CameraTabView } from '../../../shared/api-types'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { formatUptime, parseBrowser, shortId } from '@/lib/format'; export function CameraTabRow({ tab, isCurrentTab, nowMs, onMakePrimary, }: { tab: CameraTabView; isCurrentTab: boolean; nowMs: number; onMakePrimary: (tabId: string) => Promise; }) { return (
{parseBrowser(tab.userAgent)} {isCurrentTab && ( This tab )} {tab.primary && ( Primary )} {tab.frozen && ( Frozen )}
{shortId(tab.tabId, 12)} {tab.deviceLabel && {tab.deviceLabel}} {tab.width && tab.height && ( {tab.width}×{tab.height} )} up {formatUptime(tab.connectedAt, nowMs)}
{!tab.primary && ( )}
); }