diff --git a/client/modules/terminal.js b/client/modules/terminal.js index ac118b3f..d29934c1 100644 --- a/client/modules/terminal.js +++ b/client/modules/terminal.js @@ -2,6 +2,8 @@ /* global CloudCmd, gritty */ +require('../../css/terminal.css'); + const exec = require('execon'); const load = require('../dom/load'); const DOM = require('../dom'); @@ -46,7 +48,6 @@ function TerminalProto() { } module.exports.show = show; - module.exports.hide = hide; function hide () { @@ -75,8 +76,6 @@ function create(callback) { const {socket, terminal} = gritty(Element, options); - terminal.focus(); - Terminal = terminal; terminal.on('key', (char, {keyCode, shiftKey}) => { @@ -86,7 +85,6 @@ function create(callback) { }); socket.on('connect', exec.with(authCheck, socket)); - exec(callback); } @@ -104,10 +102,8 @@ function show(callback) { CloudCmd.View.show(Element, { afterShow: () => { - if (Terminal) { - Terminal.fit(); // lines corrupt without + if (Terminal) Terminal.focus(); - } exec(callback); } diff --git a/css/main.css b/css/main.css index 6008c2a9..ebaafe19 100644 --- a/css/main.css +++ b/css/main.css @@ -5,4 +5,5 @@ @import './help.css'; @import './query.css'; @import './supports.css'; +@import './terminal.css'; diff --git a/css/terminal.css b/css/terminal.css new file mode 100644 index 00000000..20cf94b4 --- /dev/null +++ b/css/terminal.css @@ -0,0 +1,4 @@ +.terminal { + height: 100%; +} +