From 3e460116143daf9a4cd2fbba2ed9f4d59f7e0778 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Tue, 12 Nov 2024 12:34:10 +0000 Subject: [PATCH] Marginally better dark mode support --- client/src/App.tsx | 8 ++++++-- client/src/components/History.tsx | 12 ++++++------ client/src/components/HistoryAndNotifications.tsx | 0 client/src/components/ListPane.tsx | 2 +- client/src/components/PromptsTab.tsx | 2 +- client/src/components/ResourcesTab.tsx | 2 +- client/src/components/Sidebar.tsx | 2 +- client/src/components/ToolsTab.tsx | 2 +- 8 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 client/src/components/HistoryAndNotifications.tsx diff --git a/client/src/App.tsx b/client/src/App.tsx index 2cd6554..e90090f 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -23,6 +23,10 @@ import { ClientNotification, } from "@modelcontextprotocol/sdk/types.js"; import { useEffect, useRef, useState } from "react"; +// Add dark mode class based on system preference +if (window.matchMedia("(prefers-color-scheme: dark)").matches) { + document.documentElement.classList.add("dark"); +} import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; @@ -348,13 +352,13 @@ const App = () => { }; return ( -
+

MCP Inspector

-
+

Connect MCP Server