remixplugin0.3
yann300 4 years ago
parent 1dda6a2e9d
commit eb8f8fa332
  1. 5
      apps/remix-ide/src/app.js
  2. 7
      apps/remix-ide/src/app/components/plugin-manager-component.js
  3. 8
      apps/remix-ide/src/remixEngine.js

@ -4,7 +4,6 @@ import { basicLogo } from './app/ui/svgLogo'
import { RunTab, makeUdapp } from './app/udapp' import { RunTab, makeUdapp } from './app/udapp'
import PanelsResize from './lib/panels-resize' import PanelsResize from './lib/panels-resize'
import { Engine } from '@remixproject/engine'
import { RemixEngine } from './remixEngine' import { RemixEngine } from './remixEngine'
import { RemixAppManager } from './remixAppManager' import { RemixAppManager } from './remixAppManager'
import { FramingService } from './framingService' import { FramingService } from './framingService'
@ -234,7 +233,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const workspace = pluginLoader.get() const workspace = pluginLoader.get()
const engine = new RemixEngine() const engine = new RemixEngine()
engine.register(appManager) engine.register(appManager)
// SERVICES // SERVICES
// ----------------- import content servive ------------------------ // ----------------- import content servive ------------------------
const contentImport = new CompilerImport() const contentImport = new CompilerImport()
@ -403,7 +402,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const params = queryParams.get() const params = queryParams.get()
// Set workspace after initial activation // Set workspace after initial activation
if (Array.isArray(workspace)) { if (Array.isArray(workspace)) {
appManager.activatePlugin(workspace).then(async () => { appManager.activatePlugin(workspace).then(async () => {
try { try {
if (params.deactivate) { if (params.deactivate) {

@ -1,11 +1,10 @@
import { IframePlugin, ViewPlugin, WebsocketPlugin } from '@remixproject/engine-web'
import { PluginManagerSettings } from './plugin-manager-settings' import { PluginManagerSettings } from './plugin-manager-settings'
import * as packageJson from '../../../../../package.json'
const yo = require('yo-yo') const yo = require('yo-yo')
const csjs = require('csjs-inject') const csjs = require('csjs-inject')
const EventEmitter = require('events') const EventEmitter = require('events')
const LocalPlugin = require('./local-plugin') const LocalPlugin = require('./local-plugin')
import { IframePlugin, ViewPlugin, WebsocketPlugin } from '@remixproject/engine-web'
import { PluginManagerSettings } from './plugin-manager-settings'
import * as packageJson from '../../../../../package.json'
const addToolTip = require('../ui/tooltip') const addToolTip = require('../ui/tooltip')
const css = csjs` const css = csjs`
@ -83,7 +82,7 @@ class PluginManagerComponent extends ViewPlugin {
this.localPlugin = new LocalPlugin() this.localPlugin = new LocalPlugin()
this.filter = '' this.filter = ''
this.appManager.event.on('activate', () => { this.reRender() }) this.appManager.event.on('activate', () => { this.reRender() })
this.appManager.event.on('deactivate', () => { this.reRender() }) this.appManager.event.on('deactivate', () => { this.reRender() })
this.engine = engine this.engine = engine
this.engine.event.on('onRegistration', () => { this.reRender() }) this.engine.event.on('onRegistration', () => { this.reRender() })
} }

@ -1,18 +1,16 @@
/* global localStorage, fetch */
import { Engine } from '@remixproject/engine' import { Engine } from '@remixproject/engine'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
export class RemixEngine extends Engine { export class RemixEngine extends Engine {
constructor () { constructor () {
super() super()
this.event = new EventEmitter() this.event = new EventEmitter()
} }
setPluginOption ({ name, kind }) { setPluginOption ({ name, kind }) {
if (kind === 'provider') return {queueTimeout: 60000 * 2} if (kind === 'provider') return { queueTimeout: 60000 * 2 }
if (name === 'LearnEth') return {queueTimeout: 60000} if (name === 'LearnEth') return { queueTimeout: 60000 }
return {queueTimeout: 10000} return { queueTimeout: 10000 }
} }
onRegistration (plugin) { onRegistration (plugin) {

Loading…
Cancel
Save