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
c277af98
Unverified
Commit
c277af98
authored
Sep 09, 2021
by
bunsenstraat
Committed by
GitHub
Sep 09, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into github
parents
a77648c3
aa508a4c
Hide 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 @
c277af98
...
...
@@ -41,6 +41,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
const
[
type
,
setType
]
=
useState
<
'iframe'
|
'ws'
>
(
'iframe'
)
const
[
location
,
setLocation
]
=
useState
<
'sidePanel'
|
'mainPanel'
|
'none'
>
(
'sidePanel'
)
const
[
methods
,
setMethods
]
=
useState
<
string
>
(
''
)
const
[
canactivate
,
setCanactivate
]
=
useState
<
string
>
(
''
)
useEffect
(()
=>
{
const
storagePlugin
:
FormStateProps
=
localStorage
.
getItem
(
'plugins/local'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'plugins/local'
))
:
defaultProfile
...
...
@@ -73,7 +74,8 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
url
:
url
,
type
:
type
,
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
)
localPlugin
.
profile
.
hash
=
`local-
${
name
}
`
...
...
@@ -122,14 +124,24 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
placeholder=
"Name in the header"
/>
</
div
>
<
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
className=
"form-control"
onChange=
{
e
=>
setMethods
(
e
.
target
.
value
)
}
value=
{
methods
}
id=
"plugin-methods"
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
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