diff --git a/client/web/assets.go b/client/web/assets.go index ad6dc4970..c4af0694b 100644 --- a/client/web/assets.go +++ b/client/web/assets.go @@ -35,7 +35,7 @@ func startDevServer() (cleanup func()) { node := filepath.Join(root, "tool", "node") vite := filepath.Join(webClientPath, "node_modules", ".bin", "vite") - log.Printf("installing JavaScript deps using %s... (might take ~30s)", yarn) + log.Printf("installing JavaScript deps using %s...", yarn) out, err := exec.Command(yarn, "--non-interactive", "-s", "--cwd", webClientPath, "install").CombinedOutput() if err != nil { log.Fatalf("error running tailscale web's yarn install: %v, %s", err, out) diff --git a/client/web/src/components/app.tsx b/client/web/src/components/app.tsx index 488abedca..b9e2827f0 100644 --- a/client/web/src/components/app.tsx +++ b/client/web/src/components/app.tsx @@ -2,10 +2,10 @@ import cx from "classnames" import React from "react" import LegacyClientView from "src/components/views/legacy-client-view" import LoginClientView from "src/components/views/login-client-view" +import ManagementClientView from "src/components/views/management-client-view" import ReadonlyClientView from "src/components/views/readonly-client-view" import useAuth, { AuthResponse, SessionsCallbacks } from "src/hooks/auth" import useNodeData from "src/hooks/node-data" -import ManagementClientView from "./views/management-client-view" export default function App() { const { data: auth, loading: loadingAuth, sessions } = useAuth() diff --git a/client/web/src/components/views/management-client-view.tsx b/client/web/src/components/views/management-client-view.tsx index aa26b258b..6f9cc1b14 100644 --- a/client/web/src/components/views/management-client-view.tsx +++ b/client/web/src/components/views/management-client-view.tsx @@ -1,35 +1,107 @@ +import cx from "classnames" import React from "react" import { NodeData } from "src/hooks/node-data" +import { ReactComponent as ArrowRight } from "src/icons/arrow-right.svg" +import { ReactComponent as ChevronDown } from "src/icons/chevron-down.svg" import { ReactComponent as ConnectedDeviceIcon } from "src/icons/connected-device.svg" import { ReactComponent as TailscaleIcon } from "src/icons/tailscale-icon.svg" import ProfilePic from "src/ui/profile-pic" export default function ManagementClientView(props: NodeData) { return ( -
+

{props.Profile.LoginName}

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

This device

-
-
+ +

This device

+ +
+
-

{props.DeviceName}

+
+

+ {props.DeviceName} +

+ {/* TODO(sonia): display actual status */} +

Connected

+
-

{props.IP}

+

+ {props.IP} +

+ + + View device details → + +
+ +

Settings

+ + + +
+ ) +} + +function ExitNodeSelector({ className }: { className?: string }) { + return ( +
+
+

+ Exit node +

+
+

None

+ +
+
+
+ ) +} + +function SettingsCard({ + title, + body, + className, +}: { + title: string + body: string + className?: string +}) { + return ( +
+
+

+ {title} +

+

{body}

+
+
+
-

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

-
) } diff --git a/client/web/src/icons/arrow-right.svg b/client/web/src/icons/arrow-right.svg new file mode 100644 index 000000000..fbc4bb7ae --- /dev/null +++ b/client/web/src/icons/arrow-right.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/web/src/icons/chevron-down.svg b/client/web/src/icons/chevron-down.svg new file mode 100644 index 000000000..7d32b1de8 --- /dev/null +++ b/client/web/src/icons/chevron-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/client/web/src/index.css b/client/web/src/index.css index cb02a1161..a1a9c5ebd 100644 --- a/client/web/src/index.css +++ b/client/web/src/index.css @@ -2,6 +2,25 @@ @tailwind components; @tailwind utilities; +@layer base { + h1 { + @apply text-neutral-500 text-sm font-medium uppercase leading-tight tracking-wide; + } +} + +@layer components { + .card { + @apply p-5 bg-white rounded-lg border border-gray-200; + } + + .hover-button { + @apply px-2 py-1.5 bg-white rounded-[1px] cursor-pointer; + } + .hover-button:hover { + @apply bg-stone-100; + } +} + /** * Non-Tailwind styles begin here. */