Merge pull request #1319 from ethereum/runTab

Switch arrows in Recorder card
pull/1/head
yann300 7 years ago committed by GitHub
commit 3adf2ec363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/app/tabs/run-tab.js
  2. 6
      src/app/ui/card.js

@ -80,10 +80,10 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) {
recorderCard.event.register('expandCollapseCard', (arrow, body, status) => {
body.innerHTML = ''
status.innerHTML = ''
if (arrow === 'up') {
if (arrow === 'down') {
status.appendChild(self._view.collapsedView)
body.appendChild(self._view.expandedView)
} else if (arrow === 'down') {
} else if (arrow === 'up') {
status.appendChild(self._view.collapsedView)
}
})

@ -19,7 +19,7 @@ module.exports = class Card {
if (self._view.el) return self._view.el
self._view.cardBody = yo`<div class=${css.cardBody}></div>`
self._view.arrow = yo`<i class="${css.arrow} fa fa-angle-up"
self._view.arrow = yo`<i class="${css.arrow} fa fa-angle-down"
onclick=${(ev) => trigger(ev.target)}></i>`
self._view.expandCollapseButton = yo`
@ -39,8 +39,8 @@ module.exports = class Card {
function trigger (el) {
var body = self._view.cardBody
var status = self._view.statusBar
el.classList.toggle('fa-angle-down')
var arrow = el.classList.toggle('fa-angle-up') ? 'down' : 'up'
el.classList.toggle('fa-angle-up')
var arrow = el.classList.toggle('fa-angle-down') ? 'up' : 'down'
self.event.trigger('expandCollapseCard', [arrow, body, status])
}

Loading…
Cancel
Save