Initial implementation of Bluetooth toy control app
Next.js app with a browser-side buttplug/buttplug-wasm control layer (server never touches real-time device commands), SQLite storage via Drizzle, single-secret auth, recordings/replay with device remapping, a usage stats dashboard, Docker deployment, and Gitea CI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8WkFF5ppURBAB918593Eb
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"use client";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Bluetooth, LoaderCircle } from "lucide-react";
|
||||
|
||||
interface DeviceScanPanelProps {
|
||||
scanning: boolean;
|
||||
onScan: () => void;
|
||||
onStopScan: () => void;
|
||||
}
|
||||
|
||||
export function DeviceScanPanel({ scanning, onScan, onStopScan }: DeviceScanPanelProps) {
|
||||
return (
|
||||
<Button onClick={scanning ? onStopScan : onScan} variant={scanning ? "outline" : "default"}>
|
||||
{scanning ? (
|
||||
<>
|
||||
<LoaderCircle className="size-4 animate-spin" /> Stop scanning
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Bluetooth className="size-4" /> Scan for devices
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user