mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-17 09:59:58 +00:00
37 lines
896 B
TypeScript
37 lines
896 B
TypeScript
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
import { Component } from '@angular/core'
|
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
|
import { UACService } from '../services/uac.service'
|
|
import { Profile } from '../api'
|
|
|
|
/** @hidden */
|
|
@Component({
|
|
template: require('./editProfileModal.component.pug'),
|
|
})
|
|
export class EditProfileModalComponent {
|
|
profile: Profile
|
|
|
|
constructor (
|
|
public uac: UACService,
|
|
private modalInstance: NgbActiveModal,
|
|
) {
|
|
}
|
|
|
|
ngOnInit () {
|
|
this.profile.sessionOptions.env = this.profile.sessionOptions.env ?? {}
|
|
this.profile.sessionOptions.args = this.profile.sessionOptions.args ?? []
|
|
}
|
|
|
|
save () {
|
|
this.modalInstance.close(this.profile)
|
|
}
|
|
|
|
cancel () {
|
|
this.modalInstance.dismiss()
|
|
}
|
|
|
|
trackByIndex (index) {
|
|
return index
|
|
}
|
|
}
|