profile and SSH connection colors (fixes #954)

This commit is contained in:
Eugene Pankov
2020-01-01 01:04:41 +01:00
parent a8d5cf469e
commit 2b5f623b50
7 changed files with 45 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ export interface SSHConnection {
keepaliveInterval?: number
keepaliveCountMax?: number
readyTimeout?: number
color?: string
algorithms?: {[t: string]: string[]}
}

View File

@@ -67,6 +67,17 @@
button.btn.btn-secondary((click)='selectPrivateKey()')
i.fas.fa-folder-open
.form-line
.header
.title Tab color
input.form-control(
type='text',
autofocus,
[(ngModel)]='connection.color',
placeholder='#000000'
)
ngb-tab(id='advanced')
ng-template(ngbTabTitle) Advanced
ng-template(ngbTabContent)

View File

@@ -32,10 +32,14 @@ export class SSHService {
}
async openTab (connection: SSHConnection): Promise<SSHTabComponent> {
return this.zone.run(() => this.app.openNewTab(
const tab = this.zone.run(() => this.app.openNewTab(
SSHTabComponent,
{ connection }
) as SSHTabComponent)
if (connection.color) {
(this.app.getParentTab(tab) || tab).color = connection.color
}
return tab
}
createSession (connection: SSHConnection): SSHSession {