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

45 lines
1.1 KiB
TypeScript
Raw Normal View History

2018-04-05 23:27:31 +02:00
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',
2018-04-06 17:48:45 +02:00
templateUrl: 'ciphers-list.component.html',
2018-04-05 23:27:31 +02:00
})
export class CiphersListComponent {
@Output() onSelected = new EventEmitter<CipherView>();
2018-04-06 20:03:35 +02:00
@Output() onView = new EventEmitter<CipherView>();
2018-04-05 23:27:31 +02:00
@Input() ciphers: CipherView[];
2018-04-06 20:03:35 +02:00
@Input() showView = false;
2018-04-05 23:27:31 +02:00
@Input() title: string;
cipherType = CipherType;
constructor() { }
selectCipher(c: CipherView) {
this.onSelected.emit(c);
}
2018-04-06 20:03:35 +02:00
viewCipher(c: CipherView) {
this.onView.emit(c);
}
2018-04-05 23:27:31 +02:00
}