mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-09 08:02:25 +00:00
Check whether flow is defined before rendering the preview button (#337)
This commit is contained in:
@@ -196,24 +196,23 @@
|
||||
bind:schema={$flowStore.schema}
|
||||
/>
|
||||
{/if}
|
||||
<Button
|
||||
disabled={pathIsEmpty($flowStore.path)}
|
||||
size="lg"
|
||||
pill
|
||||
on:click={() => (previewOpen = !previewOpen)}
|
||||
class={`blue-button fixed bottom-10 right-10 ${previewOpen ? 'hidden' : ''}`}
|
||||
>
|
||||
Preview flow
|
||||
{pathIsEmpty($flowStore.path) ? '(pick a name first!)' : ''}
|
||||
|
||||
<Icon data={faPlay} class="ml-2" />
|
||||
</Button>
|
||||
{:else}
|
||||
<p>Loading</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<Button
|
||||
disabled={pathIsEmpty($flowStore.path)}
|
||||
size="lg"
|
||||
pill
|
||||
on:click={() => (previewOpen = !previewOpen)}
|
||||
class={`blue-button fixed bottom-10 right-10 ${previewOpen ? 'hidden' : ''}`}
|
||||
>
|
||||
Preview flow
|
||||
{pathIsEmpty($flowStore.path) ? '(pick a name first!)' : ''}
|
||||
|
||||
<Icon data={faPlay} class="ml-2" />
|
||||
</Button>
|
||||
|
||||
<div class={`relative h-screen w-1/3 ${previewOpen ? '' : 'hidden'}`}>
|
||||
<div class="absolute top-0 h-full">
|
||||
<div class="fixed border-l-2 right-0 h-screen w-1/3">
|
||||
|
||||
Reference in New Issue
Block a user