mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
fix(terminal) rows and cols
This commit is contained in:
parent
05af6770b2
commit
9fe2bdee0a
3 changed files with 8 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,5 @@
|
|||
@import './help.css';
|
||||
@import './query.css';
|
||||
@import './supports.css';
|
||||
@import './terminal.css';
|
||||
|
||||
|
|
|
|||
4
css/terminal.css
Normal file
4
css/terminal.css
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
.terminal {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue