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
e03258a1
Unverified
Commit
e03258a1
authored
Jul 25, 2021
by
David Zagi
Committed by
GitHub
Jul 25, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into remixd_terminal
parents
8c4fe582
d3626ccd
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
11 deletions
+35
-11
fileManager.js
apps/remix-ide/src/app/files/fileManager.js
+2
-3
remixDProvider.js
apps/remix-ide/src/app/files/remixDProvider.js
+1
-2
tab-proxy.js
apps/remix-ide/src/app/panels/tab-proxy.js
+0
-1
file-explorer.tsx
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
+1
-1
style.css
libs/remix-ui/solidity-compiler/src/lib/css/style.css
+0
-1
remixdClient.ts
libs/remixd/src/services/remixdClient.ts
+31
-3
No files found.
apps/remix-ide/src/app/files/fileManager.js
View file @
e03258a1
...
...
@@ -155,9 +155,9 @@ class FileManager extends Plugin {
* @param {string} path path of the directory
* @returns {boolean} true if path is a directory.
*/
isDirectory
(
path
)
{
async
isDirectory
(
path
)
{
const
provider
=
this
.
fileProviderOf
(
path
)
const
result
=
provider
.
isDirectory
(
path
)
const
result
=
await
provider
.
isDirectory
(
path
)
return
result
}
...
...
@@ -362,7 +362,6 @@ class FileManager extends Plugin {
path
=
this
.
limitPluginScope
(
path
)
await
this
.
_handleExists
(
path
,
`Cannot remove file or directory
${
path
}
`
)
const
provider
=
this
.
fileProviderOf
(
path
)
return
await
provider
.
remove
(
path
)
}
catch
(
e
)
{
throw
new
Error
(
e
)
...
...
apps/remix-ide/src/app/files/remixDProvider.js
View file @
e03258a1
...
...
@@ -38,7 +38,7 @@ module.exports = class RemixDProvider extends FileProvider {
})
this
.
_appManager
.
on
(
'remixd'
,
'fileRenamed'
,
(
oldPath
,
newPath
)
=>
{
this
.
event
.
emit
(
'fileRe
mov
ed'
,
oldPath
,
newPath
)
this
.
event
.
emit
(
'fileRe
nam
ed'
,
oldPath
,
newPath
)
})
this
.
_appManager
.
on
(
'remixd'
,
'rootFolderChanged'
,
()
=>
{
...
...
@@ -141,7 +141,6 @@ module.exports = class RemixDProvider extends FileProvider {
this
.
_appManager
.
call
(
'remixd'
,
'remove'
,
{
path
:
unprefixedpath
})
.
then
(
result
=>
{
const
path
=
unprefixedpath
delete
this
.
filesContent
[
path
]
resolve
(
true
)
this
.
init
()
...
...
apps/remix-ide/src/app/panels/tab-proxy.js
View file @
e03258a1
...
...
@@ -44,7 +44,6 @@ export class TabProxy extends Plugin {
fileManager
.
events
.
on
(
'fileRemoved'
,
(
name
)
=>
{
const
workspace
=
this
.
fileManager
.
currentWorkspace
()
workspace
?
this
.
removeTab
(
workspace
+
'/'
+
name
)
:
this
.
removeTab
(
this
.
fileManager
.
mode
+
'/'
+
name
)
})
...
...
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
View file @
e03258a1
...
...
@@ -408,7 +408,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
try
{
await
fileManager
.
remove
(
p
)
}
catch
(
e
)
{
const
isDir
=
state
.
fileManager
.
isDirectory
(
p
)
const
isDir
=
await
state
.
fileManager
.
isDirectory
(
p
)
toast
(
`Failed to remove
${
isDir
?
'folder'
:
'file'
}
${
p
}
.`
)
}
}
...
...
libs/remix-ui/solidity-compiler/src/lib/css/style.css
View file @
e03258a1
...
...
@@ -103,7 +103,6 @@
}
.remixui_container
{
margin
:
0
;
margin-bottom
:
2%
;
}
.remixui_optimizeContainer
{
display
:
flex
;
...
...
libs/remixd/src/services/remixdClient.ts
View file @
e03258a1
...
...
@@ -180,12 +180,34 @@ export class RemixdClient extends PluginClient {
if
(
!
fs
.
existsSync
(
path
))
return
reject
(
new
Error
(
'File not found '
+
path
))
if
(
!
isRealPath
(
path
))
return
// Saving the content of the item{folder} before removing it
const
ls
=
[]
try
{
const
resolveList
=
(
path
)
=>
{
if
(
!
this
.
_isFile
(
path
))
{
const
list
=
utils
.
resolveDirectory
(
path
,
this
.
currentSharedFolder
)
Object
.
keys
(
list
).
forEach
(
itemPath
=>
{
if
(
list
[
itemPath
].
isDirectory
)
{
resolveList
(
`
${
this
.
currentSharedFolder
}
/
${
itemPath
}
`
)
}
ls
.
push
(
itemPath
)
})
}
}
resolveList
(
path
)
ls
.
push
(
args
.
path
)
}
catch
(
e
)
{
throw
new
Error
(
e
)
}
return
fs
.
remove
(
path
,
(
error
:
Error
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
return
reject
(
new
Error
(
'Failed to remove file/directory: '
+
error
))
}
this
.
emit
(
'fileRemoved'
,
args
.
path
)
for
(
const
file
in
ls
)
{
this
.
emit
(
'fileRemoved'
,
ls
[
file
])
}
resolve
(
true
)
})
})
...
...
@@ -194,10 +216,17 @@ export class RemixdClient extends PluginClient {
}
}
_isFile
(
path
:
string
):
boolean
{
try
{
return
fs
.
statSync
(
path
).
isFile
()
}
catch
(
error
)
{
throw
new
Error
(
error
)
}
}
isDirectory
(
args
:
SharedFolderArgs
):
boolean
{
try
{
const
path
=
utils
.
absolutePath
(
args
.
path
,
this
.
currentSharedFolder
)
return
fs
.
statSync
(
path
).
isDirectory
()
}
catch
(
error
)
{
throw
new
Error
(
error
)
...
...
@@ -207,7 +236,6 @@ export class RemixdClient extends PluginClient {
isFile
(
args
:
SharedFolderArgs
):
boolean
{
try
{
const
path
=
utils
.
absolutePath
(
args
.
path
,
this
.
currentSharedFolder
)
return
fs
.
statSync
(
path
).
isFile
()
}
catch
(
error
)
{
throw
new
Error
(
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