From 9b675bcdd561c27949adbcc38edf4fbcbfb84b83 Mon Sep 17 00:00:00 2001 From: "davidzagi93@gmail.com" Date: Wed, 8 Sep 2021 01:42:49 +0100 Subject: [PATCH] removing unused variables from terminal props --- apps/remix-ide/src/app/panels/terminal.js | 16 ++++++++++++++++ .../terminal/src/lib/actions/terminalAction.ts | 13 ------------- .../terminal/src/lib/types/terminalTypes.ts | 6 +++++- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/apps/remix-ide/src/app/panels/terminal.js b/apps/remix-ide/src/app/panels/terminal.js index 08c5817d47..e732612b99 100644 --- a/apps/remix-ide/src/app/panels/terminal.js +++ b/apps/remix-ide/src/app/panels/terminal.js @@ -4,6 +4,7 @@ import ReactDOM from 'react-dom' import { RemixUiTerminal } from '@remix-ui/terminal' // eslint-disable-line import { Plugin } from '@remixproject/engine' import * as packageJson from '../../../../../package.json' +var vm = require('vm') var EventManager = require('../../lib/events') var CommandInterpreterAPI = require('../../lib/cmdInterpreterAPI') @@ -47,7 +48,18 @@ class Terminal extends Plugin { compilersArtefacts: this.registry.get('compilersartefacts').api, offsetToLineColumnConverter: this.registry.get('offsettolinecolumnconverter').api } + this.commandHelp = { + 'remix.loadgist(id)': 'Load a gist in the file explorer.', + 'remix.loadurl(url)': 'Load the given url in the file explorer. The url can be of type github, swarm, ipfs or raw http', + 'remix.execute(filepath)': 'Run the script specified by file path. If filepath is empty, script currently displayed in the editor is executed.', + 'remix.exeCurrent()': 'Run the script currently displayed in the editor', + 'remix.help()': 'Display this help message' + } this.blockchain = opts.blockchain + this.vm = vm + this._api = api + this._opts = opts + this.config = config this.version = packageJson.version this.data = { lineLength: opts.lineLength || 80, // ???? @@ -103,7 +115,11 @@ class Terminal extends Plugin { renderComponent () { ReactDOM.render( { data.filterFns[commandName] = filterFn } - // const _appendItem = (item) => { - // var { el, gidx } = item - // _JOURNAL[gidx] = item - // if (!_jobs.length) { - // requestAnimationFrame(function updateTerminal () { - // _jobs.forEach(el => _view.journal.appendChild(el)) - // .scroll2bottom() - // ._jobs = [] - // }) - // } - // if (data.activeFilters.commands[item.cmd]) _jobs.push(el) - // } - commands[name] = function () { const args = [...arguments] const steps = [] diff --git a/libs/remix-ui/terminal/src/lib/types/terminalTypes.ts b/libs/remix-ui/terminal/src/lib/types/terminalTypes.ts index 1ac572065b..5751e625be 100644 --- a/libs/remix-ui/terminal/src/lib/types/terminalTypes.ts +++ b/libs/remix-ui/terminal/src/lib/types/terminalTypes.ts @@ -7,17 +7,21 @@ export interface ROOTS { } export interface RemixUiTerminalProps { + propterties: any event: any blockchain: any + api: any + options: any version: any config: any thisState: any - vm: any + commandHelp: any, _deps: any, fileImport: any, gistHandler: any, sourceHighlighter: any, registry: any, + commands: any, txListener: any, eventsDecoder: any, logHtml: any