made warning when closing SSH tabs optional - fixes #2801

This commit is contained in:
Eugene Pankov 2020-08-15 21:07:35 +02:00
parent 2745896ec3
commit 4eefab5655
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
5 changed files with 20 additions and 5 deletions

View File

@ -38,7 +38,7 @@ export interface SSHConnection {
disableDynamicTitle?: boolean
jumpHost?: string
agentForward?: boolean
warnOnClose?: boolean
algorithms?: {[t: string]: string[]}
}

View File

@ -26,3 +26,13 @@ h3 Connections
button.btn.btn-primary((click)='createConnection()')
i.fas.fa-fw.fa-plus
span.ml-2 Add connection
h3.mt-5 Options
.form-line
.header
.title Warn when closing active connections
toggle(
[(ngModel)]='config.store.ssh.warnOnClose',
(ngModelChange)='config.save()',
)

View File

@ -163,6 +163,9 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
if (!this.session?.open) {
return true
}
if (!(this.connection.warnOnClose ?? this.config.store.ssh.warnOnClose)) {
return true
}
return (await this.electron.showMessageBox(
this.hostApp.getWindow(),
{

View File

@ -6,8 +6,7 @@ export class SSHConfigProvider extends ConfigProvider {
ssh: {
connections: [],
recentConnections: [],
options: {
},
warnOnClose: false,
},
hotkeys: {
ssh: [

View File

@ -27,6 +27,9 @@ h3.mb-3 Appearance
(ngModelChange)='config.save()',
)
.alert.alert-info.d-flex.align-items-center(*ngIf='config.store.terminal.ligatures && config.store.terminal.frontend == "xterm-webgl"') Ligatures are not supported by the WebGL frontend
color-scheme-preview([scheme]='config.store.terminal.colorScheme', [fontPreview]='true')
.form-line