|
|
@@ -1,13 +1,11 @@
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
-import React, { useState } from "react"
|
|
|
+import React from "react"
|
|
|
import { useAPI } from "src/api"
|
|
|
import TailscaleIcon from "src/assets/icons/tailscale-icon.svg?react"
|
|
|
import { NodeData } from "src/types"
|
|
|
import Button from "src/ui/button"
|
|
|
-import Collapsible from "src/ui/collapsible"
|
|
|
-import Input from "src/ui/input"
|
|
|
|
|
|
/**
|
|
|
* LoginView is rendered when the client is not authenticated
|
|
|
@@ -15,8 +13,6 @@ import Input from "src/ui/input"
|
|
|
*/
|
|
|
export default function LoginView({ data }: { data: NodeData }) {
|
|
|
const api = useAPI()
|
|
|
- const [controlURL, setControlURL] = useState<string>("")
|
|
|
- const [authKey, setAuthKey] = useState<string>("")
|
|
|
|
|
|
return (
|
|
|
<div className="mb-8 py-6 px-8 bg-white rounded-md shadow-2xl">
|
|
|
@@ -88,8 +84,6 @@ export default function LoginView({ data }: { data: NodeData }) {
|
|
|
action: "up",
|
|
|
data: {
|
|
|
Reauthenticate: true,
|
|
|
- ControlURL: controlURL,
|
|
|
- AuthKey: authKey,
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
@@ -98,34 +92,6 @@ export default function LoginView({ data }: { data: NodeData }) {
|
|
|
>
|
|
|
Log In
|
|
|
</Button>
|
|
|
- <Collapsible trigger="Advanced options">
|
|
|
- <h4 className="font-medium mb-1 mt-2">Auth Key</h4>
|
|
|
- <p className="text-sm text-gray-500">
|
|
|
- Connect with a pre-authenticated key.{" "}
|
|
|
- <a
|
|
|
- href="https://tailscale.com/kb/1085/auth-keys/"
|
|
|
- className="link"
|
|
|
- target="_blank"
|
|
|
- rel="noreferrer"
|
|
|
- >
|
|
|
- Learn more →
|
|
|
- </a>
|
|
|
- </p>
|
|
|
- <Input
|
|
|
- className="mt-2"
|
|
|
- value={authKey}
|
|
|
- onChange={(e) => setAuthKey(e.target.value)}
|
|
|
- placeholder="tskey-auth-XXX"
|
|
|
- />
|
|
|
- <h4 className="font-medium mt-3 mb-1">Server URL</h4>
|
|
|
- <p className="text-sm text-gray-500">Base URL of control server.</p>
|
|
|
- <Input
|
|
|
- className="mt-2"
|
|
|
- value={controlURL}
|
|
|
- onChange={(e) => setControlURL(e.target.value)}
|
|
|
- placeholder="https://login.tailscale.com/"
|
|
|
- />
|
|
|
- </Collapsible>
|
|
|
</>
|
|
|
)}
|
|
|
</div>
|