1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-18 11:05:41 +01:00

popout and refresh logic

This commit is contained in:
Kyle Spearrin 2018-04-06 14:18:28 -04:00
parent 9c60be722b
commit 1a9cbb03e0
2 changed files with 12 additions and 5 deletions

View File

@ -1,12 +1,15 @@
<header>
<div class="left">
<app-pop-out></app-pop-out>
<app-pop-out *ngIf="showPopout"></app-pop-out>
<button type="button" appBlurClick (click)="refresh()" title="{{'refresh' | i18n}}" *ngIf="inSidebar">
<i class="fa fa-refresh fa-lg"></i>
</button>
</div>
<div class="center">
<span class="title">{{'currentTab' | i18n}}</span>
</div>
<div class="right">
<button appBlurClick (click)="addCipher()" title="{{'addItem' | i18n}}">
<button type="button" appBlurClick (click)="addCipher()" title="{{'addItem' | i18n}}">
<i class="fa fa-plus fa-lg"></i>
</button>
</div>

View File

@ -33,9 +33,9 @@ import { PopupUtilsService } from '../services/popup-utils.service';
})
export class CurrentTabComponent implements OnInit {
pageDetails: any[] = [];
cardCiphers: CipherView[] = [];
identityCiphers: CipherView[] = [];
loginCiphers: CipherView[] = [];
cardCiphers: CipherView[];
identityCiphers: CipherView[];
loginCiphers: CipherView[];
url: string;
domain: string;
canAutofill = false;
@ -127,6 +127,10 @@ export class CurrentTabComponent implements OnInit {
CipherType.Identity,
]);
this.loginCiphers = [];
this.cardCiphers = [];
this.identityCiphers = [];
ciphers.forEach((c) => {
switch (c.type) {
case CipherType.Login: