remove: address-text component

This commit is contained in:
rodribp 2026-02-20 12:29:58 -06:00
parent 3a4f1252a9
commit db5ce43d79
No known key found for this signature in database
GPG key ID: CC349739DA92EE20
4 changed files with 0 additions and 94 deletions

View file

@ -1,34 +0,0 @@
@if (similarity) {
<div class="address-text">
<a class="address" style="display: contents;" [routerLink]="['/address/' | relativeUrl, address]" title="{{ address }}">
<span class="prefix">{{ similarity.match.prefix.slice(0, 16) }}</span>
<span class="infix" [ngStyle]="{'text-decoration-color': groupColors[similarity.group % (groupColors.length)]}">{{ address.slice(min(similarity.match.prefix.length, 16) || 0, -min(similarity.match.postfix.length, 16) || undefined) }}</span>
<span class="postfix"> {{ similarity.match.postfix.slice(-16) }}</span>
</a>
<span class="poison-alert" *ngIf="similarity" i18n-ngbTooltip="address-poisoning.warning-tooltip" ngbTooltip="This address is deceptively similar to another output. It may be part of an address poisoning attack.">
<fa-icon [icon]="['fas', 'exclamation-triangle']" [fixedWidth]="true"></fa-icon>
</span>
</div>
} @else {
<div class="d-flex align-items-center" style="max-width: 100%; min-width: 0;">
<app-chunked-address
[address]="address"
[lastChars]="8"
[link]="['/address/' | relativeUrl, address]"
class="d-none d-md-block"
style="flex: 0 1 auto; min-width: 0;">
</app-chunked-address>
<app-chunked-address
[address]="address"
[lastChars]="4"
[link]="['/address/' | relativeUrl, address]"
class="d-md-none"
style="flex: 0 1 auto; min-width: 0;">
</app-chunked-address>
<app-clipboard
[text]="address" size="normal"
class="ml-1 ml-md-2">
</app-clipboard>
</div>
}

View file

@ -1,32 +0,0 @@
.address-text {
text-overflow: unset;
display: flex;
flex-direction: row;
align-items: start;
position: relative;
font-family: monospace;
.infix {
flex-grow: 0;
flex-shrink: 1;
overflow: hidden;
text-overflow: ellipsis;
user-select: none;
text-decoration: underline 2px;
}
.prefix, .postfix {
flex-shrink: 0;
flex-grow: 0;
user-select: none;
text-decoration: underline var(--red) 2px;
}
}
.poison-alert {
margin-left: .5em;
color: var(--yellow);
}

View file

@ -1,25 +0,0 @@
import { Component, Input } from '@angular/core';
import { AddressMatch, AddressTypeInfo } from '@app/shared/address-utils';
@Component({
selector: 'app-address-text',
templateUrl: './address-text.component.html',
styleUrls: ['./address-text.component.scss'],
standalone: false,
})
export class AddressTextComponent {
@Input() address: string;
@Input() info: AddressTypeInfo | null;
@Input() similarity: { score: number, match: AddressMatch, group: number } | null;
min = Math.min;
groupColors: string[] = [
'var(--primary)',
'var(--success)',
'var(--info)',
'white',
];
constructor() {}
}

View file

@ -97,7 +97,6 @@ import { SatsComponent } from '@app/shared/components/sats/sats.component';
import { BtcComponent } from '@app/shared/components/btc/btc.component';
import { FeeRateComponent } from '@app/shared/components/fee-rate/fee-rate.component';
import { AddressTypeComponent } from '@app/shared/components/address-type/address-type.component';
import { AddressTextComponent } from '@app/shared/components/address-text/address-text.component';
import { TruncateComponent } from '@app/shared/components/truncate/truncate.component';
import { SearchResultsComponent } from '@components/search-form/search-results/search-results.component';
import { TimestampComponent } from '@app/shared/components/timestamp/timestamp.component';
@ -224,7 +223,6 @@ import { ChunkedAddressComponent } from '@app/shared/components/chunked-address/
BtcComponent,
FeeRateComponent,
AddressTypeComponent,
AddressTextComponent,
TruncateComponent,
SearchResultsComponent,
TimestampComponent,
@ -376,7 +374,6 @@ import { ChunkedAddressComponent } from '@app/shared/components/chunked-address/
BtcComponent,
FeeRateComponent,
AddressTypeComponent,
AddressTextComponent,
TruncateComponent,
SearchResultsComponent,
TimestampComponent,