diff --git a/terminus-terminal/src/api.ts b/terminus-terminal/src/api.ts index 12eff19d..7d7c7876 100644 --- a/terminus-terminal/src/api.ts +++ b/terminus-terminal/src/api.ts @@ -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 diff --git a/terminus-terminal/src/components/editProfileModal.component.pug b/terminus-terminal/src/components/editProfileModal.component.pug index d42edff5..203d2965 100644 --- a/terminus-terminal/src/components/editProfileModal.component.pug +++ b/terminus-terminal/src/components/editProfileModal.component.pug @@ -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( diff --git a/terminus-terminal/src/components/editProfileModal.component.ts b/terminus-terminal/src/components/editProfileModal.component.ts index 3999552a..1d98d9f3 100644 --- a/terminus-terminal/src/components/editProfileModal.component.ts +++ b/terminus-terminal/src/components/editProfileModal.component.ts @@ -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 () { diff --git a/terminus-terminal/src/components/environmentEditor.component.pug b/terminus-terminal/src/components/environmentEditor.component.pug index cb3e8f0f..d32af006 100644 --- a/terminus-terminal/src/components/environmentEditor.component.pug +++ b/terminus-terminal/src/components/environmentEditor.component.pug @@ -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