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
9280d2c8
Commit
9280d2c8
authored
Feb 17, 2020
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some errors. Todo: Home is broken
parent
cf854ccd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
24 deletions
+23
-24
package-lock.json
package-lock.json
+0
-0
app.js
src/app.js
+5
-5
hidden-panel.js
src/app/components/hidden-panel.js
+1
-1
panel.js
src/app/components/panel.js
+1
-1
side-panel.js
src/app/components/side-panel.js
+8
-6
terminal.js
src/app/panels/terminal.js
+2
-5
auto-complete-popup.js
src/app/ui/auto-complete-popup.js
+2
-2
txLogger.js
src/app/ui/txLogger.js
+2
-2
remixAppManager.js
src/remixAppManager.js
+2
-2
No files found.
package-lock.json
View file @
9280d2c8
This diff is collapsed.
Click to expand it.
src/app.js
View file @
9280d2c8
...
@@ -384,12 +384,12 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -384,12 +384,12 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
console
.
log
(
'couldn
\'
t register iframe plugins'
,
e
.
message
)
console
.
log
(
'couldn
\'
t register iframe plugins'
,
e
.
message
)
}
}
await
appManager
.
activate
([
'contentImport'
,
'theme'
,
'editor'
,
'fileManager'
,
'compilerMetadata'
,
'compilerArtefacts'
,
'network'
,
'offsetToLineColumnConverter'
])
await
appManager
.
activate
Plugin
([
'contentImport'
,
'theme'
,
'editor'
,
'fileManager'
,
'compilerMetadata'
,
'compilerArtefacts'
,
'network'
,
'offsetToLineColumnConverter'
])
await
appManager
.
activate
([
'mainPanel
'
])
await
appManager
.
activate
Plugin
([
'mainPanel'
,
'menuicons
'
])
await
appManager
.
activate
([
'menuicons'
,
'home'
,
'sidePanel'
,
'pluginManager'
,
'fileExplorers'
,
'settings'
,
'contextualListener'
,
'terminal'
])
await
appManager
.
activate
Plugin
([
'home'
,
'sidePanel'
,
'pluginManager'
,
'fileExplorers'
,
'settings'
,
'contextualListener'
,
'terminal'
])
// Set workspace after initial activation
// Set workspace after initial activation
if
(
Array
.
isArray
(
workspace
))
await
appManager
.
activate
(
workspace
)
if
(
Array
.
isArray
(
workspace
))
await
appManager
.
activate
Plugin
(
workspace
)
// Load and start the service who manager layout and frame
// Load and start the service who manager layout and frame
const
framingService
=
new
FramingService
(
sidePanel
,
menuicons
,
mainview
,
this
.
_components
.
resizeFeature
)
const
framingService
=
new
FramingService
(
sidePanel
,
menuicons
,
mainview
,
this
.
_components
.
resizeFeature
)
...
@@ -415,6 +415,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -415,6 +415,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
}
}
if
(
isElectron
())
{
if
(
isElectron
())
{
appManager
.
activate
([
'remixd'
])
appManager
.
activate
Plugin
([
'remixd'
])
}
}
}
}
src/app/components/hidden-panel.js
View file @
9280d2c8
...
@@ -14,7 +14,7 @@ const profile = {
...
@@ -14,7 +14,7 @@ const profile = {
displayName
:
'Hidden Panel'
,
displayName
:
'Hidden Panel'
,
description
:
''
,
description
:
''
,
version
:
packageJson
.
version
,
version
:
packageJson
.
version
,
methods
:
{}
methods
:
[]
}
}
export
class
HiddenPanel
extends
AbstractPanel
{
export
class
HiddenPanel
extends
AbstractPanel
{
...
...
src/app/components/panel.js
View file @
9280d2c8
import
{
EventEmitter
}
from
'events'
import
{
EventEmitter
}
from
'events'
const
csjs
=
require
(
'csjs-inject'
)
const
csjs
=
require
(
'csjs-inject'
)
const
yo
=
require
(
'yo-yo'
)
const
yo
=
require
(
'yo-yo'
)
const
{
HostPlugin
}
=
require
(
'@remixproject/engine'
)
import
{
HostPlugin
}
from
'@remixproject/engine'
const
css
=
csjs
`
const
css
=
csjs
`
.plugins {
.plugins {
...
...
src/app/components/side-panel.js
View file @
9280d2c8
...
@@ -62,7 +62,8 @@ export class SidePanel extends AbstractPanel {
...
@@ -62,7 +62,8 @@ export class SidePanel extends AbstractPanel {
constructor
(
appManager
,
verticalIcons
)
{
constructor
(
appManager
,
verticalIcons
)
{
super
(
sidePanel
)
super
(
sidePanel
)
this
.
appManager
=
appManager
this
.
appManager
=
appManager
this
.
header
=
this
.
renderHeader
()
this
.
header
=
yo
`<header></header>`
this
.
renderHeader
()
this
.
verticalIcons
=
verticalIcons
this
.
verticalIcons
=
verticalIcons
// Toggle content
// Toggle content
...
@@ -103,18 +104,18 @@ export class SidePanel extends AbstractPanel {
...
@@ -103,18 +104,18 @@ export class SidePanel extends AbstractPanel {
* Display content and update the header
* Display content and update the header
* @param {String} name The name of the plugin to display
* @param {String} name The name of the plugin to display
*/
*/
showContent
(
name
)
{
async
showContent
(
name
)
{
super
.
showContent
(
name
)
super
.
showContent
(
name
)
yo
.
update
(
this
.
header
,
this
.
renderHeader
()
)
this
.
renderHeader
(
)
}
}
/** The header of the side panel */
/** The header of the side panel */
renderHeader
()
{
async
renderHeader
()
{
let
name
=
' - '
let
name
=
' - '
let
docLink
=
''
let
docLink
=
''
let
versionWarning
let
versionWarning
if
(
this
.
active
)
{
if
(
this
.
active
)
{
const
{
profile
}
=
this
.
appManager
.
getPlugin
(
this
.
active
)
const
profile
=
await
this
.
appManager
.
getProfile
(
this
.
active
)
name
=
profile
.
displayName
?
profile
.
displayName
:
profile
.
name
name
=
profile
.
displayName
?
profile
.
displayName
:
profile
.
name
docLink
=
profile
.
documentation
?
yo
`<a href="
${
profile
.
documentation
}
" class="
${
css
.
titleInfo
}
" title="link to documentation" target="_blank"><i aria-hidden="true" class="fas fa-book"></i></a>`
:
''
docLink
=
profile
.
documentation
?
yo
`<a href="
${
profile
.
documentation
}
" class="
${
css
.
titleInfo
}
" title="link to documentation" target="_blank"><i aria-hidden="true" class="fas fa-book"></i></a>`
:
''
if
(
profile
.
version
&&
profile
.
version
.
match
(
/
\b(\w
*alpha
\w
*
)\b
/g
))
{
if
(
profile
.
version
&&
profile
.
version
.
match
(
/
\b(\w
*alpha
\w
*
)\b
/g
))
{
...
@@ -126,13 +127,14 @@ export class SidePanel extends AbstractPanel {
...
@@ -126,13 +127,14 @@ export class SidePanel extends AbstractPanel {
}
}
}
}
return
yo
`
const
header
=
yo
`
<header class="
${
css
.
swapitHeader
}
px-3">
<header class="
${
css
.
swapitHeader
}
px-3">
<h6 class="
${
css
.
swapitTitle
}
" data-id="sidePanelSwapitTitle">
${
name
}
</h6>
<h6 class="
${
css
.
swapitTitle
}
" data-id="sidePanelSwapitTitle">
${
name
}
</h6>
${
docLink
}
${
docLink
}
${
versionWarning
}
${
versionWarning
}
</header>
</header>
`
`
yo
.
update
(
this
.
header
,
header
)
}
}
render
()
{
render
()
{
...
...
src/app/panels/terminal.js
View file @
9280d2c8
...
@@ -98,9 +98,6 @@ class Terminal extends Plugin {
...
@@ -98,9 +98,6 @@ class Terminal extends Plugin {
if
(
opts
.
shell
)
self
.
_shell
=
opts
.
shell
// ???
if
(
opts
.
shell
)
self
.
_shell
=
opts
.
shell
// ???
register
(
self
)
register
(
self
)
}
}
setTxListener
(
txListener
)
{
this
.
_opts
.
txListener
=
txListener
}
logHtml
(
html
)
{
logHtml
(
html
)
{
var
command
=
this
.
commands
[
'html'
]
var
command
=
this
.
commands
[
'html'
]
if
(
typeof
command
===
'function'
)
command
(
html
)
if
(
typeof
command
===
'function'
)
command
(
html
)
...
@@ -137,7 +134,7 @@ class Terminal extends Plugin {
...
@@ -137,7 +134,7 @@ class Terminal extends Plugin {
self
.
_view
.
inputSearch
=
yo
`<input
self
.
_view
.
inputSearch
=
yo
`<input
spellcheck="false"
spellcheck="false"
type="text"
type="text"
class="
${
css
.
filter
}
form-control"
class="
border
${
css
.
filter
}
form-control"
id="searchInput"
id="searchInput"
onkeydown=
${
filter
}
onkeydown=
${
filter
}
placeholder="Search with transaction hash or address">
placeholder="Search with transaction hash or address">
...
@@ -436,7 +433,7 @@ class Terminal extends Plugin {
...
@@ -436,7 +433,7 @@ class Terminal extends Plugin {
self
.
_shell
(
'remix.help()'
,
self
.
commands
,
()
=>
{})
self
.
_shell
(
'remix.help()'
,
self
.
commands
,
()
=>
{})
self
.
commands
.
html
(
intro
)
self
.
commands
.
html
(
intro
)
self
.
_components
.
txLogger
=
new
TxLogger
(
self
.
_opts
.
eventsDecoder
,
self
.
_opts
.
txListener
,
this
,
self
.
blockchain
)
self
.
_components
.
txLogger
=
new
TxLogger
(
this
,
self
.
blockchain
)
self
.
_components
.
txLogger
.
event
.
register
(
'debuggingRequested'
,
(
hash
)
=>
{
self
.
_components
.
txLogger
.
event
.
register
(
'debuggingRequested'
,
(
hash
)
=>
{
// TODO should probably be in the run module
// TODO should probably be in the run module
if
(
!
self
.
_opts
.
appManager
.
isActive
(
'debugger'
))
self
.
_opts
.
appManager
.
activatePlugin
(
'debugger'
)
if
(
!
self
.
_opts
.
appManager
.
isActive
(
'debugger'
))
self
.
_opts
.
appManager
.
activatePlugin
(
'debugger'
)
...
...
src/app/ui/auto-complete-popup.js
View file @
9280d2c8
...
@@ -189,8 +189,8 @@ class AutoCompletePopup {
...
@@ -189,8 +189,8 @@ class AutoCompletePopup {
extendAutocompletion
()
{
extendAutocompletion
()
{
// TODO: this is not using the appManager interface. Terminal should be put as module
// TODO: this is not using the appManager interface. Terminal should be put as module
this
.
opts
.
appManager
.
event
.
on
(
'activate'
,
(
id
)
=>
{
this
.
opts
.
appManager
.
event
.
on
(
'activate'
,
async
(
id
)
=>
{
const
profile
=
this
.
opts
.
appManager
.
getPlugin
(
id
).
profile
const
profile
=
await
this
.
opts
.
appManager
.
getProfile
(
id
)
if
(
!
profile
.
methods
)
return
if
(
!
profile
.
methods
)
return
profile
.
methods
.
forEach
((
method
)
=>
{
profile
.
methods
.
forEach
((
method
)
=>
{
const
key
=
`remix.call({name: '
${
id
}
', key:'
${
method
}
', payload: []}).then((result) => { console.log(result) }).catch((error) => { console.log(error) })`
const
key
=
`remix.call({name: '
${
id
}
', key:'
${
method
}
', payload: []}).then((result) => { console.log(result) }).catch((error) => { console.log(error) })`
...
...
src/app/ui/txLogger.js
View file @
9280d2c8
...
@@ -125,8 +125,8 @@ class TxLogger {
...
@@ -125,8 +125,8 @@ class TxLogger {
}
}
return
false
return
false
}
}
this
.
eventsDecoder
=
globalRegistry
.
get
(
'eventsDecoder'
).
api
this
.
eventsDecoder
=
glob
l
alRegistry
.
get
(
'eventsDecoder'
).
api
this
.
txListener
=
glob
alRegistry
.
get
(
'txL
istener'
).
api
this
.
txListener
=
glob
lalRegistry
.
get
(
'txl
istener'
).
api
this
.
terminal
=
terminal
this
.
terminal
=
terminal
// dependencies
// dependencies
this
.
_deps
=
{
this
.
_deps
=
{
...
...
src/remixAppManager.js
View file @
9280d2c8
...
@@ -8,9 +8,9 @@ const requiredModules = [ // services + layout views + system views
...
@@ -8,9 +8,9 @@ const requiredModules = [ // services + layout views + system views
'mainPanel'
,
'hiddenPanel'
,
'sidePanel'
,
'menuicons'
,
'fileExplorers'
,
'mainPanel'
,
'hiddenPanel'
,
'sidePanel'
,
'menuicons'
,
'fileExplorers'
,
'terminal'
,
'settings'
,
'pluginManager'
]
'terminal'
,
'settings'
,
'pluginManager'
]
export
function
isNative
(
name
)
{
export
function
isNative
(
name
)
{
const
nativePlugins
=
[
'vyper'
,
'workshops'
,
'ethdoc'
,
'etherscan'
]
const
nativePlugins
=
[
'vyper'
,
'workshops'
,
'ethdoc'
,
'etherscan'
]
return
nativePlugins
.
includes
(
name
)
return
nativePlugins
.
includes
(
name
)
||
requiredModules
.
includes
(
name
)
}
}
export
class
RemixAppManager
extends
PluginManager
{
export
class
RemixAppManager
extends
PluginManager
{
...
...
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