Merge pull request #1240 from ethereum/refactor_debugger

refactor debugger tab
pull/3094/head
yann300 7 years ago committed by GitHub
commit 40ac58c511
  1. 36
      src/app/tabs/debugger-tab.js
  2. 15
      src/app/tabs/styles/debugger-tab-styles.js

@ -1,12 +1,36 @@
var yo = require('yo-yo') var yo = require('yo-yo')
var css = require('./styles/debugger-tab-styles') var csjs = require('csjs-inject')
var remixLib = require('remix-lib')
function debuggerTab (api = {}, events = {}, opts = {}) { var EventManager = remixLib.EventManager
var el = yo` var styles = require('../ui/styles-guide/theme-chooser').chooser()
module.exports = class DebuggerTab {
constructor (opts = { api: {}, events: {} }) {
const self = this
self.event = new EventManager()
self._api = opts.api
self._events = opts.events
self._view = { el: null }
self.data = {}
self._components = {}
}
render () {
const self = this
if (self._view.el) return self._view.el
self._view.el = yo`
<div class="${css.debuggerTabView} "id="debugView"> <div class="${css.debuggerTabView} "id="debugView">
<div id="debugger" class="${css.debugger}"></div> <div id="debugger" class="${css.debugger}"></div>
</div>` </div>`
return { render () { return el } } return self._view.el
} }
}
module.exports = debuggerTab const css = csjs`
.debuggerTabView {
padding: 2%;
}
.debugger {
margin-bottom: 1%;
${styles.rightPanel.debuggerTab.box_Debugger}
}
`

@ -1,15 +0,0 @@
var csjs = require('csjs-inject')
var styleGuide = require('../../ui/styles-guide/theme-chooser')
var styles = styleGuide.chooser()
var css = csjs`
.debuggerTabView {
padding: 2%;
}
.debugger {
margin-bottom: 1%;
${styles.rightPanel.debuggerTab.box_Debugger}
}
`
module.exports = css
Loading…
Cancel
Save