1
0
Fork 0
mirror of synced 2024-07-05 14:31:17 +12:00
budibase/packages/builder/src/components/automation/AutomationBuilder/AutomationBuilder.svelte

33 lines
860 B
Svelte
Raw Normal View History

<script>
import { automationStore, backendUiStore } from "builderStore"
2020-10-27 01:25:26 +13:00
import Flowchart from "./FlowChart/FlowChart.svelte"
import BlockList from "./BlockList.svelte"
$: automation = $automationStore.selectedAutomation?.automation
$: automationLive = automation?.live
$: instanceId = $backendUiStore.selectedDatabase._id
$: automationCount = $automationStore.automations?.length ?? 0
function onSelect(block) {
2020-10-28 04:28:13 +13:00
automationStore.update(state => {
state.selectedBlock = block
return state
})
}
</script>
{#if automation}
<BlockList />
<Flowchart {automation} {onSelect} />
{:else if automationCount === 0}
<i>Create your first automation to get started</i>
{:else}<i>Select an automation to edit</i>{/if}
<style>
i {
font-size: var(--font-size-m);
color: var(--grey-5);
margin-top: 2px;
}
</style>