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
a74ef78a
Unverified
Commit
a74ef78a
authored
Nov 02, 2021
by
David Disu
Committed by
GitHub
Nov 02, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1720 from ethereum/fix-workspace
Fix broken workspace UI
parents
e61d08f5
2363841f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
fileManager.js
apps/remix-ide/src/app/files/fileManager.js
+1
-1
workspaceFileProvider.js
apps/remix-ide/src/app/files/workspaceFileProvider.js
+7
-1
workspace.ts
libs/remix-ui/workspace/src/lib/reducers/workspace.ts
+2
-1
No files found.
apps/remix-ide/src/app/files/fileManager.js
View file @
a74ef78a
...
...
@@ -140,7 +140,7 @@ class FileManager extends Plugin {
refresh
()
{
const
provider
=
this
.
fileProviderOf
(
'/'
)
// emit rootFolderChanged so that File Explorer reloads the file tree
provider
.
event
.
emit
(
'rootFolderChanged'
)
provider
.
event
.
emit
(
'rootFolderChanged'
,
provider
.
workspace
||
'/'
)
}
/**
...
...
apps/remix-ide/src/app/files/workspaceFileProvider.js
View file @
a74ef78a
...
...
@@ -33,7 +33,13 @@ class WorkspaceFileProvider extends FileProvider {
removePrefix
(
path
)
{
path
=
path
.
replace
(
/^
\/
|
\/
$/g
,
''
)
// remove first and last slash
if
(
path
.
startsWith
(
this
.
workspacesPath
+
'/'
+
this
.
workspace
))
return
path
if
(
path
.
startsWith
(
this
.
workspace
))
return
path
.
replace
(
this
.
workspace
,
this
.
workspacesPath
+
'/'
+
this
.
workspace
)
const
splitPath
=
path
.
split
(
'/'
)
if
(
splitPath
[
0
]
===
this
.
workspace
)
{
splitPath
[
0
]
=
this
.
workspacesPath
+
'/'
+
this
.
workspace
path
=
splitPath
.
join
(
'/'
)
return
path
}
path
=
super
.
removePrefix
(
path
)
let
ret
=
this
.
workspacesPath
+
'/'
+
this
.
workspace
+
'/'
+
(
path
===
'/'
?
''
:
path
)
...
...
libs/remix-ui/workspace/src/lib/reducers/workspace.ts
View file @
a74ef78a
...
...
@@ -231,7 +231,8 @@ export const browserReducer = (state = browserInitialState, action: Action) => {
files
:
state
.
mode
===
'localhost'
?
fetchWorkspaceDirectoryContent
(
state
,
payload
)
:
state
.
localhost
.
files
,
isRequestingWorkspace
:
false
,
isSuccessfulWorkspace
:
true
,
error
:
null
error
:
null
,
sharedFolder
:
null
}
}
}
...
...
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