Skip to content

Commit 5e35251

Browse files
committedJun 6, 2024
added logo and proper name to extension
1 parent 7341ba7 commit 5e35251

File tree

6 files changed

+511
-40
lines changed

6 files changed

+511
-40
lines changed
 

‎Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LABEL org.opencontainers.image.title="Copacetic" \
2828
org.opencontainers.image.vendor="Microsoft" \
2929
com.docker.desktop.extension.api.version="0.3.4" \
3030
com.docker.extension.screenshots="" \
31-
com.docker.desktop.extension.icon="" \
31+
com.docker.desktop.extension.icon="https://raw.githubusercontent.com/project-copacetic/copacetic/main/images/copa-color.png" \
3232
com.docker.extension.detailed-description="" \
3333
com.docker.extension.publisher-url="" \
3434
com.docker.extension.additional-urls="" \
@@ -38,6 +38,6 @@ LABEL org.opencontainers.image.title="Copacetic" \
3838
COPY --from=builder /backend/bin/service /
3939
COPY docker-compose.yaml .
4040
COPY metadata.json .
41-
COPY docker.svg .
41+
COPY copa-color.svg .
4242
COPY --from=client-builder /ui/build ui
4343
CMD /service -socket /run/guest-services/backend.sock

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
IMAGE?=my/awesome-extension
1+
IMAGE?=copacetic/copacetic-docker-desktop-extension
22
TAG?=latest
33

44
BUILDER=buildx-multi-arch

‎copa-color.svg

+478
Loading

‎metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"icon": "docker.svg",
2+
"icon": "copa-color.svg",
33
"vm": {
44
"composefile": "docker-compose.yaml",
55
"exposes": {
@@ -8,7 +8,7 @@
88
},
99
"ui": {
1010
"dashboard-tab": {
11-
"title": "My Extension",
11+
"title": "Copacetic",
1212
"src": "index.html",
1313
"root": "ui"
1414
}

‎ui/public/copa-color-small.png

3.19 KB
Loading

‎ui/src/app.tsx

+28-35
Original file line numberDiff line numberDiff line change
@@ -104,37 +104,36 @@ export function App() {
104104
async function runCopa(commandParts: string[], stdout: string, stderr: string) {
105105
await ddClient.docker.cli.exec(
106106
"run", commandParts,
107-
// {
108-
// stream: {
109-
// onOutput(data: any) {
110-
// stdout += data.stdout;
111-
// if (data.stderr) {
112-
// stderr += data.stderr;
113-
// }
114-
// },
115-
// onError(error: any) {
116-
// console.error(error);
117-
// },
118-
// onClose(exitCode: number) {
119-
// var res = { stdout: stdout, stderr: stderr };
120-
// alert("finished!");
121-
// if (exitCode == 0) {
122-
// ddClient.desktopUI.toast.error(
123-
// `${res.stdout}`
124-
// );
125-
// } else {
126-
// ddClient.desktopUI.toast.error(
127-
// `${res.stderr}`
128-
// );
129-
// }
130-
// },
131-
// },
132-
// }
107+
{
108+
stream: {
109+
onOutput(data: any) {
110+
stdout += data.stdout;
111+
if (data.stderr) {
112+
stderr += data.stderr;
113+
}
114+
},
115+
onError(error: any) {
116+
console.error(error);
117+
},
118+
onClose(exitCode: number) {
119+
setInLoading(false);
120+
var res = { stdout: stdout, stderr: stderr };
121+
if (exitCode == 0) {
122+
processResult(res);
123+
} else {
124+
125+
}
126+
},
127+
},
128+
}
133129
);
134-
setInLoading(false);
135130
return { stdout, stderr };
136131
}
137132

133+
const processResult = (res : object) => {
134+
135+
}
136+
138137
return (
139138
<Box
140139
display="flex"
@@ -146,14 +145,8 @@ export function App() {
146145
<Stack sx={{ alignItems: 'center' }} spacing={1.5}>
147146
<Box
148147
component="img"
149-
sx={{
150-
height: 260,
151-
width: 400,
152-
maxHeight: { xs: 260, md: 167 },
153-
maxWidth: { xs: 400, md: 250 },
154-
}}
155-
alt="The house from the offer."
156-
src="copa-color.png"
148+
alt="Copacetic logo"
149+
src="copa-color-small.png"
157150
/>
158151
<Stack>
159152
<Typography align='center' variant="h6">Directly patch containers quickly</Typography>

0 commit comments

Comments
 (0)
Please sign in to comment.