@@ -202,7 +202,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
202
202
// Preparing means that we haven't actually started the workspace instance just yet, but rather
203
203
// are still preparing for launch. This means we're building the Docker image for the workspace.
204
204
case "preparing" :
205
- return < ImageBuildView workspaceId = { this . state . workspaceInstance . workspaceId } onStartWithDefaultImage = { ( ) => this . startWorkspace ( true , true ) } /> ;
205
+ return < ImageBuildView workspaceId = { this . state . workspaceInstance . workspaceId } onStartWithDefaultImage = { e => { ( e . target as HTMLButtonElement ) . disabled = true ; this . startWorkspace ( true , true ) ; } } /> ;
206
206
207
207
// Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
208
208
// some space within the cluster. If for example the cluster needs to scale up to accomodate the
@@ -268,7 +268,7 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
268
268
case "stopped" :
269
269
phase = StartPhase . Stopped ;
270
270
if ( this . state . hasImageBuildLogs ) {
271
- return < ImageBuildView workspaceId = { this . state . workspaceInstance . workspaceId } onStartWithDefaultImage = { ( ) => this . startWorkspace ( true , true ) } phase = { phase } error = { error } /> ;
271
+ return < ImageBuildView workspaceId = { this . state . workspaceInstance . workspaceId } onStartWithDefaultImage = { e => { ( e . target as HTMLButtonElement ) . disabled = true ; this . startWorkspace ( true , true ) ; } } phase = { phase } error = { error } /> ;
272
272
}
273
273
if ( ! isHeadless && this . state . workspaceInstance . status . conditions . timeout ) {
274
274
title = 'Timed Out' ;
@@ -332,7 +332,7 @@ function PendingChangesDropdown(props: { workspaceInstance?: WorkspaceInstance }
332
332
333
333
interface ImageBuildViewProps {
334
334
workspaceId : string ;
335
- onStartWithDefaultImage : ( ) => void ;
335
+ onStartWithDefaultImage : ( event : React . MouseEvent ) => void ;
336
336
phase ?: StartPhase ;
337
337
error ?: StartWorkspaceError ;
338
338
}
0 commit comments