|
|
@ -6,7 +6,6 @@ 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 { FormStateProps, PluginManagerComponent } from '../../types' |
|
|
|
import { isArray } from 'util' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface LocalPluginFormProps { |
|
|
|
interface LocalPluginFormProps { |
|
|
|
closeModal: () => void |
|
|
|
closeModal: () => void |
|
|
@ -50,10 +49,10 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor |
|
|
|
setName(storagePlugin.name) |
|
|
|
setName(storagePlugin.name) |
|
|
|
setUrl(storagePlugin.url) |
|
|
|
setUrl(storagePlugin.url) |
|
|
|
setLocation(storagePlugin.location as 'sidePanel' | 'mainPanel' | 'none') |
|
|
|
setLocation(storagePlugin.location as 'sidePanel' | 'mainPanel' | 'none') |
|
|
|
setMethods(isArray(storagePlugin.methods) ? storagePlugin.methods.join(',') : storagePlugin.methods) |
|
|
|
setMethods(Array.isArray(storagePlugin.methods) ? storagePlugin.methods.join(',') : storagePlugin.methods) |
|
|
|
setType(storagePlugin.type) |
|
|
|
setType(storagePlugin.type) |
|
|
|
setDisplayName(storagePlugin.displayName) |
|
|
|
setDisplayName(storagePlugin.displayName) |
|
|
|
setCanactivate(isArray(storagePlugin.canActivate) ? storagePlugin.canActivate.join(',') : storagePlugin.canActivate) |
|
|
|
setCanactivate(Array.isArray(storagePlugin.canActivate) ? storagePlugin.canActivate.join(',') : storagePlugin.canActivate) |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
const handleModalOkClick = async () => { |
|
|
|
const handleModalOkClick = async () => { |
|
|
|