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
fdf42022
Commit
fdf42022
authored
Jun 07, 2020
by
ioedeveloper
Committed by
yann300
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stabilize Websocket Plugin Changes
parent
75e0e718
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
13 deletions
+17
-13
app.js
src/app.js
+5
-5
remixDProvider.js
src/app/files/remixDProvider.js
+8
-8
remixd-handle.js
src/app/files/remixd-handle.js
+1
-0
file-panel.js
src/app/panels/file-panel.js
+3
-0
No files found.
src/app.js
View file @
fdf42022
...
@@ -42,7 +42,7 @@ import { basicLogo } from './app/ui/svgLogo'
...
@@ -42,7 +42,7 @@ 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
,
WebsocketPlugin
}
from
'@remixproject/engine'
import
{
Engine
}
from
'@remixproject/engine'
import
{
RemixAppManager
}
from
'./remixAppManager'
import
{
RemixAppManager
}
from
'./remixAppManager'
import
{
FramingService
}
from
'./framingService'
import
{
FramingService
}
from
'./framingService'
import
{
MainView
}
from
'./app/panels/main-view'
import
{
MainView
}
from
'./app/panels/main-view'
...
@@ -143,6 +143,7 @@ class App {
...
@@ -143,6 +143,7 @@ class App {
registry
.
put
({
api
:
config
,
name
:
'config'
})
registry
.
put
({
api
:
config
,
name
:
'config'
})
// load file system
// load file system
self
.
appManager
=
new
RemixAppManager
({})
self
.
_components
.
filesProviders
=
{}
self
.
_components
.
filesProviders
=
{}
self
.
_components
.
filesProviders
[
'browser'
]
=
new
FileProvider
(
'browser'
)
self
.
_components
.
filesProviders
[
'browser'
]
=
new
FileProvider
(
'browser'
)
registry
.
put
({
api
:
self
.
_components
.
filesProviders
[
'browser'
],
name
:
'fileproviders/browser'
})
registry
.
put
({
api
:
self
.
_components
.
filesProviders
[
'browser'
],
name
:
'fileproviders/browser'
})
...
@@ -155,7 +156,6 @@ class App {
...
@@ -155,7 +156,6 @@ class App {
self
.
_components
.
filesProviders
[
'localhost'
]
=
new
RemixDProvider
(
self
.
appManager
)
self
.
_components
.
filesProviders
[
'localhost'
]
=
new
RemixDProvider
(
self
.
appManager
)
registry
.
put
({
api
:
self
.
_components
.
filesProviders
[
'localhost'
],
name
:
'fileproviders/localhost'
})
registry
.
put
({
api
:
self
.
_components
.
filesProviders
[
'localhost'
],
name
:
'fileproviders/localhost'
})
console
.
log
(
'self._components.filesProviders: '
,
self
.
_components
.
filesProviders
)
registry
.
put
({
api
:
self
.
_components
.
filesProviders
,
name
:
'fileproviders'
})
registry
.
put
({
api
:
self
.
_components
.
filesProviders
,
name
:
'fileproviders'
})
migrateFileSystem
(
self
.
_components
.
filesProviders
[
'browser'
])
migrateFileSystem
(
self
.
_components
.
filesProviders
[
'browser'
])
...
@@ -306,7 +306,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -306,7 +306,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
makeUdapp
(
blockchain
,
compilersArtefacts
,
(
domEl
)
=>
terminal
.
logHtml
(
domEl
))
makeUdapp
(
blockchain
,
compilersArtefacts
,
(
domEl
)
=>
terminal
.
logHtml
(
domEl
))
const
contextualListener
=
new
ContextualListener
({
editor
})
const
contextualListener
=
new
ContextualListener
({
editor
})
const
{
remixd
}
=
self
.
_components
engine
.
register
([
engine
.
register
([
contentImport
,
contentImport
,
...
@@ -320,8 +319,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -320,8 +319,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
contextualListener
,
contextualListener
,
terminal
,
terminal
,
web3Provider
,
web3Provider
,
fetchAndCompile
,
fetchAndCompile
remixd
])
])
// LAYOUT & SYSTEM VIEWS
// LAYOUT & SYSTEM VIEWS
...
@@ -433,6 +431,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -433,6 +431,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// get the file from gist
// get the file from gist
const
gistHandler
=
new
GistHandler
()
const
gistHandler
=
new
GistHandler
()
const
queryParams
=
new
QueryParams
()
const
params
=
queryParams
.
get
()
const
loadedFromGist
=
gistHandler
.
loadFromGist
(
params
,
fileManager
)
const
loadedFromGist
=
gistHandler
.
loadFromGist
(
params
,
fileManager
)
if
(
!
loadedFromGist
)
{
if
(
!
loadedFromGist
)
{
// insert example contracts if there are no files to show
// insert example contracts if there are no files to show
...
...
src/app/files/remixDProvider.js
View file @
fdf42022
...
@@ -15,12 +15,12 @@ module.exports = class RemixDProvider {
...
@@ -15,12 +15,12 @@ module.exports = class RemixDProvider {
this
.
filesContent
=
{}
this
.
filesContent
=
{}
this
.
files
=
{}
this
.
files
=
{}
//
var remixdEvents = ['connecting', 'connected', 'errored', 'closed']
var
remixdEvents
=
[
'connecting'
,
'connected'
,
'errored'
,
'closed'
]
//
remixdEvents.forEach((value) => {
remixdEvents
.
forEach
((
value
)
=>
{
//
remixd.event.register(value, (event) => {
//
remixd.event.register(value, (event) => {
//
this.event.trigger(value, [event])
//
this.event.trigger(value, [event])
//
})
//
})
//
})
})
// remixd.event.register('notified', (data) => {
// remixd.event.register('notified', (data) => {
// if (data.scope === 'sharedfolder') {
// if (data.scope === 'sharedfolder') {
...
@@ -69,7 +69,7 @@ module.exports = class RemixDProvider {
...
@@ -69,7 +69,7 @@ module.exports = class RemixDProvider {
})
})
}
}
// @TODO: refactor all `this._
remixd
.call(....)` uses into `this.remixd[api](...)`
// @TODO: refactor all `this._
appManager
.call(....)` uses into `this.remixd[api](...)`
// where `api = ...`:
// where `api = ...`:
// this.remixd.read(path, (error, content) => {})
// this.remixd.read(path, (error, content) => {})
// this.remixd.write(path, content, (error, result) => {})
// this.remixd.write(path, content, (error, result) => {})
...
@@ -182,7 +182,7 @@ module.exports = class RemixDProvider {
...
@@ -182,7 +182,7 @@ module.exports = class RemixDProvider {
const
unprefixedpath
=
this
.
removePrefix
(
path
)
const
unprefixedpath
=
this
.
removePrefix
(
path
)
const
callId
=
await
this
.
_appManager
.
call
(
'remixd'
,
'isDirectory'
,
{
path
:
unprefixedpath
})
const
callId
=
await
this
.
_appManager
.
call
(
'remixd'
,
'isDirectory'
,
{
path
:
unprefixedpath
})
return
await
this
.
_
remixd
.
receiveResponse
(
callId
)
return
await
this
.
_
appManager
.
receiveResponse
(
callId
)
}
}
async
isFile
(
path
)
{
async
isFile
(
path
)
{
...
...
src/app/files/remixd-handle.js
View file @
fdf42022
...
@@ -34,6 +34,7 @@ export class RemixdHandle extends WebsocketPlugin {
...
@@ -34,6 +34,7 @@ export class RemixdHandle extends WebsocketPlugin {
this
.
fileSystemExplorer
=
fileSystemExplorer
this
.
fileSystemExplorer
=
fileSystemExplorer
this
.
locahostProvider
=
locahostProvider
this
.
locahostProvider
=
locahostProvider
this
.
appManager
=
appManager
this
.
appManager
=
appManager
this
.
methods
=
[
'get'
]
}
}
deactivate
()
{
deactivate
()
{
...
...
src/app/panels/file-panel.js
View file @
fdf42022
...
@@ -60,6 +60,9 @@ module.exports = class Filepanel extends ViewPlugin {
...
@@ -60,6 +60,9 @@ module.exports = class Filepanel extends ViewPlugin {
var
fileExplorer
=
createProvider
(
'browser'
,
[
'createNewFile'
,
'publishToGist'
,
canUpload
?
'uploadFile'
:
''
])
var
fileExplorer
=
createProvider
(
'browser'
,
[
'createNewFile'
,
'publishToGist'
,
canUpload
?
'uploadFile'
:
''
])
var
fileSystemExplorer
=
createProvider
(
'localhost'
)
var
fileSystemExplorer
=
createProvider
(
'localhost'
)
console
.
log
(
'fileSystemExplorer: '
,
fileSystemExplorer
)
console
.
log
(
'self._deps.fileProviders: '
,
self
.
_deps
.
fileProviders
[
'localhost'
])
console
.
log
(
'appManager: '
,
appManager
)
self
.
remixdHandle
=
new
RemixdHandle
(
fileSystemExplorer
,
self
.
_deps
.
fileProviders
[
'localhost'
],
appManager
)
self
.
remixdHandle
=
new
RemixdHandle
(
fileSystemExplorer
,
self
.
_deps
.
fileProviders
[
'localhost'
],
appManager
)
const
explorers
=
yo
`
const
explorers
=
yo
`
...
...
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