mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-08 12:14:03 +08:00
update files
This commit is contained in:
parent
21b15e8a2f
commit
1efef2d5bc
@ -111,8 +111,8 @@ module.exports = Vue.component('app-main', {
|
|||||||
'',
|
'',
|
||||||
' \u001b[31mreturn\u001b[39m \u001b[37mhypernal\u001b[39m\u001b[90m;\u001b[39m',
|
' \u001b[31mreturn\u001b[39m \u001b[37mhypernal\u001b[39m\u001b[90m;\u001b[39m',
|
||||||
'\u001b[33m}\u001b[39m\u001b[90m;\u001b[39m',
|
'\u001b[33m}\u001b[39m\u001b[90m;\u001b[39m',
|
||||||
new Date().toISOString() + '\r\n'
|
'2015-11-25T07:58:11.061Z'
|
||||||
].join('\r\n');
|
].join('\n');
|
||||||
|
|
||||||
if (!runtime) {
|
if (!runtime) {
|
||||||
var xterm = new Terminal({
|
var xterm = new Terminal({
|
||||||
@ -128,7 +128,7 @@ module.exports = Vue.component('app-main', {
|
|||||||
|
|
||||||
//console.log(xterm);
|
//console.log(xterm);
|
||||||
|
|
||||||
xterm.write(test);
|
xterm.write('2015-11-25T07:58:11.061Z');
|
||||||
//scroll(xtermNode);
|
//scroll(xtermNode);
|
||||||
|
|
||||||
window.xterm = xterm;
|
window.xterm = xterm;
|
||||||
|
@ -56,7 +56,7 @@ function Terminal(options){
|
|||||||
options.handler = typeof options.handler === 'function' ? options.handler : function (){};
|
options.handler = typeof options.handler === 'function' ? options.handler : function (){};
|
||||||
this.handler = options.handler;
|
this.handler = options.handler;
|
||||||
|
|
||||||
options.convertEol = options.convertEol === false;
|
options.convertEol = options.convertEol !== false;
|
||||||
this.convertEol = options.convertEol;
|
this.convertEol = options.convertEol;
|
||||||
|
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
@ -6,10 +6,6 @@
|
|||||||
|
|
||||||
var states = require('./states');
|
var states = require('./states');
|
||||||
|
|
||||||
function fixLinefeed(data){
|
|
||||||
return data.replace(/([^\r])\n/g, '$1\r\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = function (Terminal){
|
module.exports = function (Terminal){
|
||||||
Terminal.prototype.send = function (data){
|
Terminal.prototype.send = function (data){
|
||||||
var context = this;
|
var context = this;
|
||||||
@ -44,8 +40,6 @@ module.exports = function (Terminal){
|
|||||||
};
|
};
|
||||||
|
|
||||||
Terminal.prototype.write = function (data){
|
Terminal.prototype.write = function (data){
|
||||||
data = fixLinefeed(data);
|
|
||||||
|
|
||||||
var l = data.length;
|
var l = data.length;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var ch = null;
|
var ch = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user