mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-13 01:25:45 +00:00
Started work on argument form
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { marshalLogsJsonToHtml } from './marshaller.js';
|
||||
import "./ArgumentForm.js"
|
||||
|
||||
class ActionButton extends window.HTMLButtonElement {
|
||||
constructFromJson (json) {
|
||||
@@ -11,7 +12,18 @@ class ActionButton extends window.HTMLButtonElement {
|
||||
|
||||
this.updateFromJson(json)
|
||||
|
||||
this.onclick = () => { this.startAction() }
|
||||
this.onclick = () => {
|
||||
if (json.arguments.length > 0) {
|
||||
let frm = document.createElement('form', { is: 'argument-form' })
|
||||
window.frm = frm
|
||||
console.log(frm)
|
||||
frm.setup(json, this.startAction)
|
||||
|
||||
document.body.appendChild(frm)
|
||||
} else {
|
||||
this.startAction()
|
||||
}
|
||||
}
|
||||
|
||||
this.constructTemplate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user