1
0
Fork 0
mirror of synced 2024-07-02 13:01:09 +12:00

convert modelcreator and vieweditor to new modal

This commit is contained in:
kevmodrome 2020-04-06 16:51:17 +02:00
parent 09edd6ba3e
commit 6c4e7a4de7
3 changed files with 33 additions and 2 deletions

View file

@ -8,3 +8,9 @@
<section>
<ModelView />
</section>
<style>
section {
padding: 30px;
}
</style>

View file

@ -6,3 +6,9 @@
<section>
<IndexView />
</section>
<style>
section {
padding: 30px;
}
</style>

View file

@ -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>