migrate old text truncation implementations to new component

This commit is contained in:
Mononaut
2023-01-05 11:01:46 -06:00
parent 44147f5976
commit 42a39c1f7c
18 changed files with 117 additions and 133 deletions

View File

@@ -3,10 +3,10 @@
<h1 i18n="shared.address">Address</h1>
<div class="tx-link">
<a [routerLink]="['/address/' | relativeUrl, addressString]" >
<span class="d-inline d-lg-none">{{ addressString | shortenString : 18 }}</span>
<span class="d-none d-lg-inline">{{ addressString }}</span>
<app-truncate [text]="addressString" [lastChars]="8">
<app-clipboard [text]="addressString"></app-clipboard>
</app-truncate>
</a>
<app-clipboard [text]="addressString"></app-clipboard>
</div>
</div>
@@ -21,10 +21,13 @@
<tbody>
<tr *ngIf="addressInfo && addressInfo.unconfidential">
<td i18n="address.unconfidential">Unconfidential</td>
<td><a [routerLink]="['/address/' | relativeUrl, addressInfo.unconfidential]">
<span class="d-inline d-lg-none">{{ addressInfo.unconfidential | shortenString : 14 }}</span>
<span class="d-none d-lg-inline">{{ addressInfo.unconfidential }}</span>
</a> <app-clipboard [text]="addressInfo.unconfidential"></app-clipboard></td>
<td>
<a [routerLink]="['/address/' | relativeUrl, addressInfo.unconfidential]">
<app-truncate [text]="addressInfo.unconfidential" [lastChars]="8">
<app-clipboard [text]="addressInfo.unconfidential"></app-clipboard>
</app-truncate>
</a>
</td>
</tr>
<ng-template [ngIf]="!address.electrum">
<tr>