Skip to content

Commit c3484bb

Browse files
authored
Merge pull request #40 from docker/cm/0.1.2
Bugfix pass 1
2 parents ff35edb + a5155aa commit c3484bb

File tree

3 files changed

+46
-42
lines changed

3 files changed

+46
-42
lines changed

src/extension/ui/src/App.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function App() {
8181
}]
8282
})
8383
await client.docker.cli.exec('run', ['--rm', '-v', 'docker-prompts:/docker-prompts', '--workdir', '/docker-prompts', 'vonwig/function_write_files:latest', `'${payload}'`])
84-
client.desktopUI.toast.success('Prompt registered successfully');
84+
client.desktopUI.toast.success('Prompt registered successfully. Restart Claude Desktop to apply.');
8585
await loadRegistry();
8686
}
8787
catch (error) {
@@ -100,7 +100,7 @@ export function App() {
100100
}]
101101
})
102102
await client.docker.cli.exec('run', ['--rm', '-v', 'docker-prompts:/docker-prompts', '--workdir', '/docker-prompts', 'vonwig/function_write_files:latest', `'${payload}'`])
103-
client.desktopUI.toast.success('Prompt unregistered successfully');
103+
client.desktopUI.toast.success('Prompt unregistered successfully. Restart Claude Desktop to apply.');
104104
await loadRegistry();
105105
}
106106
catch (error) {

src/extension/ui/src/components/ClaudeConfigSyncStatus.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ export const ClaudeConfigSyncStatus = ({ client, setHasConfig }: { client: v1.Do
146146
</DialogContent>
147147
</Dialog >
148148

149-
<Dialog open={showRestartModal} onClose={() => setShowRestartModal(false)} >
149+
{/* Keep this closed for now. */}
150+
<Dialog open={showRestartModal && false} onClose={() => setShowRestartModal(false)} >
150151
<DialogTitle>Restart Claude Desktop</DialogTitle>
151152
<DialogContent sx={{ padding: 5, mt: 2 }}>
152153
<Stack direction="column" spacing={3}>

src/extension/ui/src/components/PromptCard.tsx

+42-39
Original file line numberDiff line numberDiff line change
@@ -19,45 +19,48 @@ export function CatalogItemCard({ openUrl, item, canRegister, registered, regist
1919
const [isRegistering, setIsRegistering] = useState(false)
2020
return (
2121
<Card sx={{ height: '100%' }}>
22-
<CardContent>
23-
<a href="">
24-
<Stack onClick={openUrl} direction="row" spacing={2} justifyContent="space-between" sx={{ cursor: 'pointer' }}>
25-
<Typography gutterBottom variant="h5" component="div">
26-
{item.name}
27-
</Typography>
28-
<CardMedia
29-
component="img"
30-
sx={{ maxWidth: 100, padding: 1, background: 'white', borderRadius: 1 }}
31-
alt={`Icon for ${item.name}`}
32-
image={item.icon}
33-
/>
34-
</Stack>
35-
</a>
36-
<Typography variant="body2" sx={{ color: 'text.secondary', mt: 2 }}>
37-
{item.description}
38-
</Typography>
39-
</CardContent>
40-
<CardActions>
41-
<Button
42-
size="small"
43-
onClick={() => {
44-
trackEvent('registry-changed', { name: item.name, ref: item.ref, action: registered ? 'remove' : 'add' });
45-
setIsRegistering(true)
46-
if (registered) {
47-
unregister(item).then(() => {
48-
setIsRegistering(false)
49-
})
50-
} else {
51-
register(item).then(() => {
52-
setIsRegistering(false)
53-
})
54-
}
55-
}}
56-
disabled={!canRegister || isRegistering}
57-
>
58-
{isRegistering ? <CircularProgress size={20} /> : registered ? 'Remove' : 'Add'}
59-
</Button>
60-
</CardActions>
22+
<Stack direction="column" height="100%" sx={{ justifyContent: 'space-between' }}>
23+
<CardContent>
24+
<a href="">
25+
<Stack onClick={openUrl} direction="row" spacing={2} justifyContent="space-between" sx={{ cursor: 'pointer' }}>
26+
27+
<Typography gutterBottom variant="h5" component="div">
28+
{item.name}
29+
</Typography>
30+
<CardMedia
31+
component="img"
32+
sx={{ maxWidth: 100, padding: 1, background: 'white', borderRadius: 1 }}
33+
alt={`Icon for ${item.name}`}
34+
image={item.icon}
35+
/>
36+
</Stack>
37+
</a>
38+
<Typography variant="body2" sx={{ color: 'text.secondary', mt: 2 }}>
39+
{item.description}
40+
</Typography>
41+
</CardContent>
42+
<CardActions>
43+
<Button
44+
size="small"
45+
onClick={() => {
46+
trackEvent('registry-changed', { name: item.name, ref: item.ref, action: registered ? 'remove' : 'add' });
47+
setIsRegistering(true)
48+
if (registered) {
49+
unregister(item).then(() => {
50+
setIsRegistering(false)
51+
})
52+
} else {
53+
register(item).then(() => {
54+
setIsRegistering(false)
55+
})
56+
}
57+
}}
58+
disabled={!canRegister || isRegistering}
59+
>
60+
{isRegistering ? <CircularProgress size={20} /> : registered ? 'Remove' : 'Add'}
61+
</Button>
62+
</CardActions>
63+
</Stack>
6164
</Card >
6265
)
6366
}

0 commit comments

Comments
 (0)