mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-07 00:34:42 +00:00

Updates the IP address on home view to open a copyable list of node addresses on click. And makes various values on the details view copyable text items, mirroring the machine admin panel table. As part of these changes, pulls the AddressCard, NiceIP and QuickCopy components from the admin panel, with the AddressCard slightly modified to avoid needing to also pull in the CommandLine component. A new toaster interface is also added, allowing us to display success and failure toasts throughout the UI. The toaster code is slightly modified from it's admin form to avoid the need for some excess libraries. Updates #10261 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
34 lines
783 B
TypeScript
34 lines
783 B
TypeScript
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Preserved js license comment for web client app.
|
|
/**
|
|
* @license
|
|
* Copyright (c) Tailscale Inc & AUTHORS
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
import React from "react"
|
|
import { createRoot } from "react-dom/client"
|
|
import App from "src/components/app"
|
|
import ToastProvider from "src/ui/toaster"
|
|
|
|
declare var window: any
|
|
// This is used to determine if the react client is built.
|
|
window.Tailscale = true
|
|
|
|
const rootEl = document.createElement("div")
|
|
rootEl.id = "app-root"
|
|
rootEl.classList.add("relative", "z-0")
|
|
document.body.append(rootEl)
|
|
|
|
const root = createRoot(rootEl)
|
|
|
|
root.render(
|
|
<React.StrictMode>
|
|
<ToastProvider>
|
|
<App />
|
|
</ToastProvider>
|
|
</React.StrictMode>
|
|
)
|