mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-24 19:13:31 +03:00
profile args editor
This commit is contained in:
parent
8a3906687a
commit
9ef3cbc177
@ -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
|
||||
|
@ -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(
|
||||
|
@ -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 () {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user