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
99196493
Commit
99196493
authored
Feb 25, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rearangement
parent
3bd07e9a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
9 deletions
+28
-9
file-panel.js
apps/remix-ide/src/app/panels/file-panel.js
+28
-9
remix-ui-workspace.tsx
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
+0
-0
No files found.
apps/remix-ide/src/app/panels/file-panel.js
View file @
99196493
...
@@ -58,14 +58,23 @@ module.exports = class Filepanel extends ViewPlugin {
...
@@ -58,14 +58,23 @@ module.exports = class Filepanel extends ViewPlugin {
this
.
remixdHandle
=
new
RemixdHandle
(
this
.
remixdExplorer
,
this
.
_deps
.
fileProviders
.
localhost
,
appManager
)
this
.
remixdHandle
=
new
RemixdHandle
(
this
.
remixdExplorer
,
this
.
_deps
.
fileProviders
.
localhost
,
appManager
)
this
.
gitHandle
=
new
GitHandle
()
this
.
gitHandle
=
new
GitHandle
()
this
.
registeredMenuItems
=
[]
this
.
request
=
{}
this
.
request
=
{}
this
.
renderComponent
()
}
render
()
{
return
this
.
el
}
renderComponent
()
{
ReactDOM
.
render
(
ReactDOM
.
render
(
<
Workspace
<
Workspace
setWorkspace
=
{
this
.
setWorkspace
.
bind
(
this
)}
setWorkspace
=
{
this
.
setWorkspace
.
bind
(
this
)}
renameWorkspace
=
{
this
.
renameWorkspace
.
bind
(
this
)}
workspaceRenamed
=
{
this
.
workspaceRenamed
.
bind
(
this
)}
deleteWorkspace
=
{
this
.
deleteWorkspace
.
bind
(
this
)}
workspaceDeleted
=
{
this
.
workspaceDeleted
.
bind
(
this
)}
createWorkspace
=
{
this
.
createWorkspace
.
bind
(
this
)}
workspaceCreated
=
{
this
.
workspaceCreated
.
bind
(
this
)}
workspace
=
{
this
.
_deps
.
fileProviders
.
workspace
}
workspace
=
{
this
.
_deps
.
fileProviders
.
workspace
}
browser
=
{
this
.
_deps
.
fileProviders
.
browser
}
browser
=
{
this
.
_deps
.
fileProviders
.
browser
}
localhost
=
{
this
.
_deps
.
fileProviders
.
localhost
}
localhost
=
{
this
.
_deps
.
fileProviders
.
localhost
}
...
@@ -76,12 +85,22 @@ module.exports = class Filepanel extends ViewPlugin {
...
@@ -76,12 +85,22 @@ module.exports = class Filepanel extends ViewPlugin {
registry
=
{
this
.
_components
.
registry
}
registry
=
{
this
.
_components
.
registry
}
plugin
=
{
this
}
plugin
=
{
this
}
request
=
{
this
.
request
}
request
=
{
this
.
request
}
registeredMenuItems
=
{
this
.
registeredMenuItems
}
/
>
/
>
,
this
.
el
)
,
this
.
el
)
}
}
render
()
{
/**
return
this
.
el
* @param item { id: string, name: string, type?: string[], path?: string[], extension?: string[], pattern?: string[] }
* @param callback (...args) => void
*/
registerContextMenuItem
(
item
)
{
if
(
!
item
)
throw
new
Error
(
'Invalid register context menu argument'
)
if
(
!
item
.
name
||
!
item
.
id
)
throw
new
Error
(
'Item name and id is mandatory'
)
if
(
!
item
.
type
&&
!
item
.
path
&&
!
item
.
extension
&&
!
item
.
pattern
)
throw
new
Error
(
'Invalid file matching criteria provided'
)
this
.
registeredMenuItems
=
[...
this
.
registeredMenuItems
,
item
]
this
.
renderComponent
()
}
}
async
getCurrentWorkspace
()
{
async
getCurrentWorkspace
()
{
...
@@ -115,15 +134,15 @@ module.exports = class Filepanel extends ViewPlugin {
...
@@ -115,15 +134,15 @@ module.exports = class Filepanel extends ViewPlugin {
this
.
emit
(
'setWorkspace'
,
workspace
)
this
.
emit
(
'setWorkspace'
,
workspace
)
}
}
renameWorkspace
(
workspace
)
{
workspaceRenamed
(
workspace
)
{
this
.
emit
(
'renameWorkspace'
,
workspace
)
this
.
emit
(
'renameWorkspace'
,
workspace
)
}
}
deleteWorkspace
(
workspace
)
{
workspaceDeleted
(
workspace
)
{
this
.
emit
(
'deleteWorkspace'
,
workspace
)
this
.
emit
(
'deleteWorkspace'
,
workspace
)
}
}
createWorkspace
(
workspace
)
{
workspaceCreated
(
workspace
)
{
this
.
emit
(
'createWorkspace'
,
workspace
)
this
.
emit
(
'createWorkspace'
,
workspace
)
}
}
/** end section */
/** end section */
...
...
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
View file @
99196493
This diff is collapsed.
Click to expand it.
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