/
githubmirror
/
tabby
Обзор
Документация
Войти
/
githubmirror
/
tabby
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tabby-settings/src/components/setVaultPassphraseModal.component.ts
30 строк
692 B
Eugene Pankov
lint
10 апр 2023, 22:21
Не верифицирован
10 апр 2023, 22:21
3b8ca0d
Код
Авторство
О чём код?
import { Component, ViewChild, ElementRef } from '@angular/core' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' /** @hidden */ @Component({ templateUrl: './setVaultPassphraseModal.component.pug', }) export class SetVaultPassphraseModalComponent { passphrase: string showPassphrase = false @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) } }