import { Computer, FileKey2 } from 'lucide-react'; import { useState } from 'react'; import { useNavigate } from 'react-router'; import Code from '~/components/Code'; import Dialog from '~/components/Dialog'; import Input from '~/components/Input'; import Menu from '~/components/Menu'; import Select from '~/components/Select'; import type { User } from '~/types'; export interface NewMachineProps { server: string; users: User[]; isDisabled?: boolean; disabledKeys?: string[]; } export default function NewMachine(data: NewMachineProps) { const [pushDialog, setPushDialog] = useState(false); const [mkey, setMkey] = useState(''); const navigate = useNavigate(); return ( <> Register Machine Key The machine key is given when you run{' '} tailscale up --login-server={data.server} on your device. Add Device { if (key === 'register') { setPushDialog(true); return; } if (key === 'pre-auth') { navigate('/settings/auth-keys'); } }} >
Register Machine Key
Generate Pre-auth Key
); }