Skip to content

Commit

Permalink
Merge pull request #222 from parkpow/dd-extension2
Browse files Browse the repository at this point in the history
Docker desktop extension bug fixes and improvements
  • Loading branch information
marcbelmont authored Nov 5, 2024
2 parents 7645a7f + 2d83b36 commit 3f881a7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/dd-extension/ui/src/components/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface LoaderProps {
export default function Loader({ isLoading }: LoaderProps) {
if (!isLoading) return null;
return (
<Spinner animation="border" role="status" size='sm'>
<Spinner animation="border" role="status" size='sm' className="me-1">
<span className="visually-hidden">Loading...</span>
</Spinner>
);
Expand Down
2 changes: 1 addition & 1 deletion docker/dd-extension/ui/src/components/ShowCommand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function ShowCommand({
}).catch(e => {
setRunningCommand(false);
console.error(e);
ddClient.desktopUI.toast.error('Failed Run Command.');
ddClient.desktopUI.toast.error(`Run Command Failed: ${e.stderr.trim()}`);
})
}

Expand Down
7 changes: 3 additions & 4 deletions docker/dd-extension/ui/src/components/Snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function Snapshot() {
useEffect(() => {
const imagem = generateDockerImage()
generateDockerRunCommand(imagem)
}, [country, architecture, token, licenseKey, restartPolicy]);
}, [country, architecture, token, curlPort, licenseKey, restartPolicy]);


const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
Expand Down Expand Up @@ -166,8 +166,6 @@ export default function Snapshot() {
};
return (
<Form onSubmit={handleSubmit}>
<Loader isLoading={isLoading} />

<Form.Group as={Row} className="mb-3" controlId="snapshotToken">
<Form.Label column sm={4}>
Please enter your Plate Recognizer{" "}
Expand Down Expand Up @@ -260,7 +258,7 @@ export default function Snapshot() {
placeholder="Port"
name="port"
required
defaultValue={8080}
value={curlPort}
onChange={handleInputChange}
/>
</Col>
Expand Down Expand Up @@ -310,6 +308,7 @@ export default function Snapshot() {
<Form.Group as={Row} className="mb-3">
<div className="col-2">
<Button className="btn btn-primary" type="submit">
<Loader isLoading={isLoading} />
Show Docker Command
</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docker/dd-extension/ui/src/components/Stream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export default function Stream() {

return (
<Form onSubmit={handleSubmit}>
<Loader isLoading={isLoading} />
<Form.Group as={Row} className="mb-3" controlId="streamToken">
<Form.Label column sm={4}>
Please enter your Plate Recognizer{" "}
Expand Down Expand Up @@ -208,6 +207,7 @@ export default function Stream() {
<Form.Group as={Row} className="mb-3">
<div className="col-2">
<Button className="btn btn-primary" type="submit">
<Loader isLoading={isLoading} />
Show Docker Command
</Button>
</div>
Expand Down

0 comments on commit 3f881a7

Please sign in to comment.