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
b5f9f912
Commit
b5f9f912
authored
Jul 21, 2021
by
lianahus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sending info about folder content
parent
5ba2e3f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
32 deletions
+22
-32
fileManager.js
apps/remix-ide/src/app/files/fileManager.js
+0
-17
fileProvider.js
apps/remix-ide/src/app/files/fileProvider.js
+0
-3
remixDProvider.js
apps/remix-ide/src/app/files/remixDProvider.js
+0
-1
tab-proxy.js
apps/remix-ide/src/app/panels/tab-proxy.js
+0
-2
style.css
libs/remix-ui/solidity-compiler/src/lib/css/style.css
+0
-1
remixdClient.ts
libs/remixd/src/services/remixdClient.ts
+22
-8
No files found.
apps/remix-ide/src/app/files/fileManager.js
View file @
b5f9f912
...
...
@@ -360,11 +360,8 @@ class FileManager extends Plugin {
async
remove
(
path
)
{
try
{
path
=
this
.
limitPluginScope
(
path
)
console
.
log
(
'remove fileManager,js '
,
path
)
await
this
.
_handleExists
(
path
,
`Cannot remove file or directory
${
path
}
`
)
const
provider
=
this
.
fileProviderOf
(
path
)
// this.emit('folderRemoved', path)
return
await
provider
.
remove
(
path
)
}
catch
(
e
)
{
throw
new
Error
(
e
)
...
...
@@ -385,7 +382,6 @@ class FileManager extends Plugin {
this
.
_deps
.
browserExplorer
.
event
.
on
(
'fileRemoved'
,
(
path
)
=>
{
this
.
fileRemovedEvent
(
path
)
})
this
.
_deps
.
browserExplorer
.
event
.
on
(
'fileAdded'
,
(
path
)
=>
{
this
.
fileAddedEvent
(
path
)
})
this
.
_deps
.
localhostExplorer
.
event
.
on
(
'fileRemoved'
,
(
path
)
=>
{
this
.
fileRemovedEvent
(
path
)
})
this
.
_deps
.
localhostExplorer
.
event
.
on
(
'folderRemoved'
,
(
path
)
=>
{
this
.
removeTabsOfPath
(
path
)
})
this
.
_deps
.
localhostExplorer
.
event
.
on
(
'errored'
,
(
event
)
=>
{
this
.
removeTabsOf
(
this
.
_deps
.
localhostExplorer
)
})
this
.
_deps
.
localhostExplorer
.
event
.
on
(
'closed'
,
(
event
)
=>
{
this
.
removeTabsOf
(
this
.
_deps
.
localhostExplorer
)
})
this
.
_deps
.
workspaceExplorer
.
event
.
on
(
'fileChanged'
,
(
path
)
=>
{
this
.
fileChangedEvent
(
path
)
})
...
...
@@ -550,19 +546,6 @@ class FileManager extends Plugin {
}
}
removeTabsOfPath
(
path
)
{
for
(
const
tab
in
this
.
openedFiles
)
{
if
(
tab
.
substring
(
0
,
path
.
length
)
===
path
)
{
console
.
log
(
'removeTabsOfPath '
,
path
)
if
(
path
===
this
.
_deps
.
config
.
get
(
'currentFile'
))
{
this
.
_deps
.
config
.
set
(
'currentFile'
,
''
)
}
this
.
editor
.
discard
(
path
)
delete
this
.
openedFiles
[
path
]
}
}
}
fileRemovedEvent
(
path
)
{
if
(
path
===
this
.
_deps
.
config
.
get
(
'currentFile'
))
{
this
.
_deps
.
config
.
set
(
'currentFile'
,
''
)
...
...
apps/remix-ide/src/app/files/fileProvider.js
View file @
b5f9f912
...
...
@@ -185,7 +185,6 @@ class FileProvider {
window
.
remixFileSystem
.
rmdirSync
(
path
,
console
.
log
)
}
this
.
event
.
emit
(
'fileRemoved'
,
this
.
_normalizePath
(
path
))
console
.
log
(
'file provider remove remove '
,
path
)
}
}
catch
(
e
)
{
console
.
log
(
e
)
...
...
@@ -251,8 +250,6 @@ class FileProvider {
if
(
window
.
remixFileSystem
.
existsSync
(
path
)
&&
!
window
.
remixFileSystem
.
statSync
(
path
).
isDirectory
())
{
window
.
remixFileSystem
.
unlinkSync
(
path
,
console
.
log
)
this
.
event
.
emit
(
'fileRemoved'
,
this
.
_normalizePath
(
path
))
console
.
log
(
'file provider removefile remove '
,
path
)
return
true
}
else
return
false
}
...
...
apps/remix-ide/src/app/files/remixDProvider.js
View file @
b5f9f912
...
...
@@ -35,7 +35,6 @@ module.exports = class RemixDProvider extends FileProvider {
this
.
_appManager
.
on
(
'remixd'
,
'fileRemoved'
,
(
path
)
=>
{
this
.
event
.
emit
(
'fileRemoved'
,
path
)
console
.
log
(
'remixd appmanager listener remove '
,
path
)
})
this
.
_appManager
.
on
(
'remixd'
,
'fileRenamed'
,
(
oldPath
,
newPath
)
=>
{
...
...
apps/remix-ide/src/app/panels/tab-proxy.js
View file @
b5f9f912
...
...
@@ -44,8 +44,6 @@ export class TabProxy extends Plugin {
fileManager
.
events
.
on
(
'fileRemoved'
,
(
name
)
=>
{
const
workspace
=
this
.
fileManager
.
currentWorkspace
()
console
.
log
(
'wotk= '
,
workspace
)
console
.
log
(
'mode= '
,
this
.
fileManager
.
mode
)
workspace
?
this
.
removeTab
(
workspace
+
'/'
+
name
)
:
this
.
removeTab
(
this
.
fileManager
.
mode
+
'/'
+
name
)
})
...
...
libs/remix-ui/solidity-compiler/src/lib/css/style.css
View file @
b5f9f912
...
...
@@ -103,7 +103,6 @@
}
.remixui_container
{
margin
:
0
;
margin-bottom
:
2%
;
}
.remixui_optimizeContainer
{
display
:
flex
;
...
...
libs/remixd/src/services/remixdClient.ts
View file @
b5f9f912
...
...
@@ -180,19 +180,34 @@ export class RemixdClient extends PluginClient {
if
(
!
fs
.
existsSync
(
path
))
return
reject
(
new
Error
(
'File not found '
+
path
))
if
(
!
isRealPath
(
path
))
return
if
(
this
.
_isFile
(
path
))
{
this
.
emit
(
'fileRemoved'
,
path
)
console
.
log
(
'isfile '
,
path
)
}
else
{
this
.
emit
(
'folderRemoved'
,
path
)
console
.
log
(
'isFolder '
,
path
)
// 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
))
}
for
(
const
file
in
ls
)
{
this
.
emit
(
'fileRemoved'
,
ls
[
file
])
}
resolve
(
true
)
})
})
...
...
@@ -203,7 +218,6 @@ export class RemixdClient extends PluginClient {
_isFile
(
path
:
string
):
boolean
{
try
{
console
.
log
(
'isfile inside '
,
path
)
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