Merge pull request #1306 from appwrite/fix-download-deployment-btn

Fix: Deployment download button
This commit is contained in:
Arman authored and GitHub committed 2024-08-21 09:13:28 +02:00
commit 35822ab0bc
2 files changed
+20 -22

No files matched your search

@@ -60,26 +60,26 @@
<DeploymentCard deployment={$deployment}>
<svelte:fragment slot="actions">
<div class="u-flex u-flex-wrap">
{#if $deployment.status === 'processing'}
{#if $deployment.status === 'processing' || $deployment.status === 'building' || $deployment.status === 'waiting'}
<Button
text
class="u-margin-inline-end-16"
on:click={() => {
showCancel = true;
}}>Cancel</Button>
{/if}
{#if $deployment.status === 'ready'}
<Button text href={getDownload($deployment.$id)} class="u-margin-inline-end-16">
Download code
</Button>
{#if $deployment.size > 0}
<Button text href={getDownload($deployment.$id)}>Download code</Button>
{/if}
{#if $func.deployment !== $deployment.$id && $deployment.status === 'ready'}
<Button
secondary
disabled={data.activeDeployment}
on:click={() => {
showActivate = true;
}}>Activate</Button>
{/if}
<Button
secondary
disabled={data.activeDeployment}
on:click={() => {
showActivate = true;
}}>Activate</Button>
</div>
</svelte:fragment>
</DeploymentCard>
@@ -148,15 +148,13 @@
href={`${base}/project-${$page.params.project}/functions/function-${$page.params.function}/deployment-${deployment.$id}`}>
Logs
</DropListLink>
{#if deployment.status === 'ready'}
<DropListLink
icon="download"
href={getDownload(deployment.$id)}
on:click={() => (showDropdown[index] = false)}>
Download
</DropListLink>
{/if}
{#if deployment.status === 'processing' || deployment.status === 'building'}
<DropListLink
icon="download"
href={getDownload(deployment.$id)}
on:click={() => (showDropdown[index] = false)}>
Download
</DropListLink>
{#if deployment.status === 'processing' || deployment.status === 'building' || deployment.status === 'waiting'}
<DropListItem
icon="x-circle"
event="deployment_cancel"
@@ -168,7 +166,7 @@
Cancel
</DropListItem>
{/if}
{#if deployment.status !== 'building' && deployment.status !== 'processing'}
{#if deployment.status !== 'building' && deployment.status !== 'processing' && deployment.status !== 'waiting'}
<DropListItem
icon="trash"
on:click={() => {