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
f4ea0d0f
Commit
f4ea0d0f
authored
Apr 09, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deactivate remixd plugin if canceled or error
parent
43d90dc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
remixd-handle.js
src/app/files/remixd-handle.js
+23
-2
remixAppManager.js
src/remixAppManager.js
+7
-1
No files found.
src/app/files/remixd-handle.js
View file @
f4ea0d0f
import
{
ApiFactory
}
from
'remix-plugin'
import
{
ApiFactory
}
from
'remix-plugin'
let
globalRegistry
=
require
(
'../../global/registry'
)
var
yo
=
require
(
'yo-yo'
)
var
yo
=
require
(
'yo-yo'
)
var
modalDialog
=
require
(
'../ui/modaldialog'
)
var
modalDialog
=
require
(
'../ui/modaldialog'
)
var
modalDialogCustom
=
require
(
'../ui/modal-dialog-custom'
)
var
csjs
=
require
(
'csjs-inject'
)
var
csjs
=
require
(
'csjs-inject'
)
...
@@ -43,6 +46,11 @@ export class RemixdHandle extends ApiFactory {
...
@@ -43,6 +46,11 @@ export class RemixdHandle extends ApiFactory {
this
.
connectToLocalhost
()
this
.
connectToLocalhost
()
}
}
canceled
()
{
let
appManager
=
globalRegistry
.
get
(
'appmanager'
).
api
appManager
.
ensureDeactivated
(
'remixd'
)
}
/**
/**
* connect to localhost if no connection and render the explorer
* connect to localhost if no connection and render the explorer
* disconnect from localhost if connected and remove the explorer
* disconnect from localhost if connected and remove the explorer
...
@@ -55,17 +63,30 @@ export class RemixdHandle extends ApiFactory {
...
@@ -55,17 +63,30 @@ export class RemixdHandle extends ApiFactory {
if
(
error
)
console
.
log
(
error
)
if
(
error
)
console
.
log
(
error
)
})
})
}
else
{
}
else
{
modalDialog
(
'Connect to localhost'
,
remixdDialog
(),
modalDialog
(
'Connect to localhost'
,
remixdDialog
(),
{
label
:
'Connect'
,
{
label
:
'Connect'
,
fn
:
()
=>
{
fn
:
()
=>
{
this
.
locahostProvider
.
init
((
error
)
=>
{
this
.
locahostProvider
.
init
((
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
modalDialogCustom
.
alert
(
'Cannot connect to the remixd daemon.'
+
'Please make sure you have the remixd running in the background.'
)
this
.
canceled
()
}
else
{
}
else
{
this
.
fileSystemExplorer
.
ensureRoot
()
this
.
fileSystemExplorer
.
ensureRoot
()
}
}
})
})
}}
}
},
{
label
:
'Cancel'
,
fn
:
()
=>
{
this
.
canceled
()
}
}
)
)
}
}
}
}
...
...
src/remixAppManager.js
View file @
f4ea0d0f
...
@@ -21,6 +21,11 @@ export class RemixAppManager extends AppManagerApi {
...
@@ -21,6 +21,11 @@ export class RemixAppManager extends AppManagerApi {
this
.
event
.
emit
(
'ensureActivated'
,
apiName
)
this
.
event
.
emit
(
'ensureActivated'
,
apiName
)
}
}
ensureDeactivated
(
apiName
)
{
if
(
this
.
store
.
isActive
(
apiName
))
this
.
deactivateOne
(
apiName
)
this
.
event
.
emit
(
'ensureDeactivated'
,
apiName
)
}
proxy
()
{
proxy
()
{
// that's temporary. should be removed when we can have proper notification registration
// that's temporary. should be removed when we can have proper notification registration
return
this
.
data
.
proxy
return
this
.
data
.
proxy
...
@@ -82,4 +87,4 @@ export class RemixAppManager extends AppManagerApi {
...
@@ -82,4 +87,4 @@ export class RemixAppManager extends AppManagerApi {
new
Plugin
(
vyper
)
new
Plugin
(
vyper
)
]
]
}
}
}
}
\ No newline at end of file
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