From 1426cad1a638c506c493942d9f871b4fe9d52485 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 26 Feb 2020 11:19:28 +0100 Subject: [PATCH] update after review --- package-lock.json | 47 ++++++------------- package.json | 2 +- src/app.js | 6 +-- .../components/plugin-manager-component.js | 20 +++++--- src/app/panels/tab-proxy.js | 18 +++---- src/app/panels/terminal.js | 2 +- src/app/tabs/test-tab.js | 8 ++-- 7 files changed, 44 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8401a852ab..f32c87ee4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1778,9 +1778,9 @@ "integrity": "sha512-ePDxG9UuU9Kobk90ZUjtmDW8IT9U7aRb1/Rl9683MRNM+ur0ocHL2v7TPH2ajTiVSBUFbbeW8vKIt9jrb0JIAA==" }, "@remixproject/engine": { - "version": "0.2.0-alpha.1", - "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.2.0-alpha.1.tgz", - "integrity": "sha512-KeYCDBa02MddlyCDSF7YGTZgVcOWeNt4MEcTT/IMpHRyAht0apAq+2MDCMH3l1/wZ3ggiH0ZV12KxM/ZcQ92UQ==" + "version": "0.2.0-alpha.4", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.2.0-alpha.4.tgz", + "integrity": "sha512-AY6HaF7Y4fR1oOdz60B2zt+gGftaT5fZWSl5ka7UuDHZUzeouNMx4O1+Uk4376Mv+M3vdmpGFo6KgfsZj6wSJw==" }, "@resolver-engine/core": { "version": "0.3.3", @@ -6737,8 +6737,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -6756,13 +6755,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6775,18 +6772,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -6889,8 +6883,7 @@ }, "inherits": { "version": "2.0.4", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -6900,7 +6893,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6913,20 +6905,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.9.0", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -6943,7 +6932,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -7024,8 +7012,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -7035,7 +7022,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -7111,8 +7097,7 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -7142,7 +7127,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7160,7 +7144,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7199,13 +7182,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.1.1", - "bundled": true, - "optional": true + "bundled": true } } }, diff --git a/package.json b/package.json index 8874705b7c..a6952b179a 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "yo-yoify": "^3.7.3" }, "dependencies": { - "@remixproject/engine": "^0.2.0-alpha.1", + "@remixproject/engine": "^0.2.0-alpha.4", "http-server": "^0.11.1", "remixd": "0.1.8-alpha.10", "standard": "^8.5.0" diff --git a/src/app.js b/src/app.js index 45d0ac806b..d17876303d 100644 --- a/src/app.js +++ b/src/app.js @@ -308,9 +308,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const mainview = new MainView(contextualListener, editor, appPanel, fileManager, appManager, terminal) registry.put({ api: mainview, name: 'mainview' }) - engine.register([ - appPanel - ]) + engine.register(appPanel) // those views depend on app_manager const menuicons = new VerticalIcons(appManager) @@ -415,6 +413,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org } if (isElectron()) { - appManager.activatePlugin(['remixd']) + appManager.activatePlugin('remixd') } } diff --git a/src/app/components/plugin-manager-component.js b/src/app/components/plugin-manager-component.js index 9fc4961813..9c5fde5e4c 100644 --- a/src/app/components/plugin-manager-component.js +++ b/src/app/components/plugin-manager-component.js @@ -87,7 +87,11 @@ class PluginManagerComponent extends ViewPlugin { this.appManager.event.on('added', () => { this.reRender() }) } - renderItem (profile, isActive) { + isActive (name) { + return this.appManager.actives.includes(name) + } + + renderItem (profile) { const displayName = (profile.displayName) ? profile.displayName : profile.name // Check version of the plugin @@ -101,11 +105,12 @@ class PluginManagerComponent extends ViewPlugin { versionWarning = yo`beta` } - const activationButton = isActive + const activationButton = this.isActive(profile.name) ? yo` ` + + ` : yo`