1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-24 06:04:04 +03:00

profile args editor

This commit is contained in:
Eugene Pankov 2018-12-21 20:06:03 +01:00
parent 8a3906687a
commit 9ef3cbc177
4 changed files with 26 additions and 4 deletions

View File

@ -14,8 +14,8 @@ export interface ResizeEvent {
export interface SessionOptions {
name?: string
command?: string
args?: string[]
command: string
args: string[]
cwd?: string
env?: any
width?: number

View File

@ -13,7 +13,25 @@
type='text',
[(ngModel)]='profile.sessionOptions.command',
)
.form-group
label Arguments
.input-group(
*ngFor='let arg of profile.sessionOptions.args; index as i',
)
input.form-control(
type='text',
[(ngModel)]='profile.sessionOptions.args[i]',
)
.input-group-btn
button.btn.btn-secondary((click)='profile.sessionOptions.args.splice(i, 1)')
i.fa.fa-trash-o
.mt-2
button.btn.btn-secondary((click)='profile.sessionOptions.args.push("")')
i.fa.fa-plus.mr-2
| Add
.form-group
label Working directory
input.form-control(

View File

@ -15,6 +15,7 @@ export class EditProfileModalComponent {
ngOnInit () {
this.profile.sessionOptions.env = this.profile.sessionOptions.env || {}
this.profile.sessionOptions.args = this.profile.sessionOptions.args || []
}
save () {

View File

@ -1,5 +1,8 @@
.mb-2.d-flex.align-items-center(*ngFor='let pair of vars')
input.form-control.w-50([(ngModel)]='pair.key', (blur)='emitUpdate()', placeholder='Variable name')
.input-group.w-50
input.form-control([(ngModel)]='pair.key', (blur)='emitUpdate()', placeholder='Variable name')
.input-group-append
.input-group-text =
input.form-control.w-50.mr-1([(ngModel)]='pair.value', (blur)='emitUpdate()', placeholder='Value')
button.btn.btn-secondary((click)='removeEnvironmentVar(pair.key)')
i.fa.fa-trash-o