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
80b6f3f2
Unverified
Commit
80b6f3f2
authored
Jul 06, 2021
by
bunsenstraat
Committed by
GitHub
Jul 06, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1359 from ethereum/labelcontextmenu
add label to context menu
parents
b9f73858
9c073c41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
14 deletions
+26
-14
file-explorer-context-menu.tsx
...x-ui/file-explorer/src/lib/file-explorer-context-menu.tsx
+1
-1
file-explorer.tsx
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
+24
-12
index.ts
libs/remix-ui/file-explorer/src/lib/types/index.ts
+1
-1
No files found.
libs/remix-ui/file-explorer/src/lib/file-explorer-context-menu.tsx
View file @
80b6f3f2
...
@@ -101,7 +101,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) =>
...
@@ -101,7 +101,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) =>
break
break
}
}
hideContextMenu
()
hideContextMenu
()
}
}
>
{
item
.
name
}
</
li
>
}
}
>
{
item
.
label
||
item
.
name
}
</
li
>
})
})
}
}
...
...
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
View file @
80b6f3f2
...
@@ -35,7 +35,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -35,7 +35,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'newFolder'
,
id
:
'newFolder'
,
name
:
'New Folder'
,
name
:
'New Folder'
,
...
@@ -43,7 +44,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -43,7 +44,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'rename'
,
id
:
'rename'
,
name
:
'Rename'
,
name
:
'Rename'
,
...
@@ -51,7 +53,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -51,7 +53,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'delete'
,
id
:
'delete'
,
name
:
'Delete'
,
name
:
'Delete'
,
...
@@ -59,7 +62,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -59,7 +62,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'run'
,
id
:
'run'
,
name
:
'Run'
,
name
:
'Run'
,
...
@@ -67,7 +71,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -67,7 +71,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[
'.js'
],
extension
:
[
'.js'
],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'pushChangesToGist'
,
id
:
'pushChangesToGist'
,
name
:
'Push changes to gist'
,
name
:
'Push changes to gist'
,
...
@@ -75,7 +80,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -75,7 +80,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'publishFolderToGist'
,
id
:
'publishFolderToGist'
,
name
:
'Publish folder to gist'
,
name
:
'Publish folder to gist'
,
...
@@ -83,7 +89,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -83,7 +89,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'publishFileToGist'
,
id
:
'publishFileToGist'
,
name
:
'Publish file to gist'
,
name
:
'Publish file to gist'
,
...
@@ -91,7 +98,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -91,7 +98,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'copy'
,
id
:
'copy'
,
name
:
'Copy'
,
name
:
'Copy'
,
...
@@ -99,7 +107,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -99,7 +107,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
},
{
},
{
id
:
'deleteAll'
,
id
:
'deleteAll'
,
name
:
'Delete All'
,
name
:
'Delete All'
,
...
@@ -107,7 +116,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -107,7 +116,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
true
multiselect
:
true
,
label
:
''
}],
}],
focusContext
:
{
focusContext
:
{
element
:
null
,
element
:
null
,
...
@@ -282,7 +292,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -282,7 +292,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
}])
}])
}
else
{
}
else
{
removeMenuItems
([{
removeMenuItems
([{
...
@@ -292,7 +303,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -292,7 +303,8 @@ export const FileExplorer = (props: FileExplorerProps) => {
path
:
[],
path
:
[],
extension
:
[],
extension
:
[],
pattern
:
[],
pattern
:
[],
multiselect
:
false
multiselect
:
false
,
label
:
''
}])
}])
}
}
},
[
canPaste
])
},
[
canPaste
])
...
...
libs/remix-ui/file-explorer/src/lib/types/index.ts
View file @
80b6f3f2
...
@@ -32,7 +32,7 @@ export interface FileExplorerMenuProps {
...
@@ -32,7 +32,7 @@ export interface FileExplorerMenuProps {
uploadFile
:
(
target
:
EventTarget
&
HTMLInputElement
)
=>
void
uploadFile
:
(
target
:
EventTarget
&
HTMLInputElement
)
=>
void
}
}
export
type
action
=
{
name
:
string
,
type
:
string
[],
path
:
string
[],
extension
:
string
[],
pattern
:
string
[],
id
:
string
,
multiselect
:
boolean
}
export
type
action
=
{
name
:
string
,
type
:
string
[],
path
:
string
[],
extension
:
string
[],
pattern
:
string
[],
id
:
string
,
multiselect
:
boolean
,
label
:
string
}
export
type
MenuItems
=
action
[]
export
type
MenuItems
=
action
[]
export
interface
FileExplorerContextMenuProps
{
export
interface
FileExplorerContextMenuProps
{
...
...
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