pull/2074/head
bunsenstraat 3 years ago
parent 7bbf49c43a
commit 40f30d164d
  1. 31
      apps/remix-ide/src/app/panels/terminal.js
  2. 4
      apps/remix-ide/src/index.tsx

@ -9,6 +9,7 @@ const vm = require('vm')
const EventManager = require('../../lib/events')
import { CompilerImports } from '@remix-project/core-plugin' // eslint-disable-line
import { ViewPluginUI } from '../components/ViewPluginUI'
const KONSOLES = []
@ -79,9 +80,12 @@ class Terminal extends Plugin {
this.call('menuicons', 'select', 'debugger')
this.call('debugger', 'debug', hash)
})
this.dispatch = null
}
onActivation () {
onActivation() {
this.renderComponent()
}
@ -100,19 +104,28 @@ class Terminal extends Plugin {
this.terminalApi.log(message)
}
setDispatch(dispatch) {
this.dispatch = dispatch
}
render () {
return this.element
return <div id='terminal-view' className='panel' data-id='terminalContainer-view'><ViewPluginUI plugin={this}/></div>
}
updateComponent(state) {
console.log("render terminal")
return <RemixUiTerminal
plugin={state.plugin}
onReady={state.onReady}
/>
}
renderComponent () {
const onReady = (api) => { this.terminalApi = api }
ReactDOM.render(
<RemixUiTerminal
plugin={this}
onReady={onReady}
/>,
this.element
)
this.dispatch({
plugin: this,
onReady: onReady
})
}
scroll2bottom () {

@ -33,9 +33,9 @@ import ('./app').then((AppComponent) => {
const appComponent = new AppComponent.default()
appComponent.run().then(() => {
render(
<React.StrictMode>
<>
<RemixApp app={appComponent} />
</React.StrictMode>,
</>,
document.getElementById('root')
)
})

Loading…
Cancel
Save