mirror of https://github.com/Budibase/budibase.git
committed by
GitHub
15 changed files with 115 additions and 36 deletions
@ -1,6 +1,15 @@ |
|||||
<script> |
<script> |
||||
import { store } from "builderStore" |
import { automationStore } from "builderStore" |
||||
import { params } from "@sveltech/routify" |
import { params } from "@sveltech/routify" |
||||
|
|
||||
store.actions.layouts.select($params.layout) |
if ($params.automation) { |
||||
|
const automation = $automationStore.automations.find( |
||||
|
m => m._id === $params.automation |
||||
|
) |
||||
|
if (automation) { |
||||
|
automationStore.actions.select(automation) |
||||
|
} |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
|
<slot /> |
||||
|
|||||
@ -0,0 +1,6 @@ |
|||||
|
<script> |
||||
|
import AutomationBuilder from "components/automation/AutomationBuilder/AutomationBuilder.svelte" |
||||
|
</script> |
||||
|
|
||||
|
<AutomationBuilder /> |
||||
|
|
||||
@ -1,5 +1,26 @@ |
|||||
<script> |
<script> |
||||
import AutomationBuilder from "components/automation/AutomationBuilder/AutomationBuilder.svelte" |
import { goto, leftover } from "@sveltech/routify" |
||||
|
import { onMount } from 'svelte' |
||||
|
import { automationStore } from "builderStore" |
||||
|
|
||||
|
onMount(async () => { |
||||
|
// navigate to first automation in list, if not already selected |
||||
|
if ( |
||||
|
!$leftover && |
||||
|
$automationStore.automations.length > 0 && |
||||
|
(!$automationStore.selectedAutomation || !$automationStore.selectedAutomation?.automation?._id) |
||||
|
) { |
||||
|
$goto(`../${$automationStore.automations[0]._id}`) |
||||
|
} |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<AutomationBuilder /> |
<i>Create your first automation to get started</i> |
||||
|
|
||||
|
<style> |
||||
|
i { |
||||
|
font-size: var(--font-size-m); |
||||
|
color: var(--grey-5); |
||||
|
margin-top: 2px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,15 @@ |
|||||
|
<script> |
||||
|
import { params } from "@sveltech/routify" |
||||
|
import { backendUiStore } from "builderStore" |
||||
|
|
||||
|
if ($params.query) { |
||||
|
const query = $backendUiStore.queries.find( |
||||
|
m => m._id === $params.query |
||||
|
) |
||||
|
if (query) { |
||||
|
backendUiStore.actions.queries.select(query) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<slot /> |
||||
@ -0,0 +1,29 @@ |
|||||
|
<script> |
||||
|
import { backendUiStore } from "builderStore" |
||||
|
import { goto, leftover } from "@sveltech/routify" |
||||
|
import { onMount } from "svelte" |
||||
|
|
||||
|
onMount(async () => { |
||||
|
// navigate to first table in list, if not already selected |
||||
|
// and this is the final url (i.e. no selectedTable) |
||||
|
if ( |
||||
|
!$leftover && |
||||
|
$backendUiStore.datasources.length > 0 && !$backendUiStore.selectedDatasourceId |
||||
|
) { |
||||
|
// this file routes as .../tables/index, so, go up one. |
||||
|
$goto(`../${$backendUiStore.datasources[0]._id}`) |
||||
|
} |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
{#if $backendUiStore.tables.length === 0} |
||||
|
<i>Connect your first datasource to start building.</i> |
||||
|
{:else}<i>Select a datasource to edit</i>{/if} |
||||
|
|
||||
|
<style> |
||||
|
i { |
||||
|
font-size: var(--font-size-m); |
||||
|
color: var(--grey-5); |
||||
|
margin-top: 2px; |
||||
|
} |
||||
|
</style> |
||||
Loading…
Reference in new issue