File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { useParams } from 'next/navigation'
88import {
99 Badge ,
1010 Button ,
11+ Loader ,
1112 Modal ,
1213 ModalBody ,
1314 ModalContent ,
@@ -1109,19 +1110,20 @@ function GeneralFooter({
11091110} : GeneralFooterProps ) {
11101111 const isDeployBlocked =
11111112 deployReadiness . isBlocked || isDeploymentSettling || isSubmitting || isUndeploying
1112- const syncingLabel = deployReadiness . isSyncing ? deployReadiness . label : 'Syncing...'
11131113 const blockedMessage =
11141114 deployReadiness . isBlocked && ! isDeploymentSettling && ! isSubmitting && ! isUndeploying
11151115 ? deployReadiness . tooltip
11161116 : null
1117+ const deployActionLoading = isSubmitting || isDeploymentSettling
11171118
11181119 if ( ! isDeployed ) {
11191120 return (
11201121 < ModalFooter className = 'items-center justify-between' >
11211122 < div className = 'max-w-[260px] text-muted-foreground text-xs' > { blockedMessage } </ div >
11221123 < div className = 'flex items-center gap-2' >
11231124 < Button variant = 'tertiary' onClick = { onDeploy } disabled = { isDeployBlocked } >
1124- { isSubmitting ? 'Deploying...' : isDeploymentSettling ? syncingLabel : 'Deploy' }
1125+ { deployActionLoading && < Loader className = 'mr-1.5 h-3.5 w-3.5' animate /> }
1126+ Deploy
11251127 </ Button >
11261128 </ div >
11271129 </ ModalFooter >
@@ -1140,9 +1142,10 @@ function GeneralFooter({
11401142 < Button variant = 'default' onClick = { onUndeploy } disabled = { isUndeploying || isSubmitting } >
11411143 { isUndeploying ? 'Undeploying...' : 'Undeploy' }
11421144 </ Button >
1143- { needsRedeployment && (
1145+ { ( needsRedeployment || isDeploymentSettling ) && (
11441146 < Button variant = 'tertiary' onClick = { onRedeploy } disabled = { isDeployBlocked } >
1145- { isSubmitting ? 'Updating...' : isDeploymentSettling ? syncingLabel : 'Update' }
1147+ { deployActionLoading && < Loader className = 'mr-1.5 h-3.5 w-3.5' animate /> }
1148+ Update
11461149 </ Button >
11471150 ) }
11481151 </ div >
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ export function Deploy({
106106 }
107107
108108 const getButtonLabel = ( ) => {
109- if ( isDeploymentSettling ) {
110- return deployReadiness . isSyncing ? deployReadiness . label : 'Syncing... '
109+ if ( isDeployed && ( changeDetected || isDeploymentSettling ) ) {
110+ return 'Update '
111111 }
112112 if ( changeDetected ) {
113113 return 'Update'
@@ -135,7 +135,9 @@ export function Deploy({
135135 onClick = { onDeployClick }
136136 disabled = { isRegistryLoading || isDisabled }
137137 >
138- { isDeploying && < Loader className = 'h-[13px] w-[13px]' animate /> }
138+ { ( isDeploying || isDeploymentSettling ) && (
139+ < Loader className = 'h-[13px] w-[13px]' animate />
140+ ) }
139141 { getButtonLabel ( ) }
140142 </ Button >
141143 </ span >
You can’t perform that action at this time.
0 commit comments