diff --git a/packages/builder/src/database/DatabaseRoot.svelte b/packages/builder/src/database/DatabaseRoot.svelte index 51edd71cf3..4aa85237b3 100644 --- a/packages/builder/src/database/DatabaseRoot.svelte +++ b/packages/builder/src/database/DatabaseRoot.svelte @@ -9,7 +9,11 @@ import DropdownButton from "../common/DropdownButton.svelte" import ActionButton from "../common/ActionButton.svelte" import Modal from "../common/Modal.svelte" - import { CreateEditRecordModal } from "./ModelDataTable/modals" + import { + CreateEditRecordModal, + CreateEditModelModal, + CreateEditViewModal, + } from "./ModelDataTable/modals" let modalOpen let selectedRecord @@ -18,10 +22,14 @@ selectedRecord = record modalOpen = true } + + $: recordOpen = $store.currentNode && $store.currentNode.type === 'record' + $: viewOpen = $store.currentNode && $store.currentNode.type === 'index' - + +
@@ -35,17 +43,6 @@ Create new record - {#if $store.currentNode} - - {#if $store.currentNode.type === 'record'} - - - {:else} - - - {/if} - - {/if}
diff --git a/packages/builder/src/database/ModelDataTable/modals/CreateEditModel.svelte b/packages/builder/src/database/ModelDataTable/modals/CreateEditModel.svelte index ed22e4ca55..9cd993a30d 100644 --- a/packages/builder/src/database/ModelDataTable/modals/CreateEditModel.svelte +++ b/packages/builder/src/database/ModelDataTable/modals/CreateEditModel.svelte @@ -1,6 +1,8 @@