Skip to content

Commit 2c8d8b1

Browse files
authored
Merge pull request #221 from dgageot/ui-fixes
UI fixes
2 parents 9b0b664 + 390895e commit 2c8d8b1

File tree

4 files changed

+40
-25
lines changed

4 files changed

+40
-25
lines changed

src/extension/ui/src/components/CatalogGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const CatalogGrid: React.FC<CatalogGridProps> = ({ appProps }) => {
8484
sx={CATALOG_LAYOUT_SX}
8585
>
8686
<Typography variant="h3">Docker MCP Toolkit</Typography>
87-
<Typography variant="caption">
87+
<Typography sx={{ color: 'text.secondary' }}>
8888
Browse the Docker MCP Catalog and connect Dockerized MCP servers to your favorite MCP Client
8989
</Typography>
9090
</Stack>

src/extension/ui/src/components/tabs/YourClients.tsx

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ const MCPClientSettings = ({ appProps }: MCPClientSettingsProps) => {
5959

6060
return (
6161
<Stack sx={CATALOG_LAYOUT_SX} spacing={2}>
62-
<Typography>Connect to runtimes for your tools</Typography>
6362
<Stack direction="column" spacing={1}>
6463
{Object.entries(mcpClientStates).map(
6564
([name, mcpClientState]: [string, any]) => {
@@ -175,19 +174,7 @@ function ClientSetting({
175174
)
176175
}
177176
title={
178-
<Typography variant="subtitle2">
179-
{name}{' '}
180-
{mcpClientState.exists && (
181-
<Chip
182-
label={mcpClientState.configured ? 'Connected' : 'Disconnected'}
183-
color={mcpClientState.configured ? 'success' : 'primary'}
184-
size="small"
185-
/>
186-
)}
187-
{!mcpClientState.exists && (
188-
<Chip label="No Config Found" color="warning" size="small" />
189-
)}
190-
</Typography>
177+
<Typography variant="subtitle2">{name}</Typography>
191178
}
192179
subheader={
193180
<Typography
@@ -231,8 +218,15 @@ function ClientSetting({
231218
size="small"
232219
>
233220
<Stack direction="row" alignItems="center" spacing={1}>
234-
<Typography sx={{ fontSize: 12 }}>Disconnect</Typography>
235-
{buttonsLoading[name] && <CircularProgress size={12} />}
221+
{buttonsLoading[name]
222+
&&
223+
<>
224+
<Typography sx={{ fontSize: 12, width: 70 }}>Connect</Typography>
225+
<CircularProgress size={12} />
226+
</>
227+
||
228+
<Typography sx={{ fontSize: 12, width: 90 }}>Disconnect</Typography>
229+
}
236230
</Stack>
237231
</Button>
238232
)}
@@ -261,8 +255,15 @@ function ClientSetting({
261255
size="small"
262256
>
263257
<Stack direction="row" alignItems="center" spacing={1}>
264-
<Typography sx={{ fontSize: 12 }}>Connect</Typography>
265-
{buttonsLoading[name] && <CircularProgress size={12} />}
258+
{buttonsLoading[name]
259+
&&
260+
<>
261+
<Typography sx={{ fontSize: 12, width: 70 }}>Disconnect</Typography>
262+
<CircularProgress size={12} />
263+
</>
264+
||
265+
<Typography sx={{ fontSize: 12, width: 90 }}>Connect</Typography>
266+
}
266267
</Stack>
267268
</Button>
268269
)}
@@ -286,8 +287,15 @@ function ClientSetting({
286287
}}
287288
>
288289
<Stack direction="row" alignItems="center" spacing={1}>
289-
<Typography sx={{ fontSize: 12 }}>Configure</Typography>
290-
{buttonsLoading[name] && <CircularProgress size={12} />}
290+
{buttonsLoading[name]
291+
&&
292+
<>
293+
<Typography sx={{ fontSize: 12, width: 70 }}>Disconnect</Typography>
294+
<CircularProgress size={12} />
295+
</>
296+
||
297+
<Typography sx={{ fontSize: 12, width: 90 }}>Connect</Typography>
298+
}
291299
</Stack>
292300
</Button>
293301
)}

src/extension/ui/src/components/tile/ConfigEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ const ConfigEditor = ({
4949
() =>
5050
configSchema
5151
? deepFlattenObject({
52-
...catalogItem.configTemplate,
53-
...existingConfigForItem,
54-
})
52+
...catalogItem.configTemplate,
53+
...existingConfigForItem,
54+
})
5555
: {},
5656
[catalogItem.configTemplate, existingConfigForItem, configSchema]
5757
);
@@ -82,7 +82,7 @@ const ConfigEditor = ({
8282
return (
8383
<Stack spacing={1}>
8484
<Typography variant="subtitle2">Parameters</Typography>
85-
<Stack direction="column" spacing={1}>
85+
<Stack>
8686
{Object.keys(flattenedConfig).map((key: string) => {
8787
const edited = localConfig[key] !== flattenedConfig[key];
8888
const isSaving = savingKeys.has(key);

src/extension/ui/src/components/tile/Modal.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ const ConfigurationModal = ({
280280
sx={toolChipStyle}
281281
>
282282
{tool.name}
283+
<Link
284+
onClick={() => client.host.openExternal(`${catalogItem.readme}#tool-${tool.name.replaceAll(' ', '-')}` || '')}
285+
href="#"
286+
target="_blank"
287+
>
288+
<Launch />
289+
</Link>
283290
</Typography>
284291
))}
285292
</Stack>

0 commit comments

Comments
 (0)