Changed to toggle buttons. Changed filters.

This commit is contained in:
softsimon 2024-02-08 14:52:31 +08:00
parent 3ceb583127
commit 510dd91328
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
3 changed files with 18 additions and 10 deletions

View File

@ -24,13 +24,11 @@
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: text-top; font-size: 13px; color: #4a68b9"></fa-icon>
</a>
<div class="quick-filter">
<ng-container *ngFor="let filter of goggleCycle">
<div
class="goggle-badge badge badge-primary"
[class.active]="filter.index === goggleIndex"
(click)="goggleIndex = filter.index"
>{{ filter.name }}</div>
</ng-container>
<div class="btn-group btn-group-toggle">
<label class="btn btn-primary btn-xs" [class.active]="filter.index === goggleIndex" *ngFor="let filter of goggleCycle">
<input type="radio" [value]="'3m'" fragment="3m" (click)="goggleIndex = filter.index" [attr.data-cy]="'3m'"> {{ filter.name }}
</label>
</div>
</div>
<div class="mempool-block-wrapper">
<app-mempool-block-overview

View File

@ -398,4 +398,14 @@
&.active {
background: #105fb0;
}
}
}
.btn-xs {
padding: 0.35rem 0.5rem;
font-size: 12px;
}
.quick-filter {
margin-top: 5px;
margin-bottom: 6px;
}

View File

@ -65,8 +65,8 @@ export class DashboardComponent implements OnInit, OnDestroy, AfterViewInit {
goggleResolution = 82;
goggleCycle = [
{ index: 0, name: 'All' },
{ index: 1, name: 'CPFP', flag: 0b00000010_00000000_00000000n },
{ index: 2, name: 'RBF', flag: 0b00000100_00000000_00000000n },
{ index: 1, name: 'Consolidations', flag: 0b00000010_00000000_00000000_00000000_00000000n },
{ index: 2, name: 'Coinjoin', flag: 0b00000001_00000000_00000000_00000000_00000000n },
{ index: 3, name: '💩', flag: 0b00000100_00000000_00000000_00000000n | 0b00000010_00000000_00000000_00000000n | 0b00000001_00000000_00000000_00000000n },
];
goggleIndex = 0; // Math.floor(Math.random() * this.goggleCycle.length);