From 467c896ed21a8e0eaf05ffff2fd764d9a6fbb247 Mon Sep 17 00:00:00 2001 From: Florrie Date: Fri, 17 Jul 2020 19:08:09 -0300 Subject: only show log pane once first message is displayed --- ui.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ui.js') diff --git a/ui.js b/ui.js index df02edf..12898f2 100644 --- a/ui.js +++ b/ui.js @@ -244,6 +244,12 @@ export default class AppElement extends FocusElement { this.log = new Log() this.logPane.addChild(this.log) + this.logPane.visible = false + + this.log.on('log-message', () => { + this.logPane.visible = true + this.fixLayout() + }) if (!this.config.showTabberPane) { this.tabberPane.visible = false @@ -1728,7 +1734,7 @@ export default class AppElement extends FocusElement { this.logPane.w = leftWidth this.logPane.h = 6 this.log.fillParent() - this.log.fixLayout() + this.log.fixAllLayout() } if (this.tabberPane.visible) { @@ -5538,6 +5544,7 @@ class Log extends ListScrollForm { this.addInput(logMessage) this.fixLayout() this.scrollToEnd() + this.emit('log-message', logMessage) return logMessage } } -- cgit 1.3.0-6-gf8a5