|
|
|
@ -1,9 +1,16 @@ |
|
|
|
<script> |
|
|
|
import { getContext } from "svelte" |
|
|
|
import { store, backendUiStore } from "builderStore" |
|
|
|
import HierarchyRow from "./HierarchyRow.svelte" |
|
|
|
import DropdownButton from "components/common/DropdownButton.svelte" |
|
|
|
import NavItem from "./NavItem.svelte" |
|
|
|
import getIcon from "components/common/icon" |
|
|
|
import { |
|
|
|
CreateEditModelModal, |
|
|
|
CreateEditViewModal, |
|
|
|
} from "components/database/ModelDataTable/modals" |
|
|
|
|
|
|
|
const { open, close } = getContext("simple-modal") |
|
|
|
|
|
|
|
function newModel() { |
|
|
|
if ($store.currentNode) { |
|
|
|
@ -11,12 +18,24 @@ |
|
|
|
} else { |
|
|
|
store.newRootRecord() |
|
|
|
} |
|
|
|
backendUiStore.actions.modals.show("MODEL") |
|
|
|
open( |
|
|
|
CreateEditModelModal, |
|
|
|
{ |
|
|
|
onClosed: close, |
|
|
|
}, |
|
|
|
{ styleContent: { padding: "0" } } |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
function newView() { |
|
|
|
store.newRootIndex() |
|
|
|
backendUiStore.actions.modals.show("VIEW") |
|
|
|
open( |
|
|
|
CreateEditViewModal, |
|
|
|
{ |
|
|
|
onClosed: close, |
|
|
|
}, |
|
|
|
{ styleContent: { padding: "0" } } |
|
|
|
) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
|