fix(web): priority displayName for settings name error (#336)

This commit is contained in:
3Spiders
2025-06-17 08:26:13 +08:00
committed by GitHub
parent 4fb053b6d2
commit 4fe43153b1
4 changed files with 4 additions and 2 deletions

View File

@@ -12,3 +12,4 @@ export const AboutTab: Tab = () => {
return <Markdown>{about}</Markdown>;
};
AboutTab.icon = BadgeInfo;
AboutTab.displayName = "About";

View File

@@ -179,5 +179,5 @@ export const GeneralTab: Tab = ({
</div>
);
};
GeneralTab.displayName = "";
GeneralTab.displayName = "General";
GeneralTab.icon = Settings;

View File

@@ -8,7 +8,7 @@ import { GeneralTab } from "./general-tab";
import { MCPTab } from "./mcp-tab";
export const SETTINGS_TABS = [GeneralTab, MCPTab, AboutTab].map((tab) => {
const name = tab.name ?? tab.displayName;
const name = tab.displayName ?? tab.name;
return {
...tab,
id: name.replace(/Tab$/, "").toLocaleLowerCase(),

View File

@@ -180,6 +180,7 @@ export const MCPTab: Tab = ({ settings, onChange }) => {
};
MCPTab.icon = Blocks;
MCPTab.badge = "Beta";
MCPTab.displayName = "MCP";
function mergeServers(
existing: MCPServerMetadata[],