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
aa508a4c
Unverified
Commit
aa508a4c
authored
Sep 09, 2021
by
bunsenstraat
Committed by
GitHub
Sep 09, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1579 from ethereum/bunsenstraat-patch-3-1
Update LocalPluginForm.tsx
parents
3b3ad463
09a26450
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
LocalPluginForm.tsx
...-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
+15
-3
No files found.
libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
View file @
aa508a4c
...
@@ -41,6 +41,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
...
@@ -41,6 +41,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
const
[
type
,
setType
]
=
useState
<
'iframe'
|
'ws'
>
(
'iframe'
)
const
[
type
,
setType
]
=
useState
<
'iframe'
|
'ws'
>
(
'iframe'
)
const
[
location
,
setLocation
]
=
useState
<
'sidePanel'
|
'mainPanel'
|
'none'
>
(
'sidePanel'
)
const
[
location
,
setLocation
]
=
useState
<
'sidePanel'
|
'mainPanel'
|
'none'
>
(
'sidePanel'
)
const
[
methods
,
setMethods
]
=
useState
<
string
>
(
''
)
const
[
methods
,
setMethods
]
=
useState
<
string
>
(
''
)
const
[
canactivate
,
setCanactivate
]
=
useState
<
string
>
(
''
)
useEffect
(()
=>
{
useEffect
(()
=>
{
const
storagePlugin
:
FormStateProps
=
localStorage
.
getItem
(
'plugins/local'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'plugins/local'
))
:
defaultProfile
const
storagePlugin
:
FormStateProps
=
localStorage
.
getItem
(
'plugins/local'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'plugins/local'
))
:
defaultProfile
...
@@ -73,7 +74,8 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
...
@@ -73,7 +74,8 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
url
:
url
,
url
:
url
,
type
:
type
,
type
:
type
,
location
:
location
,
location
:
location
,
icon
:
'assets/img/localPlugin.webp'
icon
:
'assets/img/localPlugin.webp'
,
canActivate
:
typeof
canactivate
===
'string'
?
canactivate
.
split
(
','
).
filter
(
val
=>
val
)
:
[]
}
}
const
localPlugin
=
type
===
'iframe'
?
new
IframePlugin
(
initialState
)
:
new
WebsocketPlugin
(
initialState
)
const
localPlugin
=
type
===
'iframe'
?
new
IframePlugin
(
initialState
)
:
new
WebsocketPlugin
(
initialState
)
localPlugin
.
profile
.
hash
=
`local-
${
name
}
`
localPlugin
.
profile
.
hash
=
`local-
${
name
}
`
...
@@ -122,14 +124,24 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
...
@@ -122,14 +124,24 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
placeholder=
"Name in the header"
/>
placeholder=
"Name in the header"
/>
</
div
>
</
div
>
<
div
className=
"form-group"
>
<
div
className=
"form-group"
>
<
label
htmlFor=
"plugin-methods"
>
Api (comma separated list of method
s name
)
</
label
>
<
label
htmlFor=
"plugin-methods"
>
Api (comma separated list of method
names
)
</
label
>
<
input
<
input
className=
"form-control"
className=
"form-control"
onChange=
{
e
=>
setMethods
(
e
.
target
.
value
)
}
onChange=
{
e
=>
setMethods
(
e
.
target
.
value
)
}
value=
{
methods
}
value=
{
methods
}
id=
"plugin-methods"
id=
"plugin-methods"
data
-
id=
"localPluginMethods"
data
-
id=
"localPluginMethods"
placeholder=
"Name in the header"
/>
placeholder=
"Methods"
/>
</
div
>
<
div
className=
"form-group"
>
<
label
htmlFor=
"plugin-methods"
>
Plugins it can activate (comma separated list of plugin names)
</
label
>
<
input
className=
"form-control"
onChange=
{
e
=>
setCanactivate
(
e
.
target
.
value
)
}
value=
{
canactivate
}
id=
"plugin-canactivate"
data
-
id=
"localPluginCanActivate"
placeholder=
"Plugin names"
/>
</
div
>
</
div
>
<
div
className=
"form-group"
>
<
div
className=
"form-group"
>
...
...
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