Reworked tree
This commit is contained in:
parent
c0255fadb8
commit
a6bb845c9d
9 changed files with 314 additions and 117 deletions
|
|
@ -14,20 +14,6 @@
|
|||
import {App, TreeNode} from '/js/{{ .VERSION }}/app.mjs'
|
||||
window._VERSION = '{{ .VERSION }}'
|
||||
window._app = new App()
|
||||
|
||||
fetch('/nodes/tree/0?depth=2')
|
||||
.then(data => data.json())
|
||||
.then(json => {
|
||||
if (!json.OK) {
|
||||
showError(json.Error)
|
||||
return
|
||||
}
|
||||
|
||||
const top = document.getElementById('nodes')
|
||||
const topNode = new TreeNode(top, json.Nodes)
|
||||
topNode.render()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<div id="layout">
|
||||
|
|
@ -39,7 +25,9 @@
|
|||
|
||||
<div class="page section" id="nodes"></div>
|
||||
<div class="page" id="editor-node">
|
||||
<div class="section">
|
||||
<div class="section ops">
|
||||
<img onclick="mbus.dispatch('NODE_EDIT_NAME')" src="/images/{{ .VERSION }}/node_modules/@mdi/svg/svg/tag-text-outline.svg" style="display: block; height: 32px" />
|
||||
<div onclick="mbus.dispatch('NODE_EDIT_NAME')" id="editor-node-name"></div>
|
||||
<img onclick="mbus.dispatch('NODE_CREATE_DIALOG')" src="/images/{{ .VERSION }}/node_modules/@mdi/svg/svg/plus-box.svg" style="display: block; height: 32px" />
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue