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
97ccd2fb
Commit
97ccd2fb
authored
Jul 14, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract props
parent
9b1f1713
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
remix-ui-workspace.tsx
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
+25
-3
No files found.
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
View file @
97ccd2fb
...
...
@@ -7,6 +7,7 @@ import { MenuItems } from 'libs/remix-ui/file-explorer/src/lib/types'
/* eslint-disable-next-line */
export
interface
WorkspaceProps
{
plugin
:
{
setWorkspace
:
({
name
:
string
,
isLocalhost
:
boolean
},
setEvent
:
boolean
)
=>
void
,
createWorkspace
:
(
name
:
string
)
=>
void
,
renameWorkspace
:
(
oldName
:
string
,
newName
:
string
)
=>
void
...
...
@@ -18,16 +19,37 @@ export interface WorkspaceProps {
localhost
:
any
// localhost provider
fileManager
:
any
registry
:
any
// registry
plugin
:
any
// plugin call and resetFocus
request
:
any
// api request,
workspaces
:
any
,
registeredMenuItems
:
MenuItems
// menu items
removedMenuItems
:
MenuItems
initialWorkspace
:
string
}
}
var
canUpload
=
window
.
File
||
window
.
FileReader
||
window
.
FileList
||
window
.
Blob
export
const
Workspace
=
(
props
:
WorkspaceProps
)
=>
{
const
{
plugin
,
plugin
:
{
setWorkspace
,
createWorkspace
,
renameWorkspace
,
workspaceRenamed
,
workspaceCreated
,
workspaceDeleted
,
workspace
,
browser
,
localhost
,
fileManager
,
registry
,
request
,
workspaces
,
registeredMenuItems
,
removedMenuItems
,
initialWorkspace
}
}
=
props
const
LOCALHOST
=
' - connect to localhost - '
const
NO_WORKSPACE
=
' - none - '
...
...
@@ -409,7 +431,7 @@ export const Workspace = (props: WorkspaceProps) => {
registry=
{
props
.
registry
}
filesProvider=
{
props
.
workspace
}
menuItems=
{
[
'createNewFile'
,
'createNewFolder'
,
'publishToGist'
,
canUpload
?
'uploadFile'
:
''
]
}
plugin=
{
p
rops
.
p
lugin
}
plugin=
{
plugin
}
focusRoot=
{
state
.
reset
}
contextMenuItems=
{
props
.
registeredMenuItems
}
removedContextMenuItems=
{
props
.
removedMenuItems
}
...
...
@@ -427,7 +449,7 @@ export const Workspace = (props: WorkspaceProps) => {
registry=
{
props
.
registry
}
filesProvider=
{
props
.
localhost
}
menuItems=
{
[
'createNewFile'
,
'createNewFolder'
]
}
plugin=
{
p
rops
.
p
lugin
}
plugin=
{
plugin
}
focusRoot=
{
state
.
reset
}
contextMenuItems=
{
props
.
registeredMenuItems
}
removedContextMenuItems=
{
props
.
removedMenuItems
}
...
...
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