From 666e5bc7d4fbebc41f99b23c96fa8233d58f33dd Mon Sep 17 00:00:00 2001 From: Dustin Healy Date: Mon, 28 Jul 2025 22:53:34 -0700 Subject: [PATCH] style: swap CustomUserVarsSection and ServerInitializationSection positions --- .../src/components/SidePanel/MCP/MCPPanel.tsx | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/client/src/components/SidePanel/MCP/MCPPanel.tsx b/client/src/components/SidePanel/MCP/MCPPanel.tsx index 0d585540ef..c67517278c 100644 --- a/client/src/components/SidePanel/MCP/MCPPanel.tsx +++ b/client/src/components/SidePanel/MCP/MCPPanel.tsx @@ -141,33 +141,31 @@ function MCPPanelContent() { {localize('com_sidepanel_mcp_variables_for', { '0': serverBeingEdited.serverName })} - {/* Server Initialization Section */}
- 0 - } + fields={serverBeingEdited.config.customUserVars} + onSave={(authData) => { + if (selectedServerNameForEditing) { + handleConfigSave(selectedServerNameForEditing, authData); + } + }} + onRevoke={() => { + if (selectedServerNameForEditing) { + handleConfigRevoke(selectedServerNameForEditing); + } + }} + isSubmitting={updateUserPluginsMutation.isLoading} />
- {/* Custom User Variables Section */} - { - if (selectedServerNameForEditing) { - handleConfigSave(selectedServerNameForEditing, authData); - } - }} - onRevoke={() => { - if (selectedServerNameForEditing) { - handleConfigRevoke(selectedServerNameForEditing); - } - }} - isSubmitting={updateUserPluginsMutation.isLoading} + requiresOAuth={serverStatus?.requiresOAuth || false} + hasCustomUserVars={ + serverBeingEdited.config.customUserVars && + Object.keys(serverBeingEdited.config.customUserVars).length > 0 + } /> );