Merge pull request #1167 from mempool/simon/asset-icons
Display Liquid asset icons
This commit is contained in:
commit
2b1367afd8
@ -35,13 +35,6 @@
|
|||||||
<td i18n="asset.issuance-tx|Liquid Asset issuance TX">Issuance TX</td>
|
<td i18n="asset.issuance-tx|Liquid Asset issuance TX">Issuance TX</td>
|
||||||
<td><a [routerLink]="['/tx/' | relativeUrl, asset.issuance_txin.txid]">{{ asset.issuance_txin.txid | shortenString : 13 }}</a> <app-clipboard class="d-none d-sm-inline-block" [text]="asset.issuance_txin.txid"></app-clipboard></td>
|
<td><a [routerLink]="['/tx/' | relativeUrl, asset.issuance_txin.txid]">{{ asset.issuance_txin.txid | shortenString : 13 }}</a> <app-clipboard class="d-none d-sm-inline-block" [text]="asset.issuance_txin.txid"></app-clipboard></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="w-100 d-block d-md-none"></div>
|
|
||||||
<div class="col">
|
|
||||||
<table class="table table-borderless table-striped">
|
|
||||||
<tbody>
|
|
||||||
<tr *ngIf="isNativeAsset && asset.chain_stats.peg_in_amount">
|
<tr *ngIf="isNativeAsset && asset.chain_stats.peg_in_amount">
|
||||||
<td i18n="asset.pegged-in|Liquid Asset pegged-in amount">Pegged in</td>
|
<td i18n="asset.pegged-in|Liquid Asset pegged-in amount">Pegged in</td>
|
||||||
<td>{{ formatAmount(asset.chain_stats.peg_in_amount, assetContract[3]) | number: '1.0-' + assetContract[3] }} {{ assetContract[1] }}</td>
|
<td>{{ formatAmount(asset.chain_stats.peg_in_amount, assetContract[3]) | number: '1.0-' + assetContract[3] }} {{ assetContract[1] }}</td>
|
||||||
@ -69,6 +62,13 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w-100 d-block d-md-none"></div>
|
||||||
|
<div class="col icon-holder">
|
||||||
|
<img *ngIf="!imageError; else defaultIcon" class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + asset.asset_id + '/icon'" (error)="imageError = true">
|
||||||
|
<ng-template #defaultIcon>
|
||||||
|
<fa-icon [icon]="['fas', 'database']" [fixedWidth]="true" size="10x"></fa-icon>
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,3 +50,17 @@ h1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.assetIcon {
|
||||||
|
max-height: 150px;
|
||||||
|
margin: 25px;
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
max-height: 300px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-holder {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
@ -32,6 +32,7 @@ export class AssetComponent implements OnInit, OnDestroy {
|
|||||||
isNativeAsset = false;
|
isNativeAsset = false;
|
||||||
error: any;
|
error: any;
|
||||||
mainSubscription: Subscription;
|
mainSubscription: Subscription;
|
||||||
|
imageError = false;
|
||||||
|
|
||||||
totalConfirmedTxCount = 0;
|
totalConfirmedTxCount = 0;
|
||||||
loadedConfirmedTxCount = 0;
|
loadedConfirmedTxCount = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user