mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-07 11:34:05 +08:00
update files
This commit is contained in:
parent
b4ab13c0f4
commit
4ab4f07b0f
@ -56,30 +56,17 @@ function createXTerm(name, xtermNode){
|
|||||||
var xterm;
|
var xterm;
|
||||||
var runtime = window.AppRuntime[name];
|
var runtime = window.AppRuntime[name];
|
||||||
|
|
||||||
if (Terminal.focus && Terminal.focus.screen) {
|
|
||||||
xtermNode.removeChild(Terminal.focus.screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runtime) {
|
if (runtime) {
|
||||||
xterm = runtime.xterm;
|
xterm = runtime.xterm;
|
||||||
} else {
|
} else {
|
||||||
xterm = new Terminal({
|
xterm = new Terminal(80, 60, 60);
|
||||||
rows: 66,
|
|
||||||
scrollback: 66,
|
|
||||||
convertEOL: true,
|
|
||||||
fgColor: 'inherit',
|
|
||||||
bgColor: 'transparent'
|
|
||||||
});
|
|
||||||
|
|
||||||
xterm.open();
|
|
||||||
|
|
||||||
window.AppRuntime[name] = {
|
window.AppRuntime[name] = {
|
||||||
xterm: xterm
|
xterm: xterm
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
xterm.focus();
|
xtermNode.innerHTML = xterm.toString('html');
|
||||||
xtermNode.appendChild(xterm.screen);
|
|
||||||
scroll(xterm, xtermNode);
|
scroll(xterm, xtermNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +163,6 @@ module.exports = Vue.component('app-main', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function (){
|
created: function (){
|
||||||
var step = 0;
|
|
||||||
var context = this;
|
var context = this;
|
||||||
|
|
||||||
document.addEventListener('click', function (event){
|
document.addEventListener('click', function (event){
|
||||||
@ -190,17 +176,11 @@ module.exports = Vue.component('app-main', {
|
|||||||
var runtime = window.AppRuntime[project.name];
|
var runtime = window.AppRuntime[project.name];
|
||||||
|
|
||||||
if (runtime) {
|
if (runtime) {
|
||||||
step++;
|
|
||||||
|
|
||||||
setTimeout(function (){
|
runtime.xterm.write(data + '');
|
||||||
step--;
|
|
||||||
|
|
||||||
runtime.xterm.write(data + '');
|
if (project.name === context.project.name) {
|
||||||
|
}
|
||||||
if (project.name === context.project.name) {
|
|
||||||
scroll(runtime.xterm, context.$els.terminal);
|
|
||||||
}
|
|
||||||
}, step * 16);
|
|
||||||
} else {
|
} else {
|
||||||
event.sender.send('emulator', project, 'stop');
|
event.sender.send('emulator', project, 'stop');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user