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

@@ -16,8 +16,9 @@ export interface SessionOptions {
}
export interface Profile {
name: string,
sessionOptions: SessionOptions,
name: string
color?: string
sessionOptions: SessionOptions
isBuiltin?: boolean
icon?: string
}

View File

@@ -53,6 +53,15 @@
[(model)]='profile.sessionOptions.env',
)
.form-group
label Tab color
input.form-control(
type='text',
autofocus,
[(ngModel)]='profile.color',
placeholder='#000000'
)
.modal-footer
button.btn.btn-outline-primary((click)='save()') Save
button.btn.btn-outline-danger((click)='cancel()') Cancel

View File

@@ -88,7 +88,11 @@ export class TerminalService {
cwd: cwd || undefined,
}
return this.openTabWithOptions(sessionOptions)
const tab = this.openTabWithOptions(sessionOptions)
if (profile?.color) {
(this.app.getParentTab(tab) || tab).color = profile.color
}
return tab
}
optionsFromShell (shell: Shell): SessionOptions {