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 */
|
/* global CloudCmd, gritty */
|
||||||
|
|
||||||
|
require('../../css/terminal.css');
|
||||||
|
|
||||||
const exec = require('execon');
|
const exec = require('execon');
|
||||||
const load = require('../dom/load');
|
const load = require('../dom/load');
|
||||||
const DOM = require('../dom');
|
const DOM = require('../dom');
|
||||||
|
|
@ -46,7 +48,6 @@ function TerminalProto() {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.show = show;
|
module.exports.show = show;
|
||||||
|
|
||||||
module.exports.hide = hide;
|
module.exports.hide = hide;
|
||||||
|
|
||||||
function hide () {
|
function hide () {
|
||||||
|
|
@ -75,8 +76,6 @@ function create(callback) {
|
||||||
|
|
||||||
const {socket, terminal} = gritty(Element, options);
|
const {socket, terminal} = gritty(Element, options);
|
||||||
|
|
||||||
terminal.focus();
|
|
||||||
|
|
||||||
Terminal = terminal;
|
Terminal = terminal;
|
||||||
|
|
||||||
terminal.on('key', (char, {keyCode, shiftKey}) => {
|
terminal.on('key', (char, {keyCode, shiftKey}) => {
|
||||||
|
|
@ -86,7 +85,6 @@ function create(callback) {
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('connect', exec.with(authCheck, socket));
|
socket.on('connect', exec.with(authCheck, socket));
|
||||||
|
|
||||||
exec(callback);
|
exec(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,10 +102,8 @@ function show(callback) {
|
||||||
|
|
||||||
CloudCmd.View.show(Element, {
|
CloudCmd.View.show(Element, {
|
||||||
afterShow: () => {
|
afterShow: () => {
|
||||||
if (Terminal) {
|
if (Terminal)
|
||||||
Terminal.fit(); // lines corrupt without
|
|
||||||
Terminal.focus();
|
Terminal.focus();
|
||||||
}
|
|
||||||
|
|
||||||
exec(callback);
|
exec(callback);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,5 @@
|
||||||
@import './help.css';
|
@import './help.css';
|
||||||
@import './query.css';
|
@import './query.css';
|
||||||
@import './supports.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