mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-28 02:12:43 +08:00
update files
This commit is contained in:
parent
a77c63998e
commit
12a617fce5
@ -494,3 +494,7 @@ header [class*=" icon-"] {
|
||||
height: calc(100% - 32px);
|
||||
background: url(../images/no-data.png) center no-repeat;
|
||||
}
|
||||
.ui-terminal-cursor {
|
||||
color: #181818;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ module.exports = Vue.component('app-main', {
|
||||
'',
|
||||
' \u001b[31mreturn\u001b[39m \u001b[37mhypernal\u001b[39m\u001b[90m;\u001b[39m',
|
||||
'\u001b[33m}\u001b[39m\u001b[90m;\u001b[39m',
|
||||
new Date().toISOString()
|
||||
new Date().toISOString() + '\r\n'
|
||||
].join('\r\n');
|
||||
|
||||
if (!runtime) {
|
||||
@ -126,8 +126,8 @@ module.exports = Vue.component('app-main', {
|
||||
|
||||
xterm.open();
|
||||
xtermNode.appendChild(xterm.element);
|
||||
xterm.showCursor();
|
||||
xterm.startBlink();
|
||||
xterm.focus();
|
||||
//xterm.startBlink();
|
||||
|
||||
console.log(xterm);
|
||||
|
||||
|
@ -97,6 +97,7 @@ require('./lib/range')(Terminal);
|
||||
require('./lib/util')(Terminal);
|
||||
|
||||
require('./lib/cursor')(Terminal);
|
||||
require('./lib/focused')(Terminal);
|
||||
|
||||
require('./lib/scrollDisp')(Terminal);
|
||||
|
||||
|
30
static/js/terminal/lib/focused.js
Normal file
30
static/js/terminal/lib/focused.js
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Created by nuintun on 2015/11/25.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function (Terminal){
|
||||
Terminal.focus = null;
|
||||
|
||||
Terminal.prototype.focus = function (){
|
||||
if (Terminal.focus === this) return;
|
||||
|
||||
if (Terminal.focus) {
|
||||
Terminal.focus.blur();
|
||||
}
|
||||
|
||||
this.showCursor();
|
||||
|
||||
Terminal.focus = this;
|
||||
};
|
||||
|
||||
Terminal.prototype.blur = function (){
|
||||
if (Terminal.focus !== this) return;
|
||||
|
||||
this.cursorState = 0;
|
||||
this.refresh(this.y, this.y);
|
||||
|
||||
Terminal.focus = null;
|
||||
};
|
||||
};
|
@ -33,7 +33,7 @@ module.exports = function (Terminal){
|
||||
var div;
|
||||
|
||||
this.element = document.createElement('div');
|
||||
this.element.className = 'terminal';
|
||||
this.element.className = 'ui-terminal';
|
||||
this.children = [];
|
||||
|
||||
for (; i < this.rows; i++) {
|
||||
|
@ -58,7 +58,7 @@ module.exports = function (Terminal){
|
||||
|
||||
if (data !== this.defAttr) {
|
||||
if (data === -1) {
|
||||
out += '<span class="reverse-video">';
|
||||
out += '<span class="ui-terminal-reverse ui-terminal-cursor">';
|
||||
} else {
|
||||
out += '<span style="';
|
||||
bgColor = data & 0x1ff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user