1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

directives

This commit is contained in:
Kyle Spearrin
2018-01-23 23:38:56 -05:00
parent e06704431a
commit 5703782a0f
10 changed files with 59 additions and 3 deletions

View File

@@ -10,7 +10,7 @@
<div class="content">
<div class="list">
<div class="list-section" style="padding-top: 0; padding-bottom: 0;">
<a *ngFor="let cipher of ciphers"
<a *ngFor="let cipher of ciphers" appStopClick (click)="viewCipher(cipher)"
href="#" class="list-section-item condensed" title="View Item">
<app-vault-icon [cipher]="cipher"></app-vault-icon>
<span class="text">

View File

@@ -20,4 +20,8 @@ export class CiphersComponent implements OnChanges {
ngOnChanges() {
}
viewCipher(cipher: any) {
console.log(cipher.id);
}
}

View File

@@ -1,4 +1,4 @@
<div class="icon">
<img [src]="image" *ngIf="imageEnabled && image" alt="" />
<img [src]="image" appFallbackSrc="{{fallbackImage}}" *ngIf="imageEnabled && image" alt="" />
<i class="fa fa-fw fa-lg {{icon}}" *ngIf="!imageEnabled || !image"></i>
</div>

View File

@@ -78,7 +78,7 @@ export class IconComponent implements OnChanges {
try {
const url = new URL(hostnameUri);
this.image = this.iconsUrl + '/' + url.hostname + '/icon.png';
this.fallbackImage = '../images/fa-globe.png'; // TODO?
this.fallbackImage = 'images/fa-globe.png';
} catch (e) { }
}
} else {