// Copyright (c) 2022 Tailscale Inc & AUTHORS All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. export function Header({ state, ipn }: { state: IPNState; ipn?: IPN }) { const stateText = STATE_LABELS[state] let logoutButton if (state === "Running") { logoutButton = ( ) } return (

Tailscale Connect

{stateText}
{logoutButton}
) } const STATE_LABELS = { NoState: "Initializing…", InUseOtherUser: "In-use by another user", NeedsLogin: "Needs login", NeedsMachineAuth: "Needs authorization", Stopped: "Stopped", Starting: "Starting…", Running: "Running", } as const