1
1
import { createDockerDesktopClient } from '@docker/extension-api-client' ;
2
2
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown' ;
3
+ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight' ;
3
4
import {
4
5
Avatar ,
5
6
Button ,
@@ -172,9 +173,7 @@ function ClientSetting({
172
173
/>
173
174
)
174
175
}
175
- title = {
176
- < Typography variant = "subtitle2" > { name } </ Typography >
177
- }
176
+ title = { < Typography variant = "subtitle2" > { name } </ Typography > }
178
177
subheader = {
179
178
< Typography
180
179
variant = "body2"
@@ -187,7 +186,11 @@ function ClientSetting({
187
186
onClick = { ( ) => setExpanded ( ! expanded ) }
188
187
>
189
188
Manual configuration
190
- < KeyboardArrowDownIcon fontSize = "small" />
189
+ { expanded ? (
190
+ < KeyboardArrowDownIcon fontSize = "small" />
191
+ ) : (
192
+ < KeyboardArrowRightIcon fontSize = "small" />
193
+ ) }
191
194
</ Typography >
192
195
}
193
196
action = {
@@ -216,15 +219,18 @@ function ClientSetting({
216
219
size = "small"
217
220
>
218
221
< Stack direction = "row" alignItems = "center" spacing = { 1 } >
219
- { buttonsLoading [ name ]
220
- &&
222
+ { ( buttonsLoading [ name ] && (
221
223
< >
222
- < Typography sx = { { fontSize : 12 , width : 70 } } > Connect</ Typography >
224
+ < Typography sx = { { fontSize : 12 , width : 70 } } >
225
+ Connect
226
+ </ Typography >
223
227
< CircularProgress size = { 12 } />
224
228
</ >
225
- ||
226
- < Typography sx = { { fontSize : 12 , width : 90 } } > Disconnect</ Typography >
227
- }
229
+ ) ) || (
230
+ < Typography sx = { { fontSize : 12 , width : 90 } } >
231
+ Disconnect
232
+ </ Typography >
233
+ ) }
228
234
</ Stack >
229
235
</ Button >
230
236
) }
@@ -253,15 +259,18 @@ function ClientSetting({
253
259
size = "small"
254
260
>
255
261
< Stack direction = "row" alignItems = "center" spacing = { 1 } >
256
- { buttonsLoading [ name ]
257
- &&
262
+ { ( buttonsLoading [ name ] && (
258
263
< >
259
- < Typography sx = { { fontSize : 12 , width : 70 } } > Disconnect</ Typography >
264
+ < Typography sx = { { fontSize : 12 , width : 70 } } >
265
+ Disconnect
266
+ </ Typography >
260
267
< CircularProgress size = { 12 } />
261
268
</ >
262
- ||
263
- < Typography sx = { { fontSize : 12 , width : 90 } } > Connect</ Typography >
264
- }
269
+ ) ) || (
270
+ < Typography sx = { { fontSize : 12 , width : 90 } } >
271
+ Connect
272
+ </ Typography >
273
+ ) }
265
274
</ Stack >
266
275
</ Button >
267
276
) }
@@ -285,15 +294,18 @@ function ClientSetting({
285
294
} }
286
295
>
287
296
< Stack direction = "row" alignItems = "center" spacing = { 1 } >
288
- { buttonsLoading [ name ]
289
- &&
297
+ { ( buttonsLoading [ name ] && (
290
298
< >
291
- < Typography sx = { { fontSize : 12 , width : 70 } } > Disconnect</ Typography >
299
+ < Typography sx = { { fontSize : 12 , width : 70 } } >
300
+ Disconnect
301
+ </ Typography >
292
302
< CircularProgress size = { 12 } />
293
303
</ >
294
- ||
295
- < Typography sx = { { fontSize : 12 , width : 90 } } > Connect</ Typography >
296
- }
304
+ ) ) || (
305
+ < Typography sx = { { fontSize : 12 , width : 90 } } >
306
+ Connect
307
+ </ Typography >
308
+ ) }
297
309
</ Stack >
298
310
</ Button >
299
311
) }
0 commit comments