mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-16 18:06:57 +08:00
update files
This commit is contained in:
parent
e9e39f1eb4
commit
9bef05d523
@ -10,11 +10,6 @@ var util = require('../../util');
|
|||||||
var Vue = require('../../vue/vue');
|
var Vue = require('../../vue/vue');
|
||||||
var Terminal = require('../../terminal');
|
var Terminal = require('../../terminal');
|
||||||
|
|
||||||
Terminal.defaultColors = {
|
|
||||||
bg: 'transparent',
|
|
||||||
fg: 'inherit'
|
|
||||||
};
|
|
||||||
|
|
||||||
const EMPTYPROJECT = {
|
const EMPTYPROJECT = {
|
||||||
name: '',
|
name: '',
|
||||||
path: '',
|
path: '',
|
||||||
@ -85,8 +80,6 @@ module.exports = Vue.component('app-main', {
|
|||||||
|
|
||||||
},
|
},
|
||||||
exec: function (name, command){
|
exec: function (name, command){
|
||||||
console.log('run %s: %s', name, command);
|
|
||||||
|
|
||||||
var xtermNode = this.$els.terminal;
|
var xtermNode = this.$els.terminal;
|
||||||
var runtime = window.AppRuntime[this.project.name];
|
var runtime = window.AppRuntime[this.project.name];
|
||||||
|
|
||||||
@ -122,7 +115,11 @@ module.exports = Vue.component('app-main', {
|
|||||||
].join('\r\n');
|
].join('\r\n');
|
||||||
|
|
||||||
if (!runtime) {
|
if (!runtime) {
|
||||||
var xterm = new Terminal();
|
var xterm = new Terminal({
|
||||||
|
debug: true,
|
||||||
|
bgColor: 'transparent',
|
||||||
|
fgColor: 'inherit'
|
||||||
|
});
|
||||||
|
|
||||||
xterm.open();
|
xterm.open();
|
||||||
xtermNode.appendChild(xterm.element);
|
xtermNode.appendChild(xterm.element);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
module.exports = function (Terminal){
|
module.exports = function (Terminal){
|
||||||
Terminal.prototype.log = function (){
|
Terminal.prototype.log = function (){
|
||||||
if (!Terminal.debug) return;
|
if (!this.debug) return;
|
||||||
|
|
||||||
if (!window.console || !window.console.log) return;
|
if (!window.console || !window.console.log) return;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ module.exports = function (Terminal){
|
|||||||
};
|
};
|
||||||
|
|
||||||
Terminal.prototype.error = function (){
|
Terminal.prototype.error = function (){
|
||||||
if (!Terminal.debug) return;
|
if (!this.debug) return;
|
||||||
|
|
||||||
if (!window.console || !window.console.error) return;
|
if (!window.console || !window.console.error) return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user