From 2e665d57acfeba514e6d932fbca584722475fc60 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Thu, 17 Oct 2024 08:25:53 +0000 Subject: [PATCH] multiblock goggles --- .../block-overview-multi.component.ts | 12 +++++++----- .../eight-mempool/eight-mempool.component.html | 1 + .../eight-mempool/eight-mempool.component.ts | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts b/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts index 858b9fe1e..e598c59fb 100644 --- a/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts +++ b/frontend/src/app/components/block-overview-multi/block-overview-multi.component.ts @@ -179,13 +179,15 @@ export class BlockOverviewMultiComponent implements AfterViewInit, OnDestroy, On setFilterFlags(goggle?: ActiveFilter): void { this.filterMode = goggle?.mode || this.filterMode; - this.gradientMode = goggle?.gradient || this.gradientMode; + this.gradientMode = goggle?.gradient || 'fee'; // this.gradientMode; this.activeFilterFlags = goggle?.filters ? toFlags(goggle.filters) : this.filterFlags; for (const scene of this.scenes) { - if (this.activeFilterFlags != null && this.filtersAvailable) { - scene.setColorFunction(this.getFilterColorFunction(this.activeFilterFlags, this.gradientMode)); - } else { - scene.setColorFunction(this.getFilterColorFunction(0n, this.gradientMode)); + if (scene) { + if (this.activeFilterFlags != null && this.filtersAvailable) { + scene.setColorFunction(this.getFilterColorFunction(this.activeFilterFlags, this.gradientMode)); + } else { + scene.setColorFunction(this.getFilterColorFunction(0n, this.gradientMode)); + } } } this.start(); diff --git a/frontend/src/app/components/eight-mempool/eight-mempool.component.html b/frontend/src/app/components/eight-mempool/eight-mempool.component.html index 7931689b4..682810b5a 100644 --- a/frontend/src/app/components/eight-mempool/eight-mempool.component.html +++ b/frontend/src/app/components/eight-mempool/eight-mempool.component.html @@ -8,6 +8,7 @@ [blockLimit]="stateService.blockVSize" [orientation]="'left'" [flip]="true" + [showFilters]="true" [animationDuration]="animationDuration" [animationOffset]="animationOffset" [disableSpinner]="true" diff --git a/frontend/src/app/components/eight-mempool/eight-mempool.component.ts b/frontend/src/app/components/eight-mempool/eight-mempool.component.ts index 954871109..c9f682350 100644 --- a/frontend/src/app/components/eight-mempool/eight-mempool.component.ts +++ b/frontend/src/app/components/eight-mempool/eight-mempool.component.ts @@ -103,6 +103,8 @@ export class EightMempoolComponent implements OnInit, OnDestroy { this.websocketService.want(['blocks', 'mempool-blocks']); this.network = this.stateService.network; + this.stateService.activeGoggles$.next({ mode: 'and', filters: [], gradient: 'fee' }); + this.blockSub = this.stateService.mempoolBlockUpdate$.subscribe((update) => { // process update if (isMempoolDelta(update)) {