bitwarden-estensione-browser/src/popup2/components/ciphers-list.component.ts

41 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-04-05 23:27:31 +02:00
import * as template from './ciphers-list.component.html';
import {
Component,
EventEmitter,
Input,
Output,
} from '@angular/core';
import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
import { BrowserApi } from '../../browser/browserApi';
import { CipherType } from 'jslib/enums/cipherType';
import { CipherView } from 'jslib/models/view/cipherView';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { PopupUtilsService } from '../services/popup-utils.service';
@Component({
selector: 'app-ciphers-list',
template: template,
})
export class CiphersListComponent {
@Output() onSelected = new EventEmitter<CipherView>();
@Input() ciphers: CipherView[];
@Input() showView: boolean = false;
@Input() title: string;
cipherType = CipherType;
constructor() { }
selectCipher(c: CipherView) {
this.onSelected.emit(c);
}
}