mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
directives
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -20,4 +20,8 @@ export class CiphersComponent implements OnChanges {
|
||||
ngOnChanges() {
|
||||
|
||||
}
|
||||
|
||||
viewCipher(cipher: any) {
|
||||
console.log(cipher.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user