mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Merge pull request #1306 from appwrite/fix-download-deployment-btn
Fix: Deployment download button
This commit is contained in:
2 files changed
+20
-22
No files matched your search
+12
-12
@@ -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={() => {
|
||||
|
||||
Reference in new issue
Block a user