diff --git a/src/cloud/CloudConnect.tsx b/src/cloud/CloudConnect.tsx new file mode 100644 index 0000000..f3cb2d7 --- /dev/null +++ b/src/cloud/CloudConnect.tsx @@ -0,0 +1,5 @@ +export const CloudConnect = ({ accentColor }: { accentColor: string }) => { + return null; +}; + +export const CLOUD_ENABLED = false; diff --git a/src/cloud/README.md b/src/cloud/README.md new file mode 100644 index 0000000..c169d34 --- /dev/null +++ b/src/cloud/README.md @@ -0,0 +1 @@ +Files in this `cloud/` directory can be ignored. They are mocks which we override in our private, hosted version of the agents-playground that supports LiveKit Cloud authentication. \ No newline at end of file diff --git a/src/cloud/useCloud.tsx b/src/cloud/useCloud.tsx new file mode 100644 index 0000000..4353372 --- /dev/null +++ b/src/cloud/useCloud.tsx @@ -0,0 +1,3 @@ +export function CloudProvider({ children }: { children: React.ReactNode }) { + return <>{children}>; +} \ No newline at end of file diff --git a/src/components/PlaygroundConnect.tsx b/src/components/PlaygroundConnect.tsx index 8468e02..63e8567 100644 --- a/src/components/PlaygroundConnect.tsx +++ b/src/components/PlaygroundConnect.tsx @@ -1,4 +1,5 @@ import { useConfig } from "@/hooks/useConfig"; +import { CLOUD_ENABLED, CloudConnect } from "../cloud/CloudConnect"; import { Button } from "./button/Button"; import { useState } from "react"; @@ -7,25 +8,34 @@ type PlaygroundConnectProps = { onConnectClicked: () => void; }; -export const PlaygroundConnect = ({ +const ConnectTab = ({ active, onClick, children }: any) => { + let className = "px-2 py-1 text-sm"; + + if (active) { + className += " border-b border-cyan-500 text-cyan-500"; + } else { + className += " text-gray-500 border-b border-transparent"; + } + + return ( + + ); +}; + +const TokenConnect = ({ accentColor, onConnectClicked, }: PlaygroundConnectProps) => { const { setUserSettings, config } = useConfig(); - const [url, setUrl] = useState(config.settings.ws_url) - const [token, setToken] = useState(config.settings.token) + const [url, setUrl] = useState(config.settings.ws_url); + const [token, setToken] = useState(config.settings.token); return (
- Connect LiveKit Agent Playground with a custom server using LiveKit - Cloud or LiveKit Server. -
-+ {copy} +
+