mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-15 17:09:59 +00:00
made warning when closing SSH tabs optional - fixes #2801
This commit is contained in:
parent
2745896ec3
commit
4eefab5655
@ -38,7 +38,7 @@ export interface SSHConnection {
|
|||||||
disableDynamicTitle?: boolean
|
disableDynamicTitle?: boolean
|
||||||
jumpHost?: string
|
jumpHost?: string
|
||||||
agentForward?: boolean
|
agentForward?: boolean
|
||||||
|
warnOnClose?: boolean
|
||||||
algorithms?: {[t: string]: string[]}
|
algorithms?: {[t: string]: string[]}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
h3 Connections
|
h3 Connections
|
||||||
|
|
||||||
.list-group.list-group-flush.mt-3.mb-3
|
.list-group.list-group-flush.mt-3.mb-3
|
||||||
ng-container(*ngFor='let group of childGroups')
|
ng-container(*ngFor='let group of childGroups')
|
||||||
.list-group-item.list-group-item-action.d-flex.align-items-center(
|
.list-group-item.list-group-item-action.d-flex.align-items-center(
|
||||||
(click)='groupCollapsed[group.name] = !groupCollapsed[group.name]'
|
(click)='groupCollapsed[group.name] = !groupCollapsed[group.name]'
|
||||||
)
|
)
|
||||||
@ -22,7 +22,17 @@ h3 Connections
|
|||||||
.text-muted {{connection.host}}
|
.text-muted {{connection.host}}
|
||||||
button.btn.btn-outline-danger.ml-1((click)='$event.stopPropagation(); deleteConnection(connection)')
|
button.btn.btn-outline-danger.ml-1((click)='$event.stopPropagation(); deleteConnection(connection)')
|
||||||
i.fas.fa-trash
|
i.fas.fa-trash
|
||||||
|
|
||||||
button.btn.btn-primary((click)='createConnection()')
|
button.btn.btn-primary((click)='createConnection()')
|
||||||
i.fas.fa-fw.fa-plus
|
i.fas.fa-fw.fa-plus
|
||||||
span.ml-2 Add connection
|
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()',
|
||||||
|
)
|
||||||
|
@ -163,6 +163,9 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
|
|||||||
if (!this.session?.open) {
|
if (!this.session?.open) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if (!(this.connection.warnOnClose ?? this.config.store.ssh.warnOnClose)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return (await this.electron.showMessageBox(
|
return (await this.electron.showMessageBox(
|
||||||
this.hostApp.getWindow(),
|
this.hostApp.getWindow(),
|
||||||
{
|
{
|
||||||
|
@ -6,8 +6,7 @@ export class SSHConfigProvider extends ConfigProvider {
|
|||||||
ssh: {
|
ssh: {
|
||||||
connections: [],
|
connections: [],
|
||||||
recentConnections: [],
|
recentConnections: [],
|
||||||
options: {
|
warnOnClose: false,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
hotkeys: {
|
hotkeys: {
|
||||||
ssh: [
|
ssh: [
|
||||||
|
@ -27,6 +27,9 @@ h3.mb-3 Appearance
|
|||||||
(ngModelChange)='config.save()',
|
(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')
|
color-scheme-preview([scheme]='config.store.terminal.colorScheme', [fontPreview]='true')
|
||||||
|
|
||||||
.form-line
|
.form-line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user