fix terminal

pull/5370/head
yann300 3 years ago
parent 8e62ddccf7
commit b4d438e87e
  1. 4
      apps/remix-ide/src/app.js
  2. 15
      apps/remix-ide/src/app/panels/terminal.js

@ -283,7 +283,7 @@ class App {
registry.put({ api: offsetToLineColumnConverter, name: 'offsettolinecolumnconverter' }) registry.put({ api: offsetToLineColumnConverter, name: 'offsettolinecolumnconverter' })
// -------------------Terminal---------------------------------------- // -------------------Terminal----------------------------------------
makeUdapp(blockchain, compilersArtefacts, (domEl) => terminal.logHtml(domEl))
const terminal = new Terminal( const terminal = new Terminal(
{ appManager, blockchain }, { appManager, blockchain },
{ {
@ -297,8 +297,6 @@ class App {
} }
} }
) )
makeUdapp(blockchain, compilersArtefacts, (domEl) => terminal.logHtml(domEl))
const contextualListener = new ContextualListener({ editor }) const contextualListener = new ContextualListener({ editor })
engine.register([ engine.register([

@ -12,7 +12,6 @@ const AutoCompletePopup = require('../ui/auto-complete-popup')
import { CompilerImports } from '@remix-project/core-plugin' // eslint-disable-line import { CompilerImports } from '@remix-project/core-plugin' // eslint-disable-line
const globalRegistry = require('../../global/registry') const globalRegistry = require('../../global/registry')
const SourceHighlighter = require('../../app/editor/sourceHighlighter')
const GistHandler = require('../../lib/gist-handler') const GistHandler = require('../../lib/gist-handler')
const KONSOLES = [] const KONSOLES = []
@ -29,12 +28,11 @@ const profile = {
} }
class Terminal extends Plugin { class Terminal extends Plugin {
constructor (opts, api, registry) { constructor (opts, api) {
super(profile) super(profile)
this.fileImport = new CompilerImports() this.fileImport = new CompilerImports()
this.gistHandler = new GistHandler() this.gistHandler = new GistHandler()
this.event = new EventManager() this.event = new EventManager()
this.registry = registry
this.globalRegistry = globalRegistry this.globalRegistry = globalRegistry
this.element = document.createElement('div') this.element = document.createElement('div')
this.element.setAttribute('class', 'panel') this.element.setAttribute('class', 'panel')
@ -42,12 +40,11 @@ class Terminal extends Plugin {
this.element.setAttribute('data-id', 'terminalContainer-view') this.element.setAttribute('data-id', 'terminalContainer-view')
this.eventsDecoder = this.globalRegistry.get('eventsDecoder').api this.eventsDecoder = this.globalRegistry.get('eventsDecoder').api
this.txListener = this.globalRegistry.get('txlistener').api this.txListener = this.globalRegistry.get('txlistener').api
this.sourceHighlighter = new SourceHighlighter()
this._deps = { this._deps = {
fileManager: this.registry.get('filemanager').api, fileManager: this.globalRegistry.get('filemanager').api,
editor: this.registry.get('editor').api, editor: this.globalRegistry.get('editor').api,
compilersArtefacts: this.registry.get('compilersartefacts').api, compilersArtefacts: this.globalRegistry.get('compilersartefacts').api,
offsetToLineColumnConverter: this.registry.get('offsettolinecolumnconverter').api offsetToLineColumnConverter: this.globalRegistry.get('offsettolinecolumnconverter').api
} }
this.commandHelp = { this.commandHelp = {
'remix.loadgist(id)': 'Load a gist in the file explorer.', 'remix.loadgist(id)': 'Load a gist in the file explorer.',
@ -60,7 +57,7 @@ class Terminal extends Plugin {
this.vm = vm this.vm = vm
this._api = api this._api = api
this._opts = opts this._opts = opts
this.config = registry.get('config').api this.config = this.globalRegistry.get('config').api
this.version = packageJson.version this.version = packageJson.version
this.data = { this.data = {
lineLength: opts.lineLength || 80, // ???? lineLength: opts.lineLength || 80, // ????

Loading…
Cancel
Save