Commit 61029b8f authored by Grandschtroumpf's avatar Grandschtroumpf

standard

parent 79b3cf2a
......@@ -488,7 +488,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// The event listener needs to be registered as early as possible, because the
// parent will send the message upon the "load" event.
let filesToLoad = null
const loadFilesCallback = function (files) { filesToLoad = files } // will be replaced later
let loadFilesCallback = function (files) { filesToLoad = files } // will be replaced later
window.addEventListener('message', function (ev) {
if (typeof ev.data === typeof [] && ev.data[0] === 'loadFiles') {
......
......@@ -4,13 +4,13 @@ var EventManager = require('../../lib/events')
import { BaseApi } from 'remix-plugin'
class FilesTree extends BaseApi {
class FilesTree extends BaseApi {
constructor (name, storage) {
super({
name: name,
methods: ['get', 'set', 'remove'],
description: 'service - read/write file to the `config` explorer without need of additionnal permission.'
description:
'service - read/write file to the `config` explorer without need of additionnal permission.'
})
this.event = new EventManager()
this.storage = storage
......@@ -109,7 +109,11 @@ import { BaseApi } from 'remix-plugin'
if (!this.storage.rename(unprefixedoldPath, unprefixednewPath)) {
return false
}
this.event.trigger('fileRenamed', [this.type + '/' + unprefixedoldPath, this.type + '/' + unprefixednewPath, isFolder])
this.event.trigger('fileRenamed', [
this.type + '/' + unprefixedoldPath,
this.type + '/' + unprefixednewPath,
isFolder
])
return true
}
return false
......@@ -117,7 +121,7 @@ import { BaseApi } from 'remix-plugin'
resolveDirectory (path, callback) {
if (path[0] === '/') path = path.substring(1)
if (!path) return callback(null, { [this.type]: { } })
if (!path) return callback(null, { [this.type]: {} })
var tree = {}
path = this.removePrefix(path)
......@@ -138,7 +142,6 @@ import { BaseApi } from 'remix-plugin'
if (path[0] === '/') return path.substring(1)
return path
}
}
module.exports = FilesTree
......@@ -49,10 +49,6 @@ class FileManager extends FileSystemApi {
this._deps.localhostExplorer.event.register('closed', (event) => { this.removeTabsOf(this._deps.localhostExplorer) })
}
get profile () {
return
}
fileRenamedEvent (oldName, newName, isFolder) {
if (!isFolder) {
this._deps.config.set('currentFile', '')
......
......@@ -25,10 +25,6 @@ class AnalysisTab extends BaseApi {
this.registry = registry
}
get profile () {
return
}
render () {
var staticanalysis = new StaticAnalysis()
staticanalysis.event.register('staticAnaysisWarning', (count) => {
......
......@@ -8,18 +8,15 @@ var txHelper = remixLib.execution.txHelper
var EventManager = remixLib.EventManager
var executionContext = remixLib.execution.executionContext
import { UdappApi } from 'remix-plugin'
import { EventEmitter } from 'events';
import { EventEmitter } from 'events'
const profile = {
name: 'udapp',
displayName: 'universal dapp',
events: ['newTransaction'],
methods: ['sendTransaction', 'getAccounts', 'createVMAccount'],
description: 'service - run transaction and access account',
permission: true
}
module.exports = class UniversalDApp extends UdappApi {
constructor (registry) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment