fix bug
This commit is contained in:
@@ -457,20 +457,23 @@ export class Xterm {
|
|||||||
!(this.connectStatus === false && (textDecoder.decode(data).includes('\x1b') || textDecoder.decode(data).replace(/\s/g, '').includes('docker')))
|
!(this.connectStatus === false && (textDecoder.decode(data).includes('\x1b') || textDecoder.decode(data).replace(/\s/g, '').includes('docker')))
|
||||||
){
|
){
|
||||||
this.writeFunc(data);
|
this.writeFunc(data);
|
||||||
fetch('http://' + options.get('domain') + ':'+ options.get('port') +'/' +
|
if(!this.connectStatus){
|
||||||
options.get('user') +
|
fetch('http://' + options.get('domain') + ':'+ options.get('port') +'/' +
|
||||||
'/' +
|
options.get('user') +
|
||||||
options.get('repo') +
|
'/' +
|
||||||
'/devcontainer/output?' +
|
options.get('repo') +
|
||||||
params, {
|
'/devcontainer/output?' +
|
||||||
method: 'POST',
|
params, {
|
||||||
headers: {
|
method: 'POST',
|
||||||
'Content-Type': 'text/plain'
|
headers: {
|
||||||
},
|
'Content-Type': 'text/plain'
|
||||||
body: textDecoder.decode(data),
|
},
|
||||||
}).catch(err => {
|
body: textDecoder.decode(data),
|
||||||
console.error('[ttyd] Failed to send output:', err);
|
}).catch(err => {
|
||||||
});
|
console.error('[ttyd] Failed to send output:', err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.connectStatus && textDecoder.decode(data).replace(/\s/g, '').includes(this.workdir) && !this.postAttachCommandStatus){
|
if (this.connectStatus && textDecoder.decode(data).replace(/\s/g, '').includes(this.workdir) && !this.postAttachCommandStatus){
|
||||||
for (let i = 1; i < this.postAttachCommand.length; i++){
|
for (let i = 1; i < this.postAttachCommand.length; i++){
|
||||||
|
|||||||
Reference in New Issue
Block a user