Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
c4d99d47
Commit
c4d99d47
authored
Apr 09, 2019
by
Grandschtroumpf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
standard
parent
e8454407
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
app.js
src/app.js
+1
-1
browser-files-tree.js
src/app/files/browser-files-tree.js
+9
-6
universal-dapp.js
src/universal-dapp.js
+1
-4
No files found.
src/app.js
View file @
c4d99d47
...
@@ -488,7 +488,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -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
// The event listener needs to be registered as early as possible, because the
// parent will send the message upon the "load" event.
// parent will send the message upon the "load" event.
let
filesToLoad
=
null
let
filesToLoad
=
null
cons
t
loadFilesCallback
=
function
(
files
)
{
filesToLoad
=
files
}
// will be replaced later
le
t
loadFilesCallback
=
function
(
files
)
{
filesToLoad
=
files
}
// will be replaced later
window
.
addEventListener
(
'message'
,
function
(
ev
)
{
window
.
addEventListener
(
'message'
,
function
(
ev
)
{
if
(
typeof
ev
.
data
===
typeof
[]
&&
ev
.
data
[
0
]
===
'loadFiles'
)
{
if
(
typeof
ev
.
data
===
typeof
[]
&&
ev
.
data
[
0
]
===
'loadFiles'
)
{
...
...
src/app/files/browser-files-tree.js
View file @
c4d99d47
...
@@ -4,13 +4,13 @@ var EventManager = require('../../lib/events')
...
@@ -4,13 +4,13 @@ var EventManager = require('../../lib/events')
import
{
BaseApi
}
from
'remix-plugin'
import
{
BaseApi
}
from
'remix-plugin'
class
FilesTree
extends
BaseApi
{
class
FilesTree
extends
BaseApi
{
constructor
(
name
,
storage
)
{
constructor
(
name
,
storage
)
{
super
({
super
({
name
:
name
,
name
:
name
,
methods
:
[
'get'
,
'set'
,
'remove'
],
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
.
event
=
new
EventManager
()
this
.
storage
=
storage
this
.
storage
=
storage
...
@@ -109,7 +109,11 @@ import { BaseApi } from 'remix-plugin'
...
@@ -109,7 +109,11 @@ import { BaseApi } from 'remix-plugin'
if
(
!
this
.
storage
.
rename
(
unprefixedoldPath
,
unprefixednewPath
))
{
if
(
!
this
.
storage
.
rename
(
unprefixedoldPath
,
unprefixednewPath
))
{
return
false
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
true
}
}
return
false
return
false
...
@@ -117,7 +121,7 @@ import { BaseApi } from 'remix-plugin'
...
@@ -117,7 +121,7 @@ import { BaseApi } from 'remix-plugin'
resolveDirectory
(
path
,
callback
)
{
resolveDirectory
(
path
,
callback
)
{
if
(
path
[
0
]
===
'/'
)
path
=
path
.
substring
(
1
)
if
(
path
[
0
]
===
'/'
)
path
=
path
.
substring
(
1
)
if
(
!
path
)
return
callback
(
null
,
{
[
this
.
type
]:
{
}
})
if
(
!
path
)
return
callback
(
null
,
{
[
this
.
type
]:
{}
})
var
tree
=
{}
var
tree
=
{}
path
=
this
.
removePrefix
(
path
)
path
=
this
.
removePrefix
(
path
)
...
@@ -138,7 +142,6 @@ import { BaseApi } from 'remix-plugin'
...
@@ -138,7 +142,6 @@ import { BaseApi } from 'remix-plugin'
if
(
path
[
0
]
===
'/'
)
return
path
.
substring
(
1
)
if
(
path
[
0
]
===
'/'
)
return
path
.
substring
(
1
)
return
path
return
path
}
}
}
}
module
.
exports
=
FilesTree
module
.
exports
=
FilesTree
src/universal-dapp.js
View file @
c4d99d47
...
@@ -8,18 +8,15 @@ var txHelper = remixLib.execution.txHelper
...
@@ -8,18 +8,15 @@ var txHelper = remixLib.execution.txHelper
var
EventManager
=
remixLib
.
EventManager
var
EventManager
=
remixLib
.
EventManager
var
executionContext
=
remixLib
.
execution
.
executionContext
var
executionContext
=
remixLib
.
execution
.
executionContext
import
{
UdappApi
}
from
'remix-plugin'
import
{
UdappApi
}
from
'remix-plugin'
import
{
EventEmitter
}
from
'events'
;
import
{
EventEmitter
}
from
'events'
const
profile
=
{
const
profile
=
{
name
:
'udapp'
,
name
:
'udapp'
,
displayName
:
'universal dapp'
,
displayName
:
'universal dapp'
,
events
:
[
'newTransaction'
],
methods
:
[
'sendTransaction'
,
'getAccounts'
,
'createVMAccount'
],
description
:
'service - run transaction and access account'
,
description
:
'service - run transaction and access account'
,
permission
:
true
permission
:
true
}
}
module
.
exports
=
class
UniversalDApp
extends
UdappApi
{
module
.
exports
=
class
UniversalDApp
extends
UdappApi
{
constructor
(
registry
)
{
constructor
(
registry
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment