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
9d0efcec
Commit
9d0efcec
authored
May 19, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some event definitions
parent
c6e58bf9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
file-panel.js
apps/remix-ide/src/app/panels/file-panel.js
+0
-1
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+1
-1
fileSystem.ts
libs/remix-ui/file-explorer/src/lib/actions/fileSystem.ts
+8
-8
No files found.
apps/remix-ide/src/app/panels/file-panel.js
View file @
9d0efcec
...
@@ -47,7 +47,6 @@ const profile = {
...
@@ -47,7 +47,6 @@ const profile = {
module
.
exports
=
class
Filepanel
extends
ViewPlugin
{
module
.
exports
=
class
Filepanel
extends
ViewPlugin
{
constructor
(
appManager
)
{
constructor
(
appManager
)
{
super
(
profile
)
super
(
profile
)
this
.
event
=
new
EventEmitter
()
this
.
_components
=
{}
this
.
_components
=
{}
this
.
_components
.
registry
=
globalRegistry
this
.
_components
.
registry
=
globalRegistry
this
.
_deps
=
{
this
.
_deps
=
{
...
...
apps/remix-ide/src/app/tabs/test-tab.js
View file @
9d0efcec
...
@@ -52,7 +52,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -52,7 +52,7 @@ module.exports = class TestTab extends ViewPlugin {
}
}
listenToEvents
()
{
listenToEvents
()
{
this
.
filePanel
.
event
.
register
(
'newTestFileCreated'
,
file
=>
{
this
.
on
(
'filePanel'
,
'newTestFileCreated'
,
file
=>
{
var
testList
=
this
.
_view
.
el
.
querySelector
(
"[class^='testList']"
)
var
testList
=
this
.
_view
.
el
.
querySelector
(
"[class^='testList']"
)
var
test
=
this
.
createSingleTest
(
file
)
var
test
=
this
.
createSingleTest
(
file
)
testList
.
appendChild
(
test
)
testList
.
appendChild
(
test
)
...
...
libs/remix-ui/file-explorer/src/lib/actions/fileSystem.ts
View file @
9d0efcec
...
@@ -181,35 +181,35 @@ export const fileRenamedSuccess = (path: string, removePath: string, files) => {
...
@@ -181,35 +181,35 @@ export const fileRenamedSuccess = (path: string, removePath: string, files) => {
export
const
init
=
(
provider
,
workspaceName
:
string
,
plugin
,
registry
)
=>
(
dispatch
:
React
.
Dispatch
<
any
>
)
=>
{
export
const
init
=
(
provider
,
workspaceName
:
string
,
plugin
,
registry
)
=>
(
dispatch
:
React
.
Dispatch
<
any
>
)
=>
{
if
(
provider
)
{
if
(
provider
)
{
provider
.
event
.
register
(
'fileAdded'
,
async
(
filePath
)
=>
{
provider
.
event
.
on
(
'fileAdded'
,
async
(
filePath
)
=>
{
if
(
extractParentFromKey
(
filePath
)
===
'/.workspaces'
)
return
if
(
extractParentFromKey
(
filePath
)
===
'/.workspaces'
)
return
const
path
=
extractParentFromKey
(
filePath
)
||
provider
.
workspace
||
provider
.
type
||
''
const
path
=
extractParentFromKey
(
filePath
)
||
provider
.
workspace
||
provider
.
type
||
''
const
data
=
await
fetchDirectoryContent
(
provider
,
path
)
const
data
=
await
fetchDirectoryContent
(
provider
,
path
)
dispatch
(
fileAddedSuccess
(
path
,
data
))
dispatch
(
fileAddedSuccess
(
path
,
data
))
if
(
filePath
.
includes
(
'_test.sol'
))
{
if
(
filePath
.
includes
(
'_test.sol'
))
{
plugin
.
e
vent
.
trigger
(
'newTestFileCreated'
,
[
filePath
]
)
plugin
.
e
mit
(
'newTestFileCreated'
,
filePath
)
}
}
})
})
provider
.
event
.
register
(
'folderAdded'
,
async
(
folderPath
)
=>
{
provider
.
event
.
on
(
'folderAdded'
,
async
(
folderPath
)
=>
{
if
(
extractParentFromKey
(
folderPath
)
===
'/.workspaces'
)
return
if
(
extractParentFromKey
(
folderPath
)
===
'/.workspaces'
)
return
const
path
=
extractParentFromKey
(
folderPath
)
||
provider
.
workspace
||
provider
.
type
||
''
const
path
=
extractParentFromKey
(
folderPath
)
||
provider
.
workspace
||
provider
.
type
||
''
const
data
=
await
fetchDirectoryContent
(
provider
,
path
)
const
data
=
await
fetchDirectoryContent
(
provider
,
path
)
dispatch
(
folderAddedSuccess
(
path
,
data
))
dispatch
(
folderAddedSuccess
(
path
,
data
))
})
})
provider
.
event
.
register
(
'fileRemoved'
,
async
(
removePath
)
=>
{
provider
.
event
.
on
(
'fileRemoved'
,
async
(
removePath
)
=>
{
const
path
=
extractParentFromKey
(
removePath
)
||
provider
.
workspace
||
provider
.
type
||
''
const
path
=
extractParentFromKey
(
removePath
)
||
provider
.
workspace
||
provider
.
type
||
''
dispatch
(
fileRemovedSuccess
(
path
,
removePath
))
dispatch
(
fileRemovedSuccess
(
path
,
removePath
))
})
})
provider
.
event
.
register
(
'fileRenamed'
,
async
(
oldPath
)
=>
{
provider
.
event
.
on
(
'fileRenamed'
,
async
(
oldPath
)
=>
{
const
path
=
extractParentFromKey
(
oldPath
)
||
provider
.
workspace
||
provider
.
type
||
''
const
path
=
extractParentFromKey
(
oldPath
)
||
provider
.
workspace
||
provider
.
type
||
''
const
data
=
await
fetchDirectoryContent
(
provider
,
path
)
const
data
=
await
fetchDirectoryContent
(
provider
,
path
)
dispatch
(
fileRenamedSuccess
(
path
,
oldPath
,
data
))
dispatch
(
fileRenamedSuccess
(
path
,
oldPath
,
data
))
})
})
provider
.
event
.
register
(
'fileExternallyChanged'
,
async
(
path
:
string
,
file
:
{
content
:
string
})
=>
{
provider
.
event
.
on
(
'fileExternallyChanged'
,
async
(
path
:
string
,
file
:
{
content
:
string
})
=>
{
const
config
=
registry
.
get
(
'config'
).
api
const
config
=
registry
.
get
(
'config'
).
api
const
editor
=
registry
.
get
(
'editor'
).
api
const
editor
=
registry
.
get
(
'editor'
).
api
...
@@ -225,10 +225,10 @@ export const init = (provider, workspaceName: string, plugin, registry) => (disp
...
@@ -225,10 +225,10 @@ export const init = (provider, workspaceName: string, plugin, registry) => (disp
))
))
}
}
})
})
provider
.
event
.
register
(
'fileRenamedError'
,
async
()
=>
{
provider
.
event
.
on
(
'fileRenamedError'
,
async
()
=>
{
dispatch
(
displayNotification
(
'File Renamed Failed'
,
''
,
'Ok'
,
'Cancel'
))
dispatch
(
displayNotification
(
'File Renamed Failed'
,
''
,
'Ok'
,
'Cancel'
))
})
})
provider
.
event
.
register
(
'rootFolderChanged'
,
async
()
=>
{
provider
.
event
.
on
(
'rootFolderChanged'
,
async
()
=>
{
workspaceName
=
provider
.
workspace
||
provider
.
type
||
''
workspaceName
=
provider
.
workspace
||
provider
.
type
||
''
fetchDirectory
(
provider
,
workspaceName
)(
dispatch
)
fetchDirectory
(
provider
,
workspaceName
)(
dispatch
)
})
})
...
...
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