import React from "react" import { Footer, Header, IP, State } from "src/components/legacy" import useNodeData, { NodeData } from "src/hooks/node-data" import { ReactComponent as ConnectedDeviceIcon } from "src/icons/connected-device.svg" import { ReactComponent as TailscaleIcon } from "src/icons/tailscale-icon.svg" import { ReactComponent as TailscaleLogo } from "src/icons/tailscale-logo.svg" export default function App() { // TODO(sonia): use isPosting value from useNodeData // to fill loading states. const { data, refreshData, updateNode } = useNodeData() if (!data) { // TODO(sonia): add a loading view return
Loading...
} const needsLogin = data?.Status === "NeedsLogin" || data?.Status === "NoState" return !needsLogin && (data.DebugMode === "login" || data.DebugMode === "full") ? (
{data.DebugMode === "login" ? ( ) : ( )}
) : ( // Legacy client UI
) } function LoginView(props: NodeData) { return ( <>
Owned by
{/* TODO(sonia): support tagged node profile view more eloquently */} {props.Profile.LoginName}
{props.DeviceName}
{props.IP}
) } function ManageView(props: NodeData) { return (

{props.Profile.LoginName}

{/* TODO(sonia): support tagged node profile view more eloquently */}

This device

{props.DeviceName}

{props.IP}

Tailscale is up and running. You can connect to this device from devices in your tailnet by using its name or IP address.

) } function ProfilePic({ url }: { url: string }) { return (
{url ? (
) : (
)}
) }