mirror of
https://github.com/mempool/mempool.git
synced 2025-03-26 17:51:45 +01:00
- Switched the arrow colors for spent/unspent utxos
- Collapse dropdown on search (mobile)
This commit is contained in:
parent
e02924e8dd
commit
9025d4dd54
@ -25,7 +25,7 @@
|
||||
<a class="nav-link" routerLink="/contributors" (click)="collapse()">Contributors</a>
|
||||
</li>
|
||||
</ul>
|
||||
<app-search-form location="top"></app-search-form>
|
||||
<app-search-form location="top" (searchTriggered)="collapse()"></app-search-form>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { Component, OnInit, ChangeDetectionStrategy, EventEmitter, Output } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@ -10,6 +10,7 @@ import { Router } from '@angular/router';
|
||||
})
|
||||
export class SearchFormComponent implements OnInit {
|
||||
searchForm: FormGroup;
|
||||
@Output() searchTriggered = new EventEmitter();
|
||||
|
||||
regexAddress = /^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,87})$/;
|
||||
regexBlockhash = /^[0]{8}[a-fA-F0-9]{56}$/;
|
||||
@ -31,10 +32,13 @@ export class SearchFormComponent implements OnInit {
|
||||
if (searchText) {
|
||||
if (this.regexAddress.test(searchText)) {
|
||||
this.router.navigate(['/address/', searchText]);
|
||||
this.searchTriggered.emit();
|
||||
} else if (this.regexBlockhash.test(searchText)) {
|
||||
this.router.navigate(['/block/', searchText]);
|
||||
this.searchTriggered.emit();
|
||||
} else if (this.regexTransaction.test(searchText)) {
|
||||
this.router.navigate(['/tx/', searchText]);
|
||||
this.searchTriggered.emit();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
</ng-template>
|
||||
<ng-template #hasPrevout>
|
||||
<a [routerLink]="['/tx/', vin.txid]">
|
||||
<i class="arrow green"></i>
|
||||
<i class="arrow red"></i>
|
||||
</a>
|
||||
</ng-template>
|
||||
</td>
|
||||
@ -75,9 +75,9 @@
|
||||
<td class="pl-1 arrow-td">
|
||||
<i *ngIf="!outspends[i]; else outspend" class="arrow grey"></i>
|
||||
<ng-template #outspend>
|
||||
<i *ngIf="!outspends[i][vindex] || !outspends[i][vindex].spent; else spent" class="arrow red"></i>
|
||||
<i *ngIf="!outspends[i][vindex] || !outspends[i][vindex].spent; else spent" class="arrow green"></i>
|
||||
<ng-template #spent>
|
||||
<a [routerLink]="['/tx/', outspends[i][vindex].txid]"><i class="arrow green"></i></a>
|
||||
<a [routerLink]="['/tx/', outspends[i][vindex].txid]"><i class="arrow red"></i></a>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user