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>();
|
|
|
|
@Input() ciphers: CipherView[];
|
|
|
|
@Input() showView: boolean = false;
|
|
|
|
@Input() title: string;
|
|
|
|
|
|
|
|
cipherType = CipherType;
|
|
|
|
|
|
|
|
constructor() { }
|
|
|
|
|
|
|
|
selectCipher(c: CipherView) {
|
|
|
|
this.onSelected.emit(c);
|
|
|
|
}
|
|
|
|
}
|