Add toggle button to dropdown menu.
Revert left margin from tv page. Change text dropdown filter to icon. Change dropdown inactive item color. Revert 500 limit rate.
This commit is contained in:
parent
14b7b6427a
commit
44339daedf
@ -47,7 +47,7 @@ import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
|
|||||||
import { FeesBoxComponent } from './components/fees-box/fees-box.component';
|
import { FeesBoxComponent } from './components/fees-box/fees-box.component';
|
||||||
import { DashboardComponent } from './dashboard/dashboard.component';
|
import { DashboardComponent } from './dashboard/dashboard.component';
|
||||||
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
||||||
import { faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faDatabase, faExchangeAlt, faInfoCircle,
|
import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faDatabase, faExchangeAlt, faInfoCircle,
|
||||||
faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
|
faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
|
||||||
import { ApiDocsComponent } from './components/api-docs/api-docs.component';
|
import { ApiDocsComponent } from './components/api-docs/api-docs.component';
|
||||||
import { CodeTemplateComponent } from './components/api-docs/code-template.component';
|
import { CodeTemplateComponent } from './components/api-docs/code-template.component';
|
||||||
@ -140,6 +140,7 @@ export class AppModule {
|
|||||||
library.addIcons(faLink);
|
library.addIcons(faLink);
|
||||||
library.addIcons(faBolt);
|
library.addIcons(faBolt);
|
||||||
library.addIcons(faTint);
|
library.addIcons(faTint);
|
||||||
|
library.addIcons(faFilter);
|
||||||
library.addIcons(faAngleDown);
|
library.addIcons(faAngleDown);
|
||||||
library.addIcons(faAngleUp);
|
library.addIcons(faAngleUp);
|
||||||
library.addIcons(faExchangeAlt);
|
library.addIcons(faExchangeAlt);
|
||||||
|
@ -38,33 +38,37 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-inline-block" ngbDropdown #myDrop="ngbDropdown">
|
<div class="d-inline-block" ngbDropdown #myDrop="ngbDropdown">
|
||||||
<button class="btn btn-primary btn-sm ml-2" id="dropdownFees" ngbDropdownAnchor (focus)="myDrop.open()">Fees Range</button>
|
<button class="btn btn-primary btn-sm ml-2" id="dropdownFees" ngbDropdownAnchor (click)="myDrop.toggle()">
|
||||||
|
<fa-icon [icon]="['fas', 'filter']" [fixedWidth]="true" i18n-title="statistics.component-filter.title" title="Filter"></fa-icon>
|
||||||
|
</button>
|
||||||
<div class="dropdown-fees" ngbDropdownMenu aria-labelledby="dropdownFees">
|
<div class="dropdown-fees" ngbDropdownMenu aria-labelledby="dropdownFees">
|
||||||
<ng-template ngFor let-fee let-i="index" [ngForOf]="feeLevels">
|
<ul>
|
||||||
<ng-template [ngIf]="fee === 1">
|
<ng-template ngFor let-fee let-i="index" [ngForOf]="feeLevels">
|
||||||
<li (click)="filterFees(fee)" [class]="filterFeeIndex < fee ? 'inactive' : ''">
|
<ng-template [ngIf]="fee === 1">
|
||||||
|
<li (click)="filterFees(fee)" [class]="filterFeeIndex < fee ? 'inactive' : ''">
|
||||||
|
<ng-template [ngIf]="inverted">
|
||||||
|
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template [ngIf]="!inverted">
|
||||||
|
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i - 1]}"></span>
|
||||||
|
</ng-template>
|
||||||
|
<span class="fee-text" >0 - {{ fee }}</span>
|
||||||
|
</li>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template [ngIf]="fee <= 500 && fee !== 1">
|
||||||
|
<li (click)="filterFees(fee)" [class]="filterFeeIndex < fee ? 'inactive' : ''">
|
||||||
<ng-template [ngIf]="inverted">
|
<ng-template [ngIf]="inverted">
|
||||||
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
||||||
|
<span class="fee-text" >{{feeLevels[i - 1]}} - {{ fee }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template [ngIf]="!inverted">
|
<ng-template [ngIf]="!inverted">
|
||||||
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i - 1]}"></span>
|
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i - 1]}"></span>
|
||||||
|
<span class="fee-text" >{{feeLevels[i + 1]}} - {{ fee }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<span class="fee-text" >0 - {{ fee }}</span>
|
|
||||||
</li>
|
</li>
|
||||||
</ng-template>
|
|
||||||
<ng-template [ngIf]="fee <= 200 && fee !== 1">
|
|
||||||
<li (click)="filterFees(fee)" [class]="filterFeeIndex < fee ? 'inactive' : ''">
|
|
||||||
<ng-template [ngIf]="inverted">
|
|
||||||
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i]}"></span>
|
|
||||||
<span class="fee-text" >{{feeLevels[i - 1]}} - {{ fee }}</span>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template [ngIf]="!inverted">
|
|
||||||
<span class="square" [ngStyle]="{'backgroundColor': chartColors[i - 1]}"></span>
|
|
||||||
<span class="fee-text" >{{feeLevels[i + 1]}} - {{ fee }}</span>
|
|
||||||
</ng-template>
|
|
||||||
</li>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-template>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -67,6 +67,14 @@
|
|||||||
padding: 10px 0px;
|
padding: 10px 0px;
|
||||||
min-width: 130px;
|
min-width: 130px;
|
||||||
padding: 2px 20px 0px;
|
padding: 2px 20px 0px;
|
||||||
|
left: -38px !important;
|
||||||
|
position: absolute !important;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
li {
|
li {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -90,10 +98,11 @@
|
|||||||
}
|
}
|
||||||
.inactive {
|
.inactive {
|
||||||
.square {
|
.square {
|
||||||
background-color: #aaa !important;
|
background-color: #ffffff66 !important;
|
||||||
}
|
}
|
||||||
.fee-text {
|
.fee-text {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
|
color: #777;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,8 @@ export class StatisticsComponent implements OnInit {
|
|||||||
spinnerLoading = false;
|
spinnerLoading = false;
|
||||||
feeLevels = feeLevels;
|
feeLevels = feeLevels;
|
||||||
chartColors = chartColors;
|
chartColors = chartColors;
|
||||||
filterFeeIndex = 200;
|
filterFeeIndex = 500;
|
||||||
|
dropDownOpen = false;
|
||||||
|
|
||||||
mempoolStats: OptimizedMempoolStats[] = [];
|
mempoolStats: OptimizedMempoolStats[] = [];
|
||||||
|
|
||||||
@ -143,4 +144,8 @@ export class StatisticsComponent implements OnInit {
|
|||||||
filterFees(index: number) {
|
filterFees(index: number) {
|
||||||
this.filterFeeIndex = index;
|
this.filterFeeIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filterClick() {
|
||||||
|
this.dropDownOpen = !this.dropDownOpen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
[template]="'advanced'"
|
[template]="'advanced'"
|
||||||
[limitFee]="500"
|
[limitFee]="500"
|
||||||
[height]="600"
|
[height]="600"
|
||||||
[left]="75"
|
[left]="60"
|
||||||
[right]="10"
|
[right]="10"
|
||||||
[data]="mempoolStats"
|
[data]="mempoolStats"
|
||||||
[showZoom]="false"
|
[showZoom]="false"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user