Skip to content

Commit

Permalink
disable deploy when compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
MCarlomagno committed Dec 12, 2024
1 parent 7e587e6 commit 9a444d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/wizard/components/Deploy.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
const compileDebounced = debouncer(compile, 600);
let inputsWithValue = $state<Record<string, string | number | boolean>>({});
let busy = $state(false);
let isDeploying = $state(false);
let successMessage = $state<string>("");
let errorMessage = $state<string>("");
let compilationError = $state<string>("");
Expand Down Expand Up @@ -309,9 +309,9 @@
};
async function triggerDeploy() {
busy = true;
isDeploying = true;
await deploy();
busy = false;
isDeploying = false;
}
</script>
Expand Down Expand Up @@ -359,7 +359,7 @@
<Message message={compilationError} type="error" />
{/if}

<Button disabled={!globalState.authenticated || busy} loading={busy} label="Deploy" onClick={triggerDeploy} />
<Button disabled={!globalState.authenticated || isDeploying || isCompiling} loading={isDeploying} label="Deploy" onClick={triggerDeploy} />

{#if successMessage || errorMessage}
<Message message={successMessage || errorMessage} type={successMessage ? "success" : "error"} />
Expand Down

0 comments on commit 9a444d1

Please sign in to comment.