mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 01:17:14 +00:00
parent
9734830a74
commit
a8c7134218
4 changed files with 23 additions and 19 deletions
|
@ -1,10 +1,10 @@
|
|||
.tab-toolbar
|
||||
.tab-toolbar([class.show]='!session || !session.open')
|
||||
.btn.btn-outline-secondary.reveal-button
|
||||
i.fas.fa-ellipsis-h
|
||||
.toolbar([class.show]='!session || !session.open')
|
||||
.toolbar
|
||||
i.fas.fa-circle.text-success.mr-2(*ngIf='session && session.open')
|
||||
i.fas.fa-circle.text-danger.mr-2(*ngIf='!session || !session.open')
|
||||
strong(*ngIf='session') {{session.connection.port}} ({{session.connection.baudrate}})
|
||||
strong {{connection.port}} ({{connection.baudrate}})
|
||||
|
||||
.mr-auto
|
||||
|
||||
|
|
|
@ -97,11 +97,13 @@ export class SerialTabComponent extends BaseTerminalTabComponent {
|
|||
}))
|
||||
this.attachSessionHandler(this.session!.destroyed$.subscribe(() => {
|
||||
this.write('Press any key to reconnect\r\n')
|
||||
this.input$.pipe(first()).subscribe(() => {
|
||||
if (!this.session?.open) {
|
||||
this.reconnect()
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.input$.pipe(first()).subscribe(() => {
|
||||
if (!this.session?.open) {
|
||||
this.reconnect()
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
}))
|
||||
super.attachSessionHandlers()
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
.tab-toolbar
|
||||
.tab-toolbar([class.show]='!session || !session.open')
|
||||
.btn.btn-outline-secondary.reveal-button
|
||||
i.fas.fa-ellipsis-h
|
||||
.toolbar(*ngIf='session', [class.show]='!session.open')
|
||||
i.fas.fa-circle.text-success.mr-2(*ngIf='session.open')
|
||||
i.fas.fa-circle.text-danger.mr-2(*ngIf='!session.open')
|
||||
strong.mr-auto(*ngIf='session') {{session.connection.user}}@{{session.connection.host}}:{{session.connection.port}}
|
||||
.toolbar
|
||||
i.fas.fa-circle.text-success.mr-2(*ngIf='session && session.open')
|
||||
i.fas.fa-circle.text-danger.mr-2(*ngIf='!session || !session.open')
|
||||
strong.mr-auto {{connection.user}}@{{connection.host}}:{{connection.port}}
|
||||
|
||||
button.btn.btn-secondary.mr-2((click)='reconnect()', [class.btn-info]='!session.open')
|
||||
button.btn.btn-secondary.mr-2((click)='reconnect()', [class.btn-info]='!session || !session.open')
|
||||
span Reconnect
|
||||
|
||||
button.btn.btn-secondary((click)='showPortForwarding()', *ngIf='session.open')
|
||||
button.btn.btn-secondary((click)='showPortForwarding()', *ngIf='session && session.open')
|
||||
i.fas.fa-plug
|
||||
span Ports
|
||||
|
|
|
@ -143,7 +143,6 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
|
|||
|
||||
protected attachSessionHandlers (): void {
|
||||
const session = this.session!
|
||||
super.attachSessionHandlers()
|
||||
this.attachSessionHandler(session.destroyed$.subscribe(() => {
|
||||
if (
|
||||
// Ctrl-D
|
||||
|
@ -158,12 +157,15 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
|
|||
if (!this.reconnectOffered) {
|
||||
this.reconnectOffered = true
|
||||
this.write('Press any key to reconnect\r\n')
|
||||
this.attachSessionHandler(this.input$.pipe(first()).subscribe(() => {
|
||||
this.reconnect()
|
||||
}))
|
||||
setTimeout(() => {
|
||||
this.attachSessionHandler(this.input$.pipe(first()).subscribe(() => {
|
||||
this.reconnect()
|
||||
}))
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
}))
|
||||
super.attachSessionHandlers()
|
||||
}
|
||||
|
||||
async initializeSession (): Promise<void> {
|
||||
|
|
Loading…
Reference in a new issue