1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00: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> <header>
<div class="left"> <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>
<div class="center"> <div class="center">
<span class="title">{{'currentTab' | i18n}}</span> <span class="title">{{'currentTab' | i18n}}</span>
</div> </div>
<div class="right"> <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> <i class="fa fa-plus fa-lg"></i>
</button> </button>
</div> </div>

View File

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