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
ceb5496f
Commit
ceb5496f
authored
Sep 09, 2021
by
bunsenstraat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix whitespaces and canactivate
parent
aa508a4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
LocalPluginForm.tsx
...-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
+4
-3
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 @
ceb5496f
...
@@ -5,7 +5,7 @@ import { Toaster } from '@remix-ui/toaster'
...
@@ -5,7 +5,7 @@ import { Toaster } from '@remix-ui/toaster'
import
{
IframePlugin
,
WebsocketPlugin
}
from
'@remixproject/engine-web'
import
{
IframePlugin
,
WebsocketPlugin
}
from
'@remixproject/engine-web'
import
{
localPluginReducerActionType
,
localPluginToastReducer
}
from
'../reducers/pluginManagerReducer'
import
{
localPluginReducerActionType
,
localPluginToastReducer
}
from
'../reducers/pluginManagerReducer'
import
{
FormStateProps
,
PluginManagerComponent
}
from
'../../types'
import
{
canActivate
,
FormStateProps
,
PluginManagerComponent
}
from
'../../types'
interface
LocalPluginFormProps
{
interface
LocalPluginFormProps
{
closeModal
:
()
=>
void
closeModal
:
()
=>
void
...
@@ -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 @
ceb5496f
...
@@ -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