Skip to content

Commit 3e46011

Browse files
committed
Marginally better dark mode support
1 parent 584c107 commit 3e46011

File tree

8 files changed

+17
-13
lines changed

8 files changed

+17
-13
lines changed

client/src/App.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import {
2323
ClientNotification,
2424
} from "@modelcontextprotocol/sdk/types.js";
2525
import { useEffect, useRef, useState } from "react";
26+
// Add dark mode class based on system preference
27+
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
28+
document.documentElement.classList.add("dark");
29+
}
2630

2731
import { Button } from "@/components/ui/button";
2832
import { Input } from "@/components/ui/input";
@@ -348,13 +352,13 @@ const App = () => {
348352
};
349353

350354
return (
351-
<div className="flex h-screen bg-gray-100">
355+
<div className="flex h-screen bg-background">
352356
<Sidebar connectionStatus={connectionStatus} />
353357
<div className="flex-1 flex flex-col overflow-hidden">
354358
<h1 className="text-2xl font-bold p-4">MCP Inspector</h1>
355359
<div className="flex-1 overflow-auto flex">
356360
<div className="flex-1">
357-
<div className="p-4 bg-white shadow-md m-4 rounded-md">
361+
<div className="p-4 bg-card shadow-md m-4 rounded-md">
358362
<h2 className="text-lg font-semibold mb-2">Connect MCP Server</h2>
359363
<div className="flex space-x-2 mb-2">
360364
<Select

client/src/components/History.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const HistoryAndNotifications = ({
2929
};
3030

3131
return (
32-
<div className="w-64 bg-white shadow-md p-4 overflow-hidden flex flex-col h-full">
32+
<div className="w-64 bg-card shadow-md p-4 overflow-hidden flex flex-col h-full">
3333
<div className="flex-1 overflow-y-auto mb-4 border-b pb-4">
3434
<h2 className="text-lg font-semibold mb-4">History</h2>
3535
{requestHistory.length === 0 ? (
@@ -42,7 +42,7 @@ const HistoryAndNotifications = ({
4242
.map((request, index) => (
4343
<li
4444
key={index}
45-
className="text-sm text-gray-600 bg-gray-100 p-2 rounded"
45+
className="text-sm text-foreground bg-secondary p-2 rounded"
4646
>
4747
<div
4848
className="flex justify-between items-center cursor-pointer"
@@ -74,7 +74,7 @@ const HistoryAndNotifications = ({
7474
<Copy size={16} />
7575
</button>
7676
</div>
77-
<pre className="whitespace-pre-wrap break-words bg-blue-50 p-2 rounded">
77+
<pre className="whitespace-pre-wrap break-words bg-background p-2 rounded">
7878
{JSON.stringify(JSON.parse(request.request), null, 2)}
7979
</pre>
8080
</div>
@@ -91,7 +91,7 @@ const HistoryAndNotifications = ({
9191
<Copy size={16} />
9292
</button>
9393
</div>
94-
<pre className="whitespace-pre-wrap break-words bg-green-50 p-2 rounded">
94+
<pre className="whitespace-pre-wrap break-words bg-background p-2 rounded">
9595
{JSON.stringify(
9696
JSON.parse(request.response),
9797
null,
@@ -119,7 +119,7 @@ const HistoryAndNotifications = ({
119119
.map((notification, index) => (
120120
<li
121121
key={index}
122-
className="text-sm text-gray-600 bg-gray-100 p-2 rounded"
122+
className="text-sm text-foreground bg-secondary p-2 rounded"
123123
>
124124
<div
125125
className="flex justify-between items-center cursor-pointer"
@@ -146,7 +146,7 @@ const HistoryAndNotifications = ({
146146
<Copy size={16} />
147147
</button>
148148
</div>
149-
<pre className="whitespace-pre-wrap break-words bg-purple-50 p-2 rounded">
149+
<pre className="whitespace-pre-wrap break-words bg-background p-2 rounded">
150150
{JSON.stringify(notification, null, 2)}
151151
</pre>
152152
</div>

client/src/components/HistoryAndNotifications.tsx

Whitespace-only changes.

client/src/components/ListPane.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const ListPane = <T extends object>({
1919
buttonText,
2020
isButtonDisabled,
2121
}: ListPaneProps<T>) => (
22-
<div className="bg-white rounded-lg shadow">
22+
<div className="bg-card rounded-lg shadow">
2323
<div className="p-4 border-b border-gray-200">
2424
<h3 className="font-semibold">{title}</h3>
2525
</div>

client/src/components/PromptsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const PromptsTab = ({
7070
isButtonDisabled={!nextCursor && prompts.length > 0}
7171
/>
7272

73-
<div className="bg-white rounded-lg shadow">
73+
<div className="bg-card rounded-lg shadow">
7474
<div className="p-4 border-b border-gray-200">
7575
<h3 className="font-semibold">
7676
{selectedPrompt ? selectedPrompt.name : "Select a prompt"}

client/src/components/ResourcesTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const ResourcesTab = ({
111111
isButtonDisabled={!nextTemplateCursor && resourceTemplates.length > 0}
112112
/>
113113

114-
<div className="bg-white rounded-lg shadow">
114+
<div className="bg-card rounded-lg shadow">
115115
<div className="p-4 border-b border-gray-200 flex justify-between items-center">
116116
<h3
117117
className="font-semibold truncate"

client/src/components/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Menu, Settings } from "lucide-react";
22
import { Button } from "@/components/ui/button";
33

44
const Sidebar = ({ connectionStatus }: { connectionStatus: string }) => (
5-
<div className="w-64 bg-white border-r border-gray-200">
5+
<div className="w-64 bg-card border-r border-border">
66
<div className="flex items-center p-4 border-b border-gray-200">
77
<Menu className="w-6 h-6 text-gray-500" />
88
<h1 className="ml-2 text-lg font-semibold">MCP Inspector</h1>

client/src/components/ToolsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const ToolsTab = ({
9696
isButtonDisabled={!nextCursor && tools.length > 0}
9797
/>
9898

99-
<div className="bg-white rounded-lg shadow">
99+
<div className="bg-card rounded-lg shadow">
100100
<div className="p-4 border-b border-gray-200">
101101
<h3 className="font-semibold">
102102
{selectedTool ? selectedTool.name : "Select a tool"}

0 commit comments

Comments
 (0)