mcp: improve auth id type + styling fixes

This commit is contained in:
dswbx
2025-08-21 10:58:31 +02:00
parent f9184a71db
commit dcf88cf587
8 changed files with 110 additions and 99 deletions

View File

@@ -101,25 +101,25 @@ export const JsonViewerTabs = forwardRef<JsonViewerTabsRef, JsonViewerTabsProps>
}));
return (
<div className="flex flex-col bg-primary/5 rounded-md">
<div className="flex flex-row gap-4 border-b px-3 border-primary/10">
<div className="flex flex-col bg-primary/5 rounded-md flex-shrink-0">
<div className="flex flex-row gap-4 border-b px-3 border-primary/10 min-w-0">
{Object.keys(tabs).map((key) => (
<button
key={key}
type="button"
className={twMerge(
"flex flex-row text-sm cursor-pointer py-3 pt-3.5 px-1 border-b border-transparent -mb-px transition-opacity",
"flex flex-row text-sm cursor-pointer py-3 pt-3.5 px-1 border-b border-transparent -mb-px transition-opacity flex-shrink-0",
selected === key ? "border-primary" : "opacity-50 hover:opacity-70",
)}
onClick={() => setSelected(key)}
>
<span className="font-mono leading-none">{key}</span>
<span className="font-mono leading-none truncate">{key}</span>
</button>
))}
</div>
{/* @ts-ignore */}
<JsonViewer
className="bg-transparent"
className="bg-transparent overflow-x-auto"
{...defaultProps}
{...tabs[selected as any]}
title={undefined}

View File

@@ -13,7 +13,6 @@ import {
useFormValue,
} from "./Form";
import { getLabel, getMultiSchemaMatched } from "./utils";
import { FieldWrapper } from "ui/components/form/json-schema-form/FieldWrapper";
export type AnyOfFieldRootProps = {
path?: string;

View File

@@ -109,7 +109,7 @@ export function Form<
const formRef = useRef<HTMLFormElement | null>(null);
useEffect(() => {
if (initialValues) {
if (initialValues && validateOn === "change") {
validate();
}
}, [initialValues]);