closing and opening panels

pull/1/head
Rob Stupay 6 years ago
parent b8476ce79c
commit ce51843b40
  1. 4
      src/app/components/swap-panel-api.js
  2. 24
      src/framingService.js
  3. 17
      src/remixAppManager.js

@ -17,6 +17,10 @@ class SwapPanelApi {
})
}
showContent (moduleName) {
this.component.showContent(moduleName)
}
/*
content: DOM element
by appManager

@ -2,23 +2,27 @@ export default {
start: (appStore, swapPanelApi, verticalIconApi, mainPanelApi, resizeFeature) => {
swapPanelApi.event.on('toggle', () => {
resizeFeature.panel1.clientWidth !== 0 ? resizeFeature.minimize() : resizeFeature.maximise()
if (moduleName === 'file explorers') {
mainPanelApi.showContent('code editor')
}
})
mainPanelApi.event.on('toggle', () => {
verticalIconApi.select('code editor')
resizeFeature.maximise()
})
swapPanelApi.event.on('showing', (moduleName) => {
if (moduleName === 'file explorers') {
mainPanelApi.showContent('code editor')
}
resizeFeature.panel1.clientWidth === 0 ? resizeFeature.maximise() : ''
var current = appStore.getOne(moduleName)
// warn the content that it is being displayed. TODO should probably be done in each view
// warn the content that it is being displayed. TODO should probably be done in each view
if (current && current.api.__showing) current.api.__showing()
})
mainPanelApi.event.on('showing', (moduleName) => {
if (moduleName === 'code editor') {
verticalIconApi.select('file explorers')
resizeFeature.maximise()
return
}
resizeFeature.minimize()
})
mainPanelApi.event.on('showing', (moduleName) => {})
verticalIconApi.select('file explorers')
resizeFeature.minimize()
verticalIconApi.select('homepage')
}
}

@ -61,7 +61,10 @@ export class RemixAppManager extends AppManagerApi {
domEl.style.width = '100%'
domEl.style.border = '0'
panel.add(profile, domEl)
this.verticalIconsApi.addIcon(profile)
// TODO perhaps should not be here
if (profile.name !== 'code editor') {
this.verticalIconsApi.addIcon(profile)
}
return
}
this.hiddenNodes[profile.name] = domEl
@ -79,6 +82,15 @@ export class RemixAppManager extends AppManagerApi {
}
plugins () {
let vyper = {
name: 'vyper',
events: [],
methods: [],
notifications: {},
url: 'https://plugin.vyper.live',
description: 'compile vyper contracts',
icon: 'data:image/svg+xml;base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zg1LjV6Ii8+PC9zdmc+'
}
let ethDoc = {
name: 'eth doc',
events: ['newDoc'],
@ -100,6 +112,7 @@ export class RemixAppManager extends AppManagerApi {
prefferedLocation: 'mainPanel'
}
return [{ profile: ethDoc, api: new Plugin(ethDoc, { resolveLocaton: (iframe) => { return this.resolveLocation(ethDoc, iframe) } }) },
{ profile: pipeline, api: new Plugin(pipeline, { resolveLocaton: (iframe) => { return this.resolveLocation(pipeline, iframe) } }) }]
{ profile: pipeline, api: new Plugin(pipeline, { resolveLocaton: (iframe) => { return this.resolveLocation(pipeline, iframe) } }) },
{ profile: vyper, api: new Plugin(vyper, { resolveLocaton: (iframe) => { return this.resolveLocation(vyper, iframe) } }) }]
}
}

Loading…
Cancel
Save