Unverified Commit 30600aa4 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1963 from ethereum/issue#1962-hidden_panel

Create an hidden panel component
parents c08397f4 5422e98c
...@@ -51,6 +51,7 @@ import { ThemeModule } from './app/tabs/theme-module' ...@@ -51,6 +51,7 @@ import { ThemeModule } from './app/tabs/theme-module'
import { NetworkModule } from './app/tabs/network-module' import { NetworkModule } from './app/tabs/network-module'
import { SwapPanel } from './app/components/swap-panel' import { SwapPanel } from './app/components/swap-panel'
import { MainPanel } from './app/components/main-panel' import { MainPanel } from './app/components/main-panel'
import { HiddenPanel } from './app/components/hidden-panel'
import { VerticalIcons } from './app/components/vertical-icons' import { VerticalIcons } from './app/components/vertical-icons'
var css = csjs` var css = csjs`
...@@ -344,6 +345,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -344,6 +345,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const swapPanel = new SwapPanel(appStore) const swapPanel = new SwapPanel(appStore)
const mainPanel = new MainPanel(appStore) const mainPanel = new MainPanel(appStore)
const hiddenPanel = new HiddenPanel(appStore)
// ----------------- main view ---------------------- // ----------------- main view ----------------------
self._components.mainview = new MainView(appStore, appManager, mainPanel) self._components.mainview = new MainView(appStore, appManager, mainPanel)
...@@ -376,6 +378,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -376,6 +378,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
self._view.mainpanel.appendChild(self._components.mainview.render()) self._view.mainpanel.appendChild(self._components.mainview.render())
self._view.iconpanel.appendChild(verticalIcons.render()) self._view.iconpanel.appendChild(verticalIcons.render())
self._view.swappanel.appendChild(swapPanel.render()) self._view.swappanel.appendChild(swapPanel.render())
document.body.appendChild(hiddenPanel.render()) // Hidden Panel is display none, it can be directly on body
let filePanel = new FilePanel() let filePanel = new FilePanel()
registry.put({api: filePanel, name: 'filepanel'}) registry.put({api: filePanel, name: 'filepanel'})
......
import { AbstractPanel } from './panel'
const csjs = require('csjs-inject')
const yo = require('yo-yo')
const css = csjs`
.pluginsContainer {
display: none;
}
`
export class HiddenPanel extends AbstractPanel {
constructor (appStore) {
super('hiddenPanel', appStore)
}
render () {
return yo`
<div class=${css.pluginsContainer}>
${this.view}
</div>`
}
}
...@@ -164,7 +164,7 @@ module.exports = class LocalPlugin { ...@@ -164,7 +164,7 @@ module.exports = class LocalPlugin {
<label for="loc2"><input type="radio" name="location" onclick="${e => this.updateLoc(e)}" value="mainPanel" id="loc2" >Main Panel</label> <label for="loc2"><input type="radio" name="location" onclick="${e => this.updateLoc(e)}" value="mainPanel" id="loc2" >Main Panel</label>
</div> </div>
<div class="radio"> <div class="radio">
<label for="loc3"><input type="radio" name="location" onclick="${e => this.updateLoc(e)}" value="none" id="loc3" >None</label> <label for="loc3"><input type="radio" name="location" onclick="${e => this.updateLoc(e)}" value="hiddenPanel" id="loc3" >None</label>
</div> </div>
</form>` </form>`
} }
......
...@@ -31,8 +31,7 @@ const css = csjs` ...@@ -31,8 +31,7 @@ const css = csjs`
` `
const options = { const options = {
default: true, default: true
displayHeader: true
} }
export class SwapPanel extends AbstractPanel { export class SwapPanel extends AbstractPanel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment