client/web: add initial framework for exit node selector

Updates tailscale/corp#14335

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-11-07 11:16:23 -05:00
committed by Sonia Appasamy
parent de2af54ffc
commit 5e095ddc20
8 changed files with 202 additions and 34 deletions

View File

@ -68,7 +68,7 @@ function HomeView({
data: NodeData
newSession: () => Promise<void>
refreshData: () => Promise<void>
updateNode: (update: NodeUpdate) => void
updateNode: (update: NodeUpdate) => Promise<void> | undefined
}) {
return (
<>
@ -80,7 +80,7 @@ function HomeView({
/>
) : data.DebugMode === "full" && auth?.ok ? (
// Render new client interface in management mode.
<ManagementClientView {...data} />
<ManagementClientView node={data} updateNode={updateNode} />
) : data.DebugMode === "login" || data.DebugMode === "full" ? (
// Render new client interface in readonly mode.
<ReadonlyClientView data={data} auth={auth} newSession={newSession} />