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
a4e24d22
Commit
a4e24d22
authored
Sep 19, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if we are in electron, don't display remixd modal
parent
6af8b258
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
remixd-handle.js
src/app/files/remixd-handle.js
+18
-13
No files found.
src/app/files/remixd-handle.js
View file @
a4e24d22
import
isElectron
from
'is-electron'
import
{
Plugin
}
from
'@remixproject/engine'
import
*
as
packageJson
from
'../../../package.json'
var
yo
=
require
(
'yo-yo'
)
...
...
@@ -55,28 +56,30 @@ export class RemixdHandle extends Plugin {
* @param {String} txHash - hash of the transaction
*/
connectToLocalhost
()
{
let
connection
=
(
error
)
=>
{
if
(
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
{
this
.
fileSystemExplorer
.
ensureRoot
()
}
}
if
(
this
.
locahostProvider
.
isConnected
())
{
this
.
locahostProvider
.
close
((
error
)
=>
{
if
(
error
)
console
.
log
(
error
)
})
}
else
{
}
else
if
(
!
isElectron
())
{
// warn the user only if he/she is in the browser context
modalDialog
(
'Connect to localhost'
,
remixdDialog
(),
{
label
:
'Connect'
,
fn
:
()
=>
{
this
.
locahostProvider
.
init
((
error
)
=>
{
if
(
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
{
this
.
fileSystemExplorer
.
ensureRoot
()
}
})
this
.
locahostProvider
.
init
((
error
)
=>
connection
(
error
))
}
},
{
label
:
'Cancel'
,
...
...
@@ -85,6 +88,8 @@ export class RemixdHandle extends Plugin {
}
}
)
}
else
{
this
.
locahostProvider
.
init
((
error
)
=>
connection
(
error
))
}
}
}
...
...
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