mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-22 20:04:19 +01:00
Decrease the brightness of colors
This commit is contained in:
@@ -10,7 +10,7 @@ html, body {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: #101010;
|
background-color: #2b2b2b;
|
||||||
}
|
}
|
||||||
|
|
||||||
#modal strong {
|
#modal strong {
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ function handleSend(zsession) {
|
|||||||
zsession.close.bind(zsession),
|
zsession.close.bind(zsession),
|
||||||
console.error.bind(console)
|
console.error.bind(console)
|
||||||
).then(function () {
|
).then(function () {
|
||||||
hideModal();
|
|
||||||
res();
|
res();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -134,7 +133,6 @@ function handleReceive(zsession) {
|
|||||||
});
|
});
|
||||||
var promise = new Promise(function (res) {
|
var promise = new Promise(function (res) {
|
||||||
zsession.on('session_end', function () {
|
zsession.on('session_end', function () {
|
||||||
hideModal();
|
|
||||||
res();
|
res();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -184,12 +182,12 @@ var openWs = function() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
on_detect: function _on_detect(detection) {
|
on_detect: function _on_detect(detection) {
|
||||||
term.off('data');
|
term.setOption('disableStdin', true);
|
||||||
var zsession = detection.confirm();
|
var zsession = detection.confirm();
|
||||||
var promise = zsession.type === 'send' ? handleSend(zsession) : handleReceive(zsession);
|
var promise = zsession.type === 'send' ? handleSend(zsession) : handleReceive(zsession);
|
||||||
promise.catch(console.error.bind(console)).then(function () {
|
promise.catch(console.error.bind(console)).then(function () {
|
||||||
hideModal();
|
hideModal();
|
||||||
term.on('data', sendData);
|
term.setOption('disableStdin', false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -212,10 +210,10 @@ var openWs = function() {
|
|||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontFamily: '"Menlo for Powerline", Menlo, Consolas, "Liberation Mono", Courier, monospace',
|
fontFamily: '"Menlo for Powerline", Menlo, Consolas, "Liberation Mono", Courier, monospace',
|
||||||
theme: {
|
theme: {
|
||||||
foreground: '#f0f0f0',
|
foreground: '#d2d2d2',
|
||||||
background: '#101010',
|
background: '#2b2b2b',
|
||||||
cursor: '#f0f0f0',
|
cursor: '#adadad',
|
||||||
black: '#1a1a1a',
|
black: '#000000',
|
||||||
red: '#d81e00',
|
red: '#d81e00',
|
||||||
green: '#5ea702',
|
green: '#5ea702',
|
||||||
yellow: '#cfae00',
|
yellow: '#cfae00',
|
||||||
@@ -265,8 +263,9 @@ var openWs = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ws.onmessage = function(event) {
|
ws.onmessage = function(event) {
|
||||||
var cmd = String.fromCharCode(new Uint8Array(event.data)[0]),
|
var rawData = new Uint8Array(event.data),
|
||||||
data = event.data.slice(1);
|
cmd = String.fromCharCode(rawData[0]),
|
||||||
|
data = rawData.slice(1).buffer;
|
||||||
switch(cmd) {
|
switch(cmd) {
|
||||||
case '0':
|
case '0':
|
||||||
zsentry.consume(data);
|
zsentry.consume(data);
|
||||||
|
|||||||
4
src/index.html
vendored
4
src/index.html
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user