mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-27 06:49:53 +00:00
warn when closing ssh tabs - fixes #2512
This commit is contained in:
parent
328490a85e
commit
95bd48d6c6
@ -153,6 +153,18 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
|
|||||||
this.initializeSession()
|
this.initializeSession()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async canClose (): Promise<boolean> {
|
||||||
|
return (await this.electron.showMessageBox(
|
||||||
|
this.hostApp.getWindow(),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
message: `Disconnect from ${this.connection.host}?`,
|
||||||
|
buttons: ['Cancel', 'Disconnect'],
|
||||||
|
defaultId: 1,
|
||||||
|
}
|
||||||
|
)).response === 1
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy (): void {
|
ngOnDestroy (): void {
|
||||||
this.homeEndSubscription.unsubscribe()
|
this.homeEndSubscription.unsubscribe()
|
||||||
super.ngOnDestroy()
|
super.ngOnDestroy()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user