1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-20 03:01:46 +02:00

loaded so that we dont see a flash of no items

This commit is contained in:
Kyle Spearrin 2018-01-31 21:59:39 -05:00
parent 77d1d272cc
commit 1925f74cb5
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@
<span class="detail">{{c.subTitle}}</span> <span class="detail">{{c.subTitle}}</span>
</a> </a>
</div> </div>
<div *ngIf="searchedCiphers.length === 0" class="no-items"> <div *ngIf="loaded && searchedCiphers.length === 0" class="no-items">
<i class="fa fa-frown-o fa-4x"></i> <i class="fa fa-frown-o fa-4x"></i>
<p>{{'noItemsInList' | i18n}}</p> <p>{{'noItemsInList' | i18n}}</p>
<button (click)="addCipher()" class="btn block primary link">{{'addItem' | i18n}}</button> <button (click)="addCipher()" class="btn block primary link">{{'addItem' | i18n}}</button>

View File

@ -20,6 +20,7 @@ export class CiphersComponent {
@Output() onCipherClicked = new EventEmitter<CipherView>(); @Output() onCipherClicked = new EventEmitter<CipherView>();
@Output() onAddCipher = new EventEmitter(); @Output() onAddCipher = new EventEmitter();
loaded: boolean = false;
ciphers: CipherView[] = []; ciphers: CipherView[] = [];
searchText: string; searchText: string;
searchPlaceholder: string = null; searchPlaceholder: string = null;
@ -36,6 +37,8 @@ export class CiphersComponent {
} else { } else {
this.ciphers = ciphers.filter(this.filter); this.ciphers = ciphers.filter(this.filter);
} }
this.loaded = true;
} }
async refresh() { async refresh() {