this.container.key("escape", () => { if (this.helpView.isVisible() || this.gotoTimeView.isVisible()) { this.helpView.hide(); this.gotoTimeView.hide(); this.screen.render(); } else { this.screen.emit("resetGraphs"); this._showLayout(0); } });
render () { // var grid = new contrib.grid({rows: 12, cols: 12, screen: this.screen}) // grid.set(row, col, rowSpan, colSpan, obj, opts) // var map = grid.set(0, 0, 4, 4, this.widgetsRepository.get('containerInfo').widget) // var box = grid.set(4, 4, 4, 4, blessed.box, {content: 'My Box'}) // console.log(this.widgetsRepository.get('containerInfo').widget) this.screen.render() }
this.container.key(["z", "S-z", "x", "S-x"], (ch, key) => { const goto = key.name === "z" ? -1 : 1; this.screen.emit("startGraphs", goto); this.screen.render(); });
this.container.key(["?", "h", "S-h"], () => { this.gotoTimeView.hide(); this.helpView.toggle(); this.screen.render(); });
this.container.key(["g", "S-g"], () => { this.helpView.hide(); this.gotoTimeView.toggle(); this.screen.render(); });
logConsole(...data) { R.forEach((line) => { this.boxes.console.pushLine(line) }, data) const extraLines = this.boxes.console.getScreenLines().length - this.screen.height + 2 if (extraLines > 0) { for (let i = 0; i < extraLines; i++) { this.boxes.console.shiftLine(0) } } this.screen.render() }
renderConnectionsLog(props) { const {title} = props this.connectionsLog = this.grid.set(7, 5, 3, 5, contrib.log, { fg: `green`, selectedFg: `green`, label: title }) this.screen.render() }
// Select active card lBox.key(['enter', 'o', 'e'], () => { const card = tMan.cards[list.id][lBox.selected] tMan.editingCard = card titleBox.setValue(card.name) descrBox.setValue(card.desc) cardForm.setLabel('[ Edit Card ]') cardForm.show() cardForm.focus() screen.render() })
this.screen.key('`', () => { this.boxes.dev.setFront() this.devBoxes.cmd.setFront() this.devBoxes.cmd.focus() this.screen.render() })
logWallet(...data) { R.forEach((line) => { this.boxes.wallet.pushLine(line) }, data) const extraLines = this.boxes.wallet.getScreenLines().length - this.screen.height + 2 if (extraLines > 0) { for (let i = 0; i < extraLines; i++) { this.boxes.wallet.shiftLine(0) } } this.screen.render() }
logDev(...data) { R.forEach((line) => { this.devBoxes.console.pushLine(line) }, data) const extraLines = this.devBoxes.console.getScreenLines().length - this.screen.height + 2 if (extraLines > 0) { for (let i = 0; i < extraLines; i++) { this.devBoxes.console.shiftLine(0) } } this.screen.render() }
logMiner(...data) { R.forEach((line) => { this.boxes.miner.pushLine(line) }, data) const extraLines = this.boxes.miner.getScreenLines().length - this.screen.height + 2 if (extraLines > 0) { for (let i = 0; i < extraLines; i++) { this.boxes.miner.shiftLine(0) } } this.screen.render() }
this.container.key(["w", "S-w", "s", "S-s"], (ch, key) => { const zoom = key.name === "s" ? -1 : 1; this.screen.emit("zoomGraphs", zoom); this.screen.render(); });
this.container.key(["a", "S-a", "d", "S-d"], (ch, key) => { const scroll = key.name === "a" ? -1 : 1; this.screen.emit("scrollGraphs", scroll); this.screen.render(); });