Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update dependencies, fixes #7.

  • Loading branch information...
commit f971585702b417d43d26a5cfd6064ead426cfaf0 1 parent 2a3e3cf
Thai Pangsakulyanont authored
2  component.json
View
@@ -2,7 +2,7 @@
"name": "ttycast",
"version": "0.0.0",
"dependencies": {
- "ttycast-client": "git://github.com/dtinth/ttycast-client.git#~0.1.2"
+ "ttycast-client": "git://github.com/dtinth/ttycast-client.git#~0.1.3"
},
"private": true
}
2  package.json
View
@@ -7,7 +7,7 @@
"connect": "~2.7.2",
"socket.io": "~0.9.13",
"commander": "~1.1.1",
- "headless-terminal": "0.0.3",
+ "headless-terminal": "~0.1.1",
"send": "*"
},
"bin": {
11 static/components/ttycast-client/colors.js
View
@@ -41,10 +41,17 @@
return c.length < 2 ? '0' + c : c;
}
+ function color(i, bg, fg) {
+ css += '.terminal .bg-' + i + ' { background-color: ' + bg + '; }\n'
+ css += '.terminal .fg-' + i + ' { color: ' + fg + '; }\n'
+ }
+
for (i = 0; i < colors.length; i ++) {
- css += '.terminal .bg-' + i + ' { background-color: ' + colors[i] + '; }\n'
- css += '.terminal .fg-' + i + ' { color: ' + colors[i] + '; }\n'
+ color(i, colors[i], colors[i])
}
+ color('default-bg', '#000000', '#000000')
+ color('default-fg', '#f0f0f0', '#f0f0f0')
+
for (i = 0; i < 8; i ++) {
css += '.terminal .bold.fg-' + i + ' { color: ' + colors[i + 8] + '; }\n'
}
6 static/components/ttycast-client/component.json
View
@@ -1,6 +1,6 @@
{
"name": "ttycast-client",
- "version": "0.1.2",
+ "version": "0.1.3",
"main": [
"./display-buffer.js",
"./ttycast.css",
@@ -9,10 +9,10 @@
"dependencies": {
"screen-buffer": "dtinth/screen-buffer#~0.1.2"
},
- "gitHead": "fdf9f6d1dfb692767c475608bbdae15fb4d96d1c",
+ "gitHead": "e71e929ba46aea4185480378e57f445013090880",
"readme": "client side part of ttycast\n",
"readmeFilename": "README.md",
- "_id": "ttycast-client@0.1.2",
+ "_id": "ttycast-client@0.1.3",
"description": "client side part of ttycast",
"repository": {
"type": "git",
9 static/components/ttycast-client/display-buffer.js
View
@@ -72,13 +72,20 @@ function DisplayBuffer(el) {
classes.push('cursor')
}
if (attr == -1) {
- classes.push('reverse-video')
+ classes.push('inverse')
} else {
var bg = attr & 0x1ff
, fg = (attr >> 9) & 0x1ff
, flags = attr >> 18
if (flags & 1) classes.push('bold')
if (flags & 2) classes.push('underline')
+ if (bg > 255) bg = 'default-bg'
+ if (fg > 255) fg = 'default-fg'
+ if (flags & 4) {
+ var tmp = bg
+ bg = fg
+ fg = tmp
+ }
classes.push('bg-' + bg)
classes.push('fg-' + fg)
}
Please sign in to comment.
Something went wrong with that request. Please try again.