wip
This commit is contained in:
parent
e28a7c765c
commit
b7fa4c5c94
2 changed files with 21 additions and 9 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { Component } from '@component'
|
||||
import { Editor } from '@editor'
|
||||
import { MessageBus } from '@mbus'
|
||||
import { SelectType, SelectNodeDialog, ConnectionDataDialog } from '@select_node'
|
||||
|
|
@ -54,7 +55,7 @@ export class App {
|
|||
const uri = `${location.protocol}//${location.host}/nodes/${event.detail}`
|
||||
const img = document.querySelector('#editor-node .copy-path')
|
||||
img.classList.add('highlight')
|
||||
setTimeout(()=>img.classList.remove('highlight'), 150)
|
||||
setTimeout(() => img.classList.remove('highlight'), 150)
|
||||
navigator.clipboard.writeText(uri)
|
||||
break
|
||||
|
||||
|
|
@ -190,7 +191,11 @@ export class App {
|
|||
this.typesList.fetchTypes().then(() => {
|
||||
mbus.dispatch('TYPES_LIST_FETCHED')
|
||||
})
|
||||
break
|
||||
|
||||
case 'script':
|
||||
document.getElementById('scripts').classList.add('show')
|
||||
document.getElementById('editor-script').classList.add('show')
|
||||
break
|
||||
}
|
||||
}// }}}
|
||||
|
|
@ -693,8 +698,9 @@ export class TreeNode {
|
|||
}// }}}
|
||||
}
|
||||
|
||||
export class TypesList {
|
||||
constructur() {// {{{
|
||||
class TypesList extends Component {
|
||||
constructor() {// {{{
|
||||
super()
|
||||
this.types = []
|
||||
}// }}}
|
||||
async fetchTypes() {// {{{
|
||||
|
|
@ -712,7 +718,7 @@ export class TypesList {
|
|||
.catch(err => reject(err))
|
||||
})
|
||||
}// }}}
|
||||
render() {// {{{
|
||||
renderComponent() {// {{{
|
||||
const div = document.createElement('div')
|
||||
|
||||
const create = document.createElement('img')
|
||||
|
|
@ -775,11 +781,12 @@ export class TypesList {
|
|||
}// }}}
|
||||
}
|
||||
|
||||
class TypeSchemaEditor {
|
||||
class TypeSchemaEditor extends Component {
|
||||
constructor(dataType) {// {{{
|
||||
super()
|
||||
this.type = dataType
|
||||
}// }}}
|
||||
render() {// {{{
|
||||
renderComponent() {// {{{
|
||||
const tmpl = document.createElement('template')
|
||||
tmpl.innerHTML = `
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue