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
bce85ef0
Commit
bce85ef0
authored
Sep 09, 2021
by
bunsenstraat
Committed by
davidzagi93@gmail.com
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm whitespace and store canactivate
parent
b57cfbac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
LocalPluginForm.tsx
...-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
+3
-2
types.d.ts
libs/remix-ui/plugin-manager/src/types.d.ts
+1
-0
No files found.
libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
View file @
bce85ef0
...
@@ -51,6 +51,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
...
@@ -51,6 +51,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
setMethods
(
storagePlugin
.
methods
)
setMethods
(
storagePlugin
.
methods
)
setType
(
storagePlugin
.
type
)
setType
(
storagePlugin
.
type
)
setDisplayName
(
storagePlugin
.
displayName
)
setDisplayName
(
storagePlugin
.
displayName
)
setCanactivate
(
storagePlugin
.
canActivate
)
},
[])
},
[])
const
handleModalOkClick
=
async
()
=>
{
const
handleModalOkClick
=
async
()
=>
{
...
@@ -61,7 +62,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
...
@@ -61,7 +62,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
}
}
if
(
!
location
)
throw
new
Error
(
'Plugin should have a location'
)
if
(
!
location
)
throw
new
Error
(
'Plugin should have a location'
)
if
(
!
url
)
throw
new
Error
(
'Plugin should have an URL'
)
if
(
!
url
)
throw
new
Error
(
'Plugin should have an URL'
)
const
newMethods
=
typeof
methods
===
'string'
?
methods
.
split
(
','
).
filter
(
val
=>
val
)
:
[]
const
newMethods
=
typeof
methods
===
'string'
?
methods
.
split
(
','
).
filter
(
val
=>
val
)
.
map
(
val
=>
{
return
val
.
trim
()
})
:
[]
const
targetPlugin
=
{
const
targetPlugin
=
{
name
:
name
,
name
:
name
,
displayName
:
displayName
,
displayName
:
displayName
,
...
@@ -75,7 +76,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
...
@@ -75,7 +76,7 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor
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
)
:
[]
canActivate
:
typeof
canactivate
===
'string'
?
canactivate
.
split
(
','
).
filter
(
val
=>
val
)
.
map
(
val
=>
{
return
val
.
trim
()
})
:
[]
}
}
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
}
`
...
...
libs/remix-ui/plugin-manager/src/types.d.ts
View file @
bce85ef0
...
@@ -180,6 +180,7 @@ export interface FormStateProps {
...
@@ -180,6 +180,7 @@ export interface FormStateProps {
hash
:
string
hash
:
string
methods
:
any
methods
:
any
location
:
string
location
:
string
canActivate
?:
any
}
}
export
type
PluginManagerProfile
=
Profile
&
{
export
type
PluginManagerProfile
=
Profile
&
{
...
...
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