1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00
Files
browser/libs/angular/src/vault/components/icon.component.html
Shane Melton 4687120618 [PM-18946] Improve Vault loading experience (#13714)
* [PM-18946] Refactor loading$ in vault-v2. Update icon-component, and build-cipher-icon
2025-03-13 14:38:29 -04:00

20 lines
615 B
HTML

<div class="tw-flex tw-justify-center tw-items-center" aria-hidden="true">
<ng-container *ngIf="data$ | async as data">
<img
[src]="data.image"
*ngIf="data.imageEnabled && data.image"
class="tw-size-6 tw-rounded-md"
alt=""
decoding="async"
loading="lazy"
[ngClass]="{ 'tw-invisible tw-absolute': !imageLoaded() }"
(load)="imageLoaded.set(true)"
(error)="imageLoaded.set(false)"
/>
<i
class="tw-w-6 tw-text-muted bwi bwi-lg {{ data.icon }}"
*ngIf="!data.imageEnabled || !data.image || !imageLoaded()"
></i>
</ng-container>
</div>