Files
hostinfo/components/Local.tsx
T
x da23868817 Add host info views and network error handling
Introduce modular host info UI components: Header, InfoRow,
CopyButton, and Browser/Local/Public views. Refactor ServerInfo to
compose these components.

Add network error handling: background listens for webRequest
onErrorOccurred and forwards errors to Tab.handleError. Implement
Tab.handleError to store friendly error info and Tab.processSystemPage
to handle browser/system pages.
2026-02-03 05:22:28 +01:00

31 lines
810 B
TypeScript

import { CpuChipIcon, ServerIcon } from '@heroicons/react/24/outline';
import { Header } from './Header';
import { InfoRow } from './Info';
import type { HostInfo } from '@/utils/types';
export const LocalNetworkView = ({ data }: { data: HostInfo }) => {
return (
<div className="w-80 bg-white dark:bg-gray-950 font-sans">
<Header
title={data.domain}
flagCode="unknown"
/>
<div className="p-5">
<InfoRow
icon={CpuChipIcon}
label="Type"
value="Local / Private Network"
iconColor="text-orange-500"
/>
<InfoRow
icon={ServerIcon}
label="IP Address"
value={data.network?.ip || null}
canCopy
iconColor="text-blue-500"
/>
</div>
</div>
);
};