1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00
Files
browser/src/popup/app/components/cipher-items.component.ts
2017-12-06 14:23:34 -05:00

32 lines
662 B
TypeScript

import * as template from './cipher-items.component.html';
export class CipherItemsController implements ng.IController {
onSelected: Function;
onView: Function;
i18n: any;
constructor(private i18nService: any) {
this.i18n = i18nService;
}
view(cipher: any) {
return this.onView({ cipher: cipher });
}
select(cipher: any) {
return this.onSelected({ cipher: cipher });
}
}
export const CipherItemsComponent = {
bindings: {
ciphers: '<',
selectionTitle: '<',
onSelected: '&',
onView: '&',
},
controller: CipherItemsController,
template: template,
};