/
githubmirror
/
tabby
Обзор
Документация
Войти
/
githubmirror
/
tabby
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tabby-settings/src/components/showSecretModal.component.ts
27 строк
735 B
Sibren van Setten
Fix lint errors
30 авг 2023, 14:16
30 авг 2023, 14:16
26ac6b0
Код
Авторство
О чём код?
import { Component, Input } from '@angular/core' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { NotificationsService, VaultFileSecret } from 'tabby-core' /** @hidden */ @Component({ templateUrl: './showSecretModal.component.pug', }) export class ShowSecretModalComponent { @Input() title: string @Input() secret: VaultFileSecret constructor ( public modalInstance: NgbActiveModal, private notifications: NotificationsService, ) { } close (): void { this.modalInstance.dismiss() } copySecret (): void { navigator.clipboard.writeText(this.secret.value) // Show a notification this.notifications.info('Copied to clipboard') } }