mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-22 20:40:08 +00:00
30 lines
671 B
TypeScript
30 lines
671 B
TypeScript
import { Component, ViewChild, ElementRef } from '@angular/core'
|
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
|
|
|
/** @hidden */
|
|
@Component({
|
|
template: require('./setVaultPassphraseModal.component.pug'),
|
|
})
|
|
export class SetVaultPassphraseModalComponent {
|
|
passphrase: string
|
|
@ViewChild('input') input: ElementRef
|
|
|
|
constructor (
|
|
private modalInstance: NgbActiveModal,
|
|
) { }
|
|
|
|
ngOnInit (): void {
|
|
setTimeout(() => {
|
|
this.input.nativeElement.focus()
|
|
})
|
|
}
|
|
|
|
ok (): void {
|
|
this.modalInstance.close(this.passphrase)
|
|
}
|
|
|
|
cancel (): void {
|
|
this.modalInstance.close(null)
|
|
}
|
|
}
|