1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

search ciphers and cleanup ciphers header

This commit is contained in:
Kyle Spearrin
2018-01-29 21:41:00 -05:00
parent ae37dc63ea
commit 6fbe640d15
5 changed files with 45 additions and 86 deletions

View File

@@ -1,17 +1,12 @@
<div class="header header-search">
<div class="search">
<input type="search" placeholder="{{'searchVault' | i18n}}" id="search" />
<input type="search" placeholder="{{'searchVault' | i18n}}" id="search" [(ngModel)]="searchText" />
<i class="fa fa-search"></i>
</div>
<div class="right">
<a href="" title="{{'addItem' | i18n}}" appBlurClick appStopClick (click)="addCipher()">
<i class="fa fa-plus fa-lg"></i>
</a>
</div>
</div>
<div class="content">
<div class="list">
<a *ngFor="let c of ciphers" appStopClick (click)="cipherClicked(c)"
<a *ngFor="let c of ciphers | searchCiphers: searchText" appStopClick (click)="cipherClicked(c)"
href="#" title="{{'viewItem' | i18n}}" [ngClass]="{'active': c.id === activeCipherId}">
<app-vault-icon [cipher]="c"></app-vault-icon>
<span class="text">

View File

@@ -22,6 +22,7 @@ export class CiphersComponent implements OnInit {
@Output() onAddCipher = new EventEmitter();
ciphers: CipherView[] = [];
searchText: string;
private filter: (cipher: CipherView) => boolean = null;
constructor(private cipherService: CipherService) {