|
|
|
@ -1,22 +1,51 @@ |
|
|
|
<script> |
|
|
|
import { Heading, Body, Layout, Button, Modal } from "@budibase/bbui" |
|
|
|
import { automationStore } from "builderStore" |
|
|
|
import AutomationPanel from "components/automation/AutomationPanel/AutomationPanel.svelte" |
|
|
|
import SetupPanel from "components/automation/SetupPanel/SetupPanel.svelte" |
|
|
|
import CreateAutomationModal from "components/automation/AutomationPanel/CreateAutomationModal.svelte" |
|
|
|
$: automation = $automationStore.selectedAutomation?.automation |
|
|
|
let modal |
|
|
|
</script> |
|
|
|
|
|
|
|
<!-- routify:options index=3 --> |
|
|
|
<div class="root"> |
|
|
|
<div class="nav"> |
|
|
|
<AutomationPanel /> |
|
|
|
<AutomationPanel modal /> |
|
|
|
</div> |
|
|
|
<div class="content"> |
|
|
|
<slot /> |
|
|
|
{#if automation} |
|
|
|
<slot /> |
|
|
|
{:else} |
|
|
|
<div class="centered"> |
|
|
|
<div class="main"> |
|
|
|
<Layout gap="S" justifyItems="center"> |
|
|
|
<svg |
|
|
|
width="60px" |
|
|
|
height="60px" |
|
|
|
class="spectrum-Icon" |
|
|
|
focusable="false" |
|
|
|
> |
|
|
|
<use xlink:href="#spectrum-icon-18-WorkflowAdd" /> |
|
|
|
</svg> |
|
|
|
<Heading size="S">You have no automations</Heading> |
|
|
|
<Body size="S">Let's fix that. Call the bots!</Body> |
|
|
|
<Button on:click={() => modal.show()} size="S" cta |
|
|
|
>Create automation</Button |
|
|
|
> |
|
|
|
</Layout> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
{#if $automationStore.selectedAutomation} |
|
|
|
<div class="setup"> |
|
|
|
<SetupPanel /> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
<Modal bind:this={modal}> |
|
|
|
<CreateAutomationModal /> |
|
|
|
</Modal> |
|
|
|
</div> |
|
|
|
|
|
|
|
<style> |
|
|
|
@ -60,4 +89,21 @@ |
|
|
|
background-color: var(--background); |
|
|
|
overflow-y: auto; |
|
|
|
} |
|
|
|
|
|
|
|
.centered { |
|
|
|
top: 0; |
|
|
|
bottom: 0; |
|
|
|
left: 0; |
|
|
|
right: 0; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
.main { |
|
|
|
width: 300px; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|