fix bug
This commit is contained in:
@@ -457,6 +457,7 @@ 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);
|
||||||
|
if(!this.connectStatus){
|
||||||
fetch('http://' + options.get('domain') + ':'+ options.get('port') +'/' +
|
fetch('http://' + options.get('domain') + ':'+ options.get('port') +'/' +
|
||||||
options.get('user') +
|
options.get('user') +
|
||||||
'/' +
|
'/' +
|
||||||
@@ -472,6 +473,8 @@ export class Xterm {
|
|||||||
console.error('[ttyd] Failed to send output:', 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++){
|
||||||
this.sendData(this.postAttachCommand[i]+"\n");
|
this.sendData(this.postAttachCommand[i]+"\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user