Merge branch 'main' into add_proxy_config
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
RotateCcw,
|
||||
Settings,
|
||||
HelpCircle,
|
||||
RefreshCwOff,
|
||||
} from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
@@ -51,6 +52,7 @@ interface SidebarProps {
|
||||
bearerToken: string;
|
||||
setBearerToken: (token: string) => void;
|
||||
onConnect: () => void;
|
||||
onDisconnect: () => void;
|
||||
stdErrNotifications: StdErrNotification[];
|
||||
logLevel: LoggingLevel;
|
||||
sendLogLevelRequest: (level: LoggingLevel) => void;
|
||||
@@ -74,6 +76,7 @@ const Sidebar = ({
|
||||
bearerToken,
|
||||
setBearerToken,
|
||||
onConnect,
|
||||
onDisconnect,
|
||||
stdErrNotifications,
|
||||
logLevel,
|
||||
sendLogLevelRequest,
|
||||
@@ -393,23 +396,24 @@ const Sidebar = ({
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Button
|
||||
data-testid="connect-button"
|
||||
className="w-full"
|
||||
onClick={onConnect}
|
||||
>
|
||||
{connectionStatus === "connected" ? (
|
||||
<>
|
||||
{connectionStatus === "connected" && (
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<Button data-testid="connect-button" onClick={onConnect}>
|
||||
<RotateCcw className="w-4 h-4 mr-2" />
|
||||
{transportType === "stdio" ? "Restart" : "Reconnect"}
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Play className="w-4 h-4 mr-2" />
|
||||
Connect
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
</Button>
|
||||
<Button onClick={onDisconnect}>
|
||||
<RefreshCwOff className="w-4 h-4 mr-2" />
|
||||
Disconnect
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
{connectionStatus !== "connected" && (
|
||||
<Button className="w-full" onClick={onConnect}>
|
||||
<Play className="w-4 h-4 mr-2" />
|
||||
Connect
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<div className="flex items-center justify-center space-x-2 mb-4">
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user