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
de1c30e6
Commit
de1c30e6
authored
Aug 04, 2021
by
joseph izang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove a bunch of commented out code and debugging code
parent
ba8b4ccf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
56 deletions
+6
-56
pluginManager.spec.ts
apps/remix-ide-e2e/src/tests/pluginManager.spec.ts
+2
-2
InactivePluginCard.tsx
.../plugin-manager/src/lib/components/InactivePluginCard.tsx
+0
-2
LocalPluginForm.tsx
...-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
+4
-11
remix-ui-plugin-manager.tsx
...mix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx
+0
-41
No files found.
apps/remix-ide-e2e/src/tests/pluginManager.spec.ts
View file @
de1c30e6
...
@@ -132,8 +132,8 @@ module.exports = {
...
@@ -132,8 +132,8 @@ module.exports = {
.
click
(
'*[data-id="localPluginRadioButtonsidePanel"]'
)
.
click
(
'*[data-id="localPluginRadioButtonsidePanel"]'
)
.
click
(
'*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalFooter-react"]'
)
.
click
(
'*[data-id="pluginManagerLocalPluginModalDialogModalDialogModalFooter-react"]'
)
// .modalFooterOKClick()
// .modalFooterOKClick()
.
pause
(
5000
)
//
.pause(5000)
.
waitForElementVisible
(
'*[data-shared="tooltipPopup"]:nth-last-of-type(1)'
)
//
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)')
.
pause
(
2000
)
.
pause
(
2000
)
.
assert
.
containsText
(
'*[data-shared="tooltipPopup"]:nth-last-of-type(1)'
,
'Cannot create Plugin : This name has already been used'
)
.
assert
.
containsText
(
'*[data-shared="tooltipPopup"]:nth-last-of-type(1)'
,
'Cannot create Plugin : This name has already been used'
)
},
},
...
...
libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx
View file @
de1c30e6
...
@@ -54,8 +54,6 @@ function InactivePluginCard ({
...
@@ -54,8 +54,6 @@ function InactivePluginCard ({
<
button
<
button
onClick=
{
async
()
=>
{
onClick=
{
async
()
=>
{
activatePlugin
(
profile
)
activatePlugin
(
profile
)
// eslint-disable-next-line no-debugger
debugger
const
actives
:
Profile
[]
=
JSON
.
parse
(
localStorage
.
getItem
(
'newActivePlugins'
))
const
actives
:
Profile
[]
=
JSON
.
parse
(
localStorage
.
getItem
(
'newActivePlugins'
))
const
workspacePlugins
=
JSON
.
parse
(
localStorage
.
getItem
(
'workspace'
))
const
workspacePlugins
=
JSON
.
parse
(
localStorage
.
getItem
(
'workspace'
))
const
tempList
=
[]
const
tempList
=
[]
...
...
libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
View file @
de1c30e6
...
@@ -17,21 +17,11 @@ function LocalPluginForm ({ changeHandler, plugin, closeModal, visible, pluginMa
...
@@ -17,21 +17,11 @@ function LocalPluginForm ({ changeHandler, plugin, closeModal, visible, pluginMa
const
handleModalOkClick
=
async
()
=>
{
const
handleModalOkClick
=
async
()
=>
{
try
{
try
{
const
profile
=
JSON
.
parse
(
localStorage
.
getItem
(
'plugins/local'
))
||
plugin
const
profile
=
JSON
.
parse
(
localStorage
.
getItem
(
'plugins/local'
))
||
plugin
// eslint-disable-next-line no-debugger
debugger
if
(
!
profile
)
return
if
(
!
profile
)
return
if
(
profile
.
profile
)
{
if
(
profile
.
profile
)
{
if
(
pluginManager
.
appManager
.
getIds
().
includes
(
profile
.
profile
.
name
))
{
if
(
pluginManager
.
appManager
.
getIds
().
includes
(
profile
.
profile
.
name
))
{
throw
new
Error
(
'This name has already been used'
)
throw
new
Error
(
'This name has already been used'
)
}
}
// if (!profile.profile.location) throw new Error('Plugin should have a location')
// if (!profile.profile.pname) throw new Error('Plugin should have a name')
// if (!profile.profile.url) throw new Error('Plugin should have an URL')
// const localPlugin = profile.profile.type === 'iframe' ? new IframePlugin(profile) : new WebsocketPlugin(profile)
// localPlugin.profile.hash = `local-${profile.profile.pname}`
// localStorage.setItem('plugins/local', JSON.stringify(localPlugin))
// pluginManager.engine.register(localPlugin)
// await pluginManager.appManager.activatePlugin(localPlugin.name)
}
else
{
}
else
{
if
(
pluginManager
.
appManager
.
getIds
().
includes
(
profile
.
name
))
{
if
(
pluginManager
.
appManager
.
getIds
().
includes
(
profile
.
name
))
{
throw
new
Error
(
'This name has already been used'
)
throw
new
Error
(
'This name has already been used'
)
...
@@ -42,12 +32,15 @@ function LocalPluginForm ({ changeHandler, plugin, closeModal, visible, pluginMa
...
@@ -42,12 +32,15 @@ function LocalPluginForm ({ changeHandler, plugin, closeModal, visible, pluginMa
const
localPlugin
=
profile
.
type
===
'iframe'
?
new
IframePlugin
(
profile
)
:
new
WebsocketPlugin
(
profile
)
const
localPlugin
=
profile
.
type
===
'iframe'
?
new
IframePlugin
(
profile
)
:
new
WebsocketPlugin
(
profile
)
localPlugin
.
profile
.
hash
=
`local-
${
profile
.
name
}
`
localPlugin
.
profile
.
hash
=
`local-
${
profile
.
name
}
`
pluginManager
.
engine
.
register
(
localPlugin
)
pluginManager
.
engine
.
register
(
localPlugin
)
// eslint-disable-next-line no-debugger
debugger
await
pluginManager
.
appManager
.
activatePlugin
(
localPlugin
.
profile
.
name
)
await
pluginManager
.
appManager
.
activatePlugin
(
localPlugin
.
profile
.
name
)
localStorage
.
setItem
(
'plugins/local'
,
JSON
.
stringify
(
localPlugin
))
localStorage
.
setItem
(
'plugins/local'
,
JSON
.
stringify
(
localPlugin
))
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
console
.
error
(
error
)
setErrorMsg
(
error
.
message
)
// setErrorMsg(error.message)
setErrorMsg
(
'This name has already been used'
)
}
}
}
}
return
(
return
(
...
...
libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx
View file @
de1c30e6
...
@@ -21,47 +21,6 @@ export function getWorkspacePluginNames () {
...
@@ -21,47 +21,6 @@ export function getWorkspacePluginNames () {
}
}
export
const
RemixUiPluginManager
=
({
pluginComponent
}:
RemixUiPluginManagerProps
)
=>
{
export
const
RemixUiPluginManager
=
({
pluginComponent
}:
RemixUiPluginManagerProps
)
=>
{
// const [, setWorkspacePlugins] = useState<string[]>([])
// useEffect(() => {
// const newActives = localStorage.getItem('newActivePlugins')
// const updatedInactives = localStorage.getItem('updatedInactives')
// if (newActives === null && updatedInactives === null) {
// if (getWorkspacePluginNames().includes('solidity') && getWorkspacePluginNames().includes('solidity-logic')) {
// if (pluginComponent.activeProfiles.includes('solidity') && pluginComponent.activeProfiles.includes('solidity-logic')) {
// localStorage.setItem('newActivePlugins', JSON.stringify(getSolidity(pluginComponent)))
// const filteredInactives = pluginComponent.inactivePlugins.filter(inactive => inactive.name !== 'solidity' &&
// inactive.name !== 'solidity-logic')
// }
// }
// localStorage.setItem('newActivePlugins', '[]')
// localStorage.setItem('updatedInactives', '[]')
// }
// console.log('current Active Profiles from pluginComponent', pluginComponent.activeProfiles)
// // eslint-disable-next-line react-hooks/exhaustive-deps
// }, [pluginComponent.activePlugins, pluginComponent.activeProfiles, pluginComponent.inactivePlugins])
// useEffect(() => {
// const workspaceLogic = async () => {
// const workspace = JSON.parse(localStorage.getItem('workspace'))
// const fromLocalStorage = JSON.parse(localStorage.getItem('newActivePlugins')) as Profile[]
// if (workspace && workspace.length > 0) {
// setWorkspacePlugins(workspace)
// if (workspace.includes('solidity') && workspace.includes('solidity-logic')) {
// const solidity = await pluginComponent.appManager.getProfile('solidity')
// const logic = await pluginComponent.appManager.getProfile('solidity-logic')
// const updates = [...fromLocalStorage, solidity, logic]
// localStorage.setItem('newActivePlugins', JSON.stringify(updates))
// // setActiveProfiles(updates)
// }
// }
// }
// workspaceLogic()
// return () => {
// console.log('finished second effect!')
// }
// // eslint-disable-next-line react-hooks/exhaustive-deps
// }, [])
return
(
return
(
<
RootView
pluginComponent=
{
pluginComponent
}
>
<
RootView
pluginComponent=
{
pluginComponent
}
>
<
section
data
-
id=
"pluginManagerComponentPluginManagerSection"
>
<
section
data
-
id=
"pluginManagerComponentPluginManagerSection"
>
...
...
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