mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(terminal) rm additional element
This commit is contained in:
parent
4cb8a57494
commit
ec2591bff2
1 changed files with 3 additions and 9 deletions
|
|
@ -21,7 +21,6 @@ const {Key} = CloudCmd;
|
|||
|
||||
CloudCmd.Terminal = exports;
|
||||
|
||||
let Element;
|
||||
let Loaded;
|
||||
let Terminal;
|
||||
|
||||
|
|
@ -76,11 +75,6 @@ function getEnv() {
|
|||
}
|
||||
|
||||
function create() {
|
||||
Element = load({
|
||||
name: 'div',
|
||||
className : 'terminal',
|
||||
});
|
||||
|
||||
const options = {
|
||||
env: getEnv(),
|
||||
prefix: getPrefix(),
|
||||
|
|
@ -88,7 +82,7 @@ function create() {
|
|||
fontFamily: 'Droid Sans Mono',
|
||||
};
|
||||
|
||||
const {socket, terminal} = gritty(Element, options);
|
||||
const {socket, terminal} = gritty(document.body, options);
|
||||
|
||||
Terminal = terminal;
|
||||
|
||||
|
|
@ -103,7 +97,7 @@ function create() {
|
|||
|
||||
function authCheck(spawn) {
|
||||
spawn.emit('auth', config('username'), config('password'));
|
||||
|
||||
|
||||
spawn.on('reject', () => {
|
||||
Dialog.alert(TITLE, 'Wrong credentials!');
|
||||
});
|
||||
|
|
@ -116,7 +110,7 @@ function show(callback) {
|
|||
if (!config('terminal'))
|
||||
return;
|
||||
|
||||
CloudCmd.View.show(Element, {
|
||||
CloudCmd.View.show(Terminal.element, {
|
||||
afterShow: () => {
|
||||
if (Terminal)
|
||||
Terminal.focus();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue