Add empty state text to automate page and consistently style empty states
This commit is contained in:
parent
9c6490f0f2
commit
162f91dc82
|
@ -51,9 +51,9 @@
|
||||||
<style>
|
<style>
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import Arrow from "./Arrow.svelte"
|
import Arrow from "./Arrow.svelte"
|
||||||
import { flip } from "svelte/animate"
|
import { flip } from "svelte/animate"
|
||||||
import { fade, fly } from "svelte/transition"
|
import { fade, fly } from "svelte/transition"
|
||||||
|
import { automationStore } from "builderStore"
|
||||||
|
|
||||||
export let automation
|
export let automation
|
||||||
export let onSelect
|
export let onSelect
|
||||||
|
@ -17,8 +18,14 @@
|
||||||
blocks = blocks.concat(automation.definition.steps || [])
|
blocks = blocks.concat(automation.definition.steps || [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$: automationCount = $automationStore.automations?.length ?? 0
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#if automationCount === 0}
|
||||||
|
<i>Create your first automation to get started</i>
|
||||||
|
{:else if automation == null}
|
||||||
|
<i>Select an automation to edit</i>
|
||||||
|
{/if}
|
||||||
<section class="canvas">
|
<section class="canvas">
|
||||||
{#each blocks as block, idx (block.id)}
|
{#each blocks as block, idx (block.id)}
|
||||||
<div
|
<div
|
||||||
|
@ -35,6 +42,13 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
i {
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
color: var(--grey-4);
|
||||||
|
padding: var(--spacing-xl) 40px;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
i {
|
i {
|
||||||
font-size: 20px;
|
font-size: var(--font-size-xl);
|
||||||
padding-bottom: 10px;
|
|
||||||
color: var(--grey-4);
|
color: var(--grey-4);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -23,12 +23,13 @@
|
||||||
|
|
||||||
{#if $backendUiStore.models.length === 0}
|
{#if $backendUiStore.models.length === 0}
|
||||||
<i>Create your first table to start building</i>
|
<i>Create your first table to start building</i>
|
||||||
{:else}Please select a table{/if}
|
{:else}
|
||||||
|
<i>Select a table to edit</i>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
i {
|
i {
|
||||||
font-size: 20px;
|
font-size: var(--font-size-xl);
|
||||||
padding-bottom: 10px;
|
|
||||||
color: var(--grey-4);
|
color: var(--grey-4);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -15,13 +15,12 @@
|
||||||
{#if $backendUiStore.selectedDatabase._id && selectedView}
|
{#if $backendUiStore.selectedDatabase._id && selectedView}
|
||||||
<ViewDataTable view={selectedView} />
|
<ViewDataTable view={selectedView} />
|
||||||
{:else}
|
{:else}
|
||||||
<i>create your first table to start building</i>
|
<i>Create your first table to start building</i>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
i {
|
i {
|
||||||
font-size: 20px;
|
font-size: var(--font-size-xl);
|
||||||
margin-right: 10px;
|
|
||||||
color: var(--grey-4);
|
color: var(--grey-4);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue