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
e11423ff
Unverified
Commit
e11423ff
authored
Apr 09, 2019
by
yann300
Committed by
GitHub
Apr 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1836 from ethereum/swap_it_style_fixes_l
Swap it style fixes l
parents
6efb3f12
f6d6dc4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
remixd-handle.js
src/app/files/remixd-handle.js
+22
-2
section.js
src/app/ui/landing-page/section.js
+4
-2
remixAppManager.js
src/remixAppManager.js
+5
-0
No files found.
src/app/files/remixd-handle.js
View file @
e11423ff
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 +45,11 @@ export class RemixdHandle extends ApiFactory {
...
@@ -43,6 +45,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 +62,30 @@ export class RemixdHandle extends ApiFactory {
...
@@ -55,17 +62,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/app/ui/landing-page/section.js
View file @
e11423ff
...
@@ -7,6 +7,7 @@ var css = csjs`
...
@@ -7,6 +7,7 @@ var css = csjs`
font-weight: normal;
font-weight: normal;
max-width: 300px;
max-width: 300px;
user-select: none;
user-select: none;
padding-left: 14px;
}
}
.text:hover {
.text:hover {
font-weight: bold;
font-weight: bold;
...
@@ -16,6 +17,7 @@ var css = csjs`
...
@@ -16,6 +17,7 @@ var css = csjs`
font-weight: normal;
font-weight: normal;
text-decoration : none;
text-decoration : none;
user-select: none;
user-select: none;
padding-left: 14px;
}
}
.link:hover {
.link:hover {
font-weight: bold;
font-weight: bold;
...
@@ -40,7 +42,7 @@ class Section {
...
@@ -40,7 +42,7 @@ class Section {
if
(
this
.
actions
[
i
].
type
===
`callback`
)
{
if
(
this
.
actions
[
i
].
type
===
`callback`
)
{
sectionLook
.
appendChild
(
yo
`
sectionLook
.
appendChild
(
yo
`
<div>
<div>
<span class="
${
css
.
text
}
p-3
h6 text-dark" onclick=
${
this
.
actions
[
i
].
payload
}
>
<span class="
${
css
.
text
}
h6 text-dark" onclick=
${
this
.
actions
[
i
].
payload
}
>
${
this
.
actions
[
i
].
label
}
${
this
.
actions
[
i
].
label
}
</span>
</span>
</div>
</div>
...
@@ -48,7 +50,7 @@ class Section {
...
@@ -48,7 +50,7 @@ class Section {
}
else
if
(
this
.
actions
[
i
].
type
===
`link`
)
{
}
else
if
(
this
.
actions
[
i
].
type
===
`link`
)
{
sectionLook
.
appendChild
(
yo
`
sectionLook
.
appendChild
(
yo
`
<div >
<div >
<a class="
${
css
.
link
}
text-dark
p-3
h6 text-decoration-none" href=
${
this
.
actions
[
i
].
payload
}
target="_blank" >
<a class="
${
css
.
link
}
text-dark h6 text-decoration-none" href=
${
this
.
actions
[
i
].
payload
}
target="_blank" >
${
this
.
actions
[
i
].
label
}
${
this
.
actions
[
i
].
label
}
</a>
</a>
</div>
</div>
...
...
src/remixAppManager.js
View file @
e11423ff
...
@@ -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
...
...
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