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
cb673996
Unverified
Commit
cb673996
authored
Mar 10, 2021
by
yann300
Committed by
GitHub
Mar 10, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #949 from ethereum/fix-remixd
Added loader for localhost
parents
6aec15b5
da381b1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
17 deletions
+31
-17
remixDProvider.js
apps/remix-ide/src/app/files/remixDProvider.js
+1
-1
remixd-handle.js
apps/remix-ide/src/app/files/remixd-handle.js
+1
-0
remix-ui-workspace.tsx
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
+29
-16
No files found.
apps/remix-ide/src/app/files/remixDProvider.js
View file @
cb673996
...
@@ -58,7 +58,7 @@ module.exports = class RemixDProvider {
...
@@ -58,7 +58,7 @@ module.exports = class RemixDProvider {
}
}
preInit
()
{
preInit
()
{
this
.
_registerEvent
(
)
this
.
event
.
trigger
(
'loading'
)
}
}
init
(
cb
)
{
init
(
cb
)
{
...
...
apps/remix-ide/src/app/files/remixd-handle.js
View file @
cb673996
...
@@ -95,6 +95,7 @@ export class RemixdHandle extends WebsocketPlugin {
...
@@ -95,6 +95,7 @@ export class RemixdHandle extends WebsocketPlugin {
label
:
'Connect'
,
label
:
'Connect'
,
fn
:
()
=>
{
fn
:
()
=>
{
try
{
try
{
this
.
locahostProvider
.
preInit
()
super
.
activate
()
super
.
activate
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
!
this
.
socket
||
(
this
.
socket
&&
this
.
socket
.
readyState
===
3
))
{
// 3 means connection closed
if
(
!
this
.
socket
||
(
this
.
socket
&&
this
.
socket
.
readyState
===
3
))
{
// 3 means connection closed
...
...
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
View file @
cb673996
...
@@ -91,6 +91,10 @@ export const Workspace = (props: WorkspaceProps) => {
...
@@ -91,6 +91,10 @@ export const Workspace = (props: WorkspaceProps) => {
setWorkspace
(
props
.
workspaces
.
length
>
0
?
props
.
workspaces
[
0
]
:
NO_WORKSPACE
)
setWorkspace
(
props
.
workspaces
.
length
>
0
?
props
.
workspaces
[
0
]
:
NO_WORKSPACE
)
})
})
props
.
localhost
.
event
.
register
(
'loading'
,
()
=>
{
remixdExplorer
.
loading
()
})
if
(
props
.
initialWorkspace
)
{
if
(
props
.
initialWorkspace
)
{
props
.
workspace
.
setWorkspace
(
props
.
initialWorkspace
)
props
.
workspace
.
setWorkspace
(
props
.
initialWorkspace
)
setState
(
prevState
=>
{
setState
(
prevState
=>
{
...
@@ -120,7 +124,8 @@ export const Workspace = (props: WorkspaceProps) => {
...
@@ -120,7 +124,8 @@ export const Workspace = (props: WorkspaceProps) => {
fn
:
()
=>
{}
fn
:
()
=>
{}
},
},
handleHide
:
null
handleHide
:
null
}
},
loadingLocalhost
:
false
})
})
/* workspace creation, renaming and deletion */
/* workspace creation, renaming and deletion */
...
@@ -231,13 +236,18 @@ export const Workspace = (props: WorkspaceProps) => {
...
@@ -231,13 +236,18 @@ export const Workspace = (props: WorkspaceProps) => {
if
(
state
.
currentWorkspace
===
LOCALHOST
)
setWorkspace
(
NO_WORKSPACE
)
if
(
state
.
currentWorkspace
===
LOCALHOST
)
setWorkspace
(
NO_WORKSPACE
)
props
.
fileManager
.
setMode
(
'browser'
)
props
.
fileManager
.
setMode
(
'browser'
)
setState
(
prevState
=>
{
setState
(
prevState
=>
{
return
{
...
prevState
,
hideRemixdExplorer
:
true
}
return
{
...
prevState
,
hideRemixdExplorer
:
true
,
loadingLocalhost
:
false
}
})
})
},
},
show
:
()
=>
{
show
:
()
=>
{
props
.
fileManager
.
setMode
(
'localhost'
)
props
.
fileManager
.
setMode
(
'localhost'
)
setState
(
prevState
=>
{
setState
(
prevState
=>
{
return
{
...
prevState
,
hideRemixdExplorer
:
false
}
return
{
...
prevState
,
hideRemixdExplorer
:
false
,
loadingLocalhost
:
false
}
})
},
loading
:
()
=>
{
setState
(
prevState
=>
{
return
{
...
prevState
,
loadingLocalhost
:
true
}
})
})
}
}
}
}
...
@@ -372,19 +382,22 @@ export const Workspace = (props: WorkspaceProps) => {
...
@@ -372,19 +382,22 @@ export const Workspace = (props: WorkspaceProps) => {
/>
/>
}
}
</
div
>
</
div
>
<
div
className=
'pl-2 filesystemexplorer remixui_treeview'
>
{
{
!
state
.
hideRemixdExplorer
&&
state
.
loadingLocalhost
?
<
div
className=
"text-center py-5"
><
i
className=
"fas fa-spinner fa-pulse fa-2x"
></
i
></
div
>
<
FileExplorer
:
<
div
className=
'pl-2 filesystemexplorer remixui_treeview'
>
name=
'localhost'
{
!
state
.
hideRemixdExplorer
&&
registry=
{
props
.
registry
}
<
FileExplorer
filesProvider=
{
props
.
localhost
}
name=
'localhost'
menuItems=
{
[
'createNewFile'
,
'createNewFolder'
]
}
registry=
{
props
.
registry
}
plugin=
{
props
.
plugin
}
filesProvider=
{
props
.
localhost
}
focusRoot=
{
state
.
reset
}
menuItems=
{
[
'createNewFile'
,
'createNewFolder'
]
}
contextMenuItems=
{
props
.
registeredMenuItems
}
plugin=
{
props
.
plugin
}
/>
focusRoot=
{
state
.
reset
}
}
contextMenuItems=
{
props
.
registeredMenuItems
}
</
div
>
/>
}
</
div
>
}
<
div
className=
'pl-2 remixui_treeview'
>
<
div
className=
'pl-2 remixui_treeview'
>
{
false
&&
<
FileExplorer
{
false
&&
<
FileExplorer
name=
'browser'
name=
'browser'
...
...
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