Files
sp80/sample_interface/src/app/components/views/NetworkSetupView.tsx
admin 9e3cc99bed feat: Phase 1 Foundation & Dashboard implementation
- Core infrastructure: Zustand store, API client with mock fallback
- Mode detection: Port 8080 (kiosk) / 9090 (remote)
- Dashboard components: RainfallCard, ClockDisplay, CommStatus
- Header components: VoltageDisplay, BatteryStatus, LoginIndicator
- Data polling with visibility awareness
- Bundle size: ~100KB gzipped

Also adds README.md and WIKI.md documentation
2026-03-13 06:42:55 +08:00

70 lines
2.3 KiB
TypeScript

import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
import { Input } from "../ui/input";
import { Button } from "../ui/button";
import { Label } from "../ui/label";
import { Switch } from "../ui/switch";
import { Network } from "lucide-react";
export function NetworkSetupView() {
return (
<div className="space-y-4">
<div className="flex items-center gap-3">
<Network className="w-6 h-6 text-blue-400" />
<h1 className="text-2xl font-bold text-white">Network Setup</h1>
</div>
<Card className="bg-gray-900 border-gray-700">
<CardHeader>
<CardTitle className="text-white">Network Configuration</CardTitle>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex items-center justify-between p-3 bg-gray-800 rounded">
<Label htmlFor="dhcp" className="text-gray-300">Enable DHCP</Label>
<Switch id="dhcp" />
</div>
<div className="space-y-2">
<Label htmlFor="ip-address" className="text-gray-300">IP Address</Label>
<Input
id="ip-address"
placeholder="192.168.1.100"
className="bg-gray-800 border-gray-700 text-white"
/>
</div>
<div className="space-y-2">
<Label htmlFor="subnet" className="text-gray-300">Subnet Mask</Label>
<Input
id="subnet"
placeholder="255.255.255.0"
className="bg-gray-800 border-gray-700 text-white"
/>
</div>
<div className="space-y-2">
<Label htmlFor="gateway" className="text-gray-300">Default Gateway</Label>
<Input
id="gateway"
placeholder="192.168.1.1"
className="bg-gray-800 border-gray-700 text-white"
/>
</div>
<div className="space-y-2">
<Label htmlFor="dns" className="text-gray-300">DNS Server</Label>
<Input
id="dns"
placeholder="8.8.8.8"
className="bg-gray-800 border-gray-700 text-white"
/>
</div>
<Button className="w-full bg-blue-600 hover:bg-blue-700">
Apply Network Settings
</Button>
</CardContent>
</Card>
</div>
);
}