import { Tab, TabList, makeStyles, typographyStyles, } from "@fluentui/react-components"; import { DesktopFilled, DesktopRegular, InfoFilled, InfoRegular, bundleIcon, } from "@fluentui/react-icons"; import React from "react"; import { ServerApi } from "./api/ServerApi"; import { AuthRouteWidget } from "./routes/AuthRouteWidget"; import { AsyncWidget } from "./widgets/AsyncWidget"; import { MainMenu } from "./widgets/MainMenu"; import { SystemInfoWidget } from "./widgets/SystemInfoWidget"; import { VirtualMachinesWidget } from "./widgets/VirtualMachinesWidget"; const useStyles = makeStyles({ title: typographyStyles.title2, }); const InfoIcon = bundleIcon(InfoFilled, InfoRegular); const DesktopIcon = bundleIcon(DesktopFilled, DesktopRegular); export function App() { return ( } /> ); } function AppInner(): React.ReactElement { const styles = useStyles(); const [tab, setTab] = React.useState<"vm" | "info">("vm"); if (!ServerApi.Config.authenticated && !ServerApi.Config.disable_auth) return ; return (
VirtWebRemote
setTab(d.value as any)} > }> Virtual machines }> System info
{tab === "vm" && } {tab === "info" && }
); }