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
4ba22378
Commit
4ba22378
authored
Sep 23, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass global as props
parent
079cd362
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
3 deletions
+55
-3
file-explorer.tsx
libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
+0
-0
remix-ui-workspace.tsx
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
+36
-0
index.ts
libs/remix-ui/workspace/src/lib/types/index.ts
+19
-3
No files found.
libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
View file @
4ba22378
This diff is collapsed.
Click to expand it.
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
View file @
4ba22378
...
...
@@ -202,6 +202,24 @@ export function Workspace (props: WorkspaceProps) {
expandPath=
{
global
.
fs
.
browser
.
expandPath
}
focusEdit=
{
global
.
fs
.
focusEdit
}
focusElement=
{
global
.
fs
.
focusElement
}
dispatchCreateNewFile=
{
global
.
dispatchCreateNewFile
}
modal=
{
global
.
modal
}
dispatchCreateNewFolder=
{
global
.
dispatchCreateNewFolder
}
readonly=
{
global
.
fs
.
readonly
}
toast=
{
global
.
toast
}
dispatchDeletePath=
{
global
.
dispatchDeletePath
}
dispatchRenamePath=
{
global
.
dispatchRenamePath
}
dispatchUploadFile=
{
global
.
dispatchUploadFile
}
dispatchCopyFile=
{
global
.
dispatchCopyFile
}
dispatchCopyFolder=
{
global
.
dispatchCopyFolder
}
dispatchPublishToGist=
{
global
.
dispatchPublishToGist
}
dispatchRunScript=
{
global
.
dispatchRunScript
}
dispatchEmitContextMenuEvent=
{
global
.
dispatchEmitContextMenuEvent
}
dispatchHandleClickFile=
{
global
.
dispatchHandleClickFile
}
dispatchSetFocusElement=
{
global
.
dispatchSetFocusElement
}
dispatchFetchDirectory=
{
global
.
dispatchFetchDirectory
}
dispatchRemoveInputField=
{
global
.
dispatchRemoveInputField
}
dispatchAddInputField=
{
global
.
dispatchAddInputField
}
/>
}
</
div
>
...
...
@@ -218,6 +236,24 @@ export function Workspace (props: WorkspaceProps) {
expandPath=
{
global
.
fs
.
localhost
.
expandPath
}
focusEdit=
{
global
.
fs
.
focusEdit
}
focusElement=
{
global
.
fs
.
focusElement
}
dispatchCreateNewFile=
{
global
.
dispatchCreateNewFile
}
modal=
{
global
.
modal
}
dispatchCreateNewFolder=
{
global
.
dispatchCreateNewFolder
}
readonly=
{
global
.
fs
.
readonly
}
toast=
{
global
.
toast
}
dispatchDeletePath=
{
global
.
dispatchDeletePath
}
dispatchRenamePath=
{
global
.
dispatchRenamePath
}
dispatchUploadFile=
{
global
.
dispatchUploadFile
}
dispatchCopyFile=
{
global
.
dispatchCopyFile
}
dispatchCopyFolder=
{
global
.
dispatchCopyFolder
}
dispatchPublishToGist=
{
global
.
dispatchPublishToGist
}
dispatchRunScript=
{
global
.
dispatchRunScript
}
dispatchEmitContextMenuEvent=
{
global
.
dispatchEmitContextMenuEvent
}
dispatchHandleClickFile=
{
global
.
dispatchHandleClickFile
}
dispatchSetFocusElement=
{
global
.
dispatchSetFocusElement
}
dispatchFetchDirectory=
{
global
.
dispatchFetchDirectory
}
dispatchRemoveInputField=
{
global
.
dispatchRemoveInputField
}
dispatchAddInputField=
{
global
.
dispatchAddInputField
}
/>
}
</
div
>
...
...
libs/remix-ui/workspace/src/lib/types/index.ts
View file @
4ba22378
...
...
@@ -57,12 +57,28 @@ export interface FileExplorerProps {
menuItems
?:
string
[],
contextMenuItems
:
MenuItems
,
removedContextMenuItems
:
MenuItems
,
displayInput
?:
boolean
,
externalUploads
?:
EventTarget
&
HTMLInputElement
,
files
:
{
[
x
:
string
]:
Record
<
string
,
FileType
>
},
expandPath
:
string
[],
focusEdit
:
string
,
focusElement
:
{
key
:
string
,
type
:
'file'
|
'folder'
|
'gist'
}[]
focusElement
:
{
key
:
string
,
type
:
'file'
|
'folder'
|
'gist'
}[],
dispatchCreateNewFile
:
(
path
:
string
,
rootDir
:
string
)
=>
Promise
<
void
>
,
modal
:(
title
:
string
,
message
:
string
|
JSX
.
Element
,
okLabel
:
string
,
okFn
:
()
=>
void
,
cancelLabel
?:
string
,
cancelFn
?:
()
=>
void
)
=>
void
,
dispatchCreateNewFolder
:
(
path
:
string
,
rootDir
:
string
)
=>
Promise
<
void
>
,
readonly
:
boolean
,
toast
:
(
toasterMsg
:
string
)
=>
void
,
dispatchDeletePath
:
(
path
:
string
[])
=>
Promise
<
void
>
,
dispatchRenamePath
:
(
oldPath
:
string
,
newPath
:
string
)
=>
Promise
<
void
>
,
dispatchUploadFile
:
(
target
?:
React
.
SyntheticEvent
,
targetFolder
?:
string
)
=>
Promise
<
void
>
,
dispatchCopyFile
:
(
src
:
string
,
dest
:
string
)
=>
Promise
<
void
>
,
dispatchCopyFolder
:
(
src
:
string
,
dest
:
string
)
=>
Promise
<
void
>
,
dispatchRunScript
:
(
path
:
string
)
=>
Promise
<
void
>
,
dispatchPublishToGist
:
(
path
?:
string
,
type
?:
string
)
=>
Promise
<
void
>
,
dispatchEmitContextMenuEvent
:
(
cmd
:
customAction
)
=>
Promise
<
void
>
,
dispatchHandleClickFile
:
(
path
:
string
,
type
:
'file'
|
'folder'
|
'gist'
)
=>
Promise
<
void
>
,
dispatchSetFocusElement
:
(
elements
:
{
key
:
string
,
type
:
'file'
|
'folder'
|
'gist'
}[])
=>
Promise
<
void
>
,
dispatchFetchDirectory
:(
path
:
string
)
=>
Promise
<
void
>
,
dispatchRemoveInputField
:(
path
:
string
)
=>
Promise
<
void
>
,
dispatchAddInputField
:(
path
:
string
,
type
:
'file'
|
'folder'
)
=>
Promise
<
void
>
}
export
interface
FileExplorerMenuProps
{
...
...
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