From dcd94d868af8807f944bab0a715d6195f17d534f Mon Sep 17 00:00:00 2001 From: natsoni Date: Mon, 27 May 2024 11:53:58 +0200 Subject: [PATCH 1/6] Slightly lift up blockchain toggle button --- .../src/app/components/blockchain/blockchain.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/components/blockchain/blockchain.component.scss b/frontend/src/app/components/blockchain/blockchain.component.scss index 700f57a27..1488d262a 100644 --- a/frontend/src/app/components/blockchain/blockchain.component.scss +++ b/frontend/src/app/components/blockchain/blockchain.component.scss @@ -71,7 +71,7 @@ color: var(--fg); font-size: 0.8rem; position: absolute; - bottom: 15.8em; + bottom: 16.1em; left: 1px; transform: translateX(-50%) rotate(90deg); background: none; From 83246be962f7a317b6b6d85fdd46beed338082ed Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 28 May 2024 21:06:58 +0000 Subject: [PATCH 2/6] Responsive active acceleration details --- .../active-acceleration-box.component.html | 38 +++++++------ .../active-acceleration-box.component.scss | 53 ++++++++++++++++--- 2 files changed, 69 insertions(+), 22 deletions(-) diff --git a/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html b/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html index 75e821e9f..d009a5e63 100644 --- a/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html +++ b/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.html @@ -1,8 +1,8 @@ - - + - - - + diff --git a/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.scss b/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.scss index 6dba0b06f..12849dc65 100644 --- a/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.scss +++ b/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.scss @@ -1,9 +1,50 @@ .td-width { - width: 150px; - min-width: 150px; + width: 150px; + min-width: 150px; - @media (max-width: 768px) { - width: 175px; - min-width: 175px; - } + @media (max-width: 768px) { + width: 175px; + min-width: 175px; + } +} + +.field-label { + @media (max-width: 849px) { + text-align: left; + } + @media (max-width: 649px) { + width: auto; + min-width: auto; + } +} + +.field-value { + @media (max-width: 849px) { + width: 100%; + } + + .hashrate-label { + @media (max-width: 420px) { + display: none; + } + } +} + +.pie-chart { + width: 100%; + vertical-align: middle; + text-align: center; + + .chart-container { + width: 72px; + height: 100%; + margin-left: auto; + } + + @media (max-width: 850px) { + width: 150px; + } + @media (max-width: 420px) { + padding-left: 0; + } } \ No newline at end of file From 6f6a9ea1a41fa2072786a53fb8522b4516fddaad Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 28 May 2024 21:07:36 +0000 Subject: [PATCH 3/6] Brighter purple pie chart --- .../active-acceleration-box.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.ts b/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.ts index b6719f906..f52c45041 100644 --- a/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.ts +++ b/frontend/src/app/components/acceleration/active-acceleration-box/active-acceleration-box.component.ts @@ -83,7 +83,7 @@ export class ActiveAccelerationBox implements OnChanges { this.acceleratedByPercentage = ((totalAcceleratedHashrate / parseFloat(this.miningStats.lastEstimatedHashrate)) * 100).toFixed(1) + '%'; data.push(getDataItem( totalAcceleratedHashrate, - 'var(--tertiary)', + 'var(--mainnet-alt)', `${this.acceleratedByPercentage} accelerating`, ) as PieSeriesOption); const notAcceleratedByPercentage = ((1 - (totalAcceleratedHashrate / parseFloat(this.miningStats.lastEstimatedHashrate))) * 100).toFixed(1) + '%'; From c6db016c990a331d77b687d49a005f48cfe58dc9 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 28 May 2024 21:33:09 +0000 Subject: [PATCH 4/6] Show hashrate pie chart immediately on acceleration --- .../src/app/components/transaction/transaction.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index a76720752..2b2ed8060 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -380,7 +380,12 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.txInBlockIndex = this.mempoolPosition.block; if (txPosition.cpfp !== undefined) { + if (txPosition.position.acceleratedBy) { + txPosition.cpfp.acceleratedBy = txPosition.position.acceleratedBy; + } this.setCpfpInfo(txPosition.cpfp); + } else if ((this.tx?.acceleration && txPosition.position.acceleratedBy)) { + this.tx.acceleratedBy = txPosition.position.acceleratedBy; } } } else { From cfedb5fd248619585ca0554957925334f503ed0f Mon Sep 17 00:00:00 2001 From: softsimon Date: Thu, 30 May 2024 16:15:51 +0700 Subject: [PATCH 5/6] Fix for undefined LN group channels --- frontend/src/app/lightning/group/group.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/app/lightning/group/group.component.ts b/frontend/src/app/lightning/group/group.component.ts index 4c2cd4dd9..ea83653c2 100644 --- a/frontend/src/app/lightning/group/group.component.ts +++ b/frontend/src/app/lightning/group/group.component.ts @@ -80,6 +80,12 @@ export class GroupComponent implements OnInit { }; } } + + nodes.map((node) => { + node.channels = node.opened_channel_count; + return node; + }); + const sumLiquidity = nodes.reduce((partialSum, a) => partialSum + parseInt(a.capacity, 10), 0); const sumChannels = nodes.reduce((partialSum, a) => partialSum + a.opened_channel_count, 0); From f3bd50d4ab3a16ad41ad4f1dfc7dc70ecfb0ece9 Mon Sep 17 00:00:00 2001 From: natsoni Date: Fri, 31 May 2024 13:37:30 +0200 Subject: [PATCH 6/6] Revert "Update search results ordering" This reverts commit 00838ea94762fb81de0eebe0cec3c3035ae0e279. --- .../search-form/search-form.component.ts | 6 --- .../search-results.component.html | 42 ++++++++----------- .../search-results.component.ts | 2 +- 3 files changed, 19 insertions(+), 31 deletions(-) diff --git a/frontend/src/app/components/search-form/search-form.component.ts b/frontend/src/app/components/search-form/search-form.component.ts index bcd5afb53..d345cb1e0 100644 --- a/frontend/src/app/components/search-form/search-form.component.ts +++ b/frontend/src/app/components/search-form/search-form.component.ts @@ -195,7 +195,6 @@ export class SearchFormComponent implements OnInit { const matchesTxId = this.regexTransaction.test(searchText) && !this.regexBlockhash.test(searchText); const matchesBlockHash = this.regexBlockhash.test(searchText); const matchesAddress = !matchesTxId && this.regexAddress.test(searchText); - const publicKey = matchesAddress && searchText.startsWith('0'); const otherNetworks = findOtherNetworks(searchText, this.network as any || 'mainnet', this.env); const liquidAsset = this.assets ? (this.assets[searchText] || []) : []; const pools = this.pools.filter(pool => pool["name"].toLowerCase().includes(searchText.toLowerCase())).slice(0, 10); @@ -204,10 +203,6 @@ export class SearchFormComponent implements OnInit { searchText = searchText.replace(/\//g, '-'); } - if (publicKey) { - otherNetworks.length = 0; - } - return { searchText: searchText, hashQuickMatch: +(matchesBlockHeight || matchesBlockHash || matchesTxId || matchesAddress || matchesUnixTimestamp || matchesDateTime), @@ -217,7 +212,6 @@ export class SearchFormComponent implements OnInit { txId: matchesTxId, blockHash: matchesBlockHash, address: matchesAddress, - publicKey: publicKey, addresses: matchesAddress && addressPrefixSearchResults.length === 1 && searchText === addressPrefixSearchResults[0] ? [] : addressPrefixSearchResults, // If there is only one address and it matches the search text, don't show it in the dropdown otherNetworks: otherNetworks, nodes: lightningResults.nodes, diff --git a/frontend/src/app/components/search-form/search-results/search-results.component.html b/frontend/src/app/components/search-form/search-results/search-results.component.html index e5db07670..35ce2a0a7 100644 --- a/frontend/src/app/components/search-form/search-results/search-results.component.html +++ b/frontend/src/app/components/search-form/search-results/search-results.component.html @@ -23,7 +23,7 @@ - +
{{ networkName }} Address
- -
{{ networkName }} Addresses
- -
- -
Mining Pools
- -
Lightning Nodes
- @@ -62,25 +62,19 @@
Lightning Channels
-
- -
Other Network Address
- -
- -
{{ networkName }} Address
- -
Liquid Asset
Accelerated to + Accelerated to
@if (accelerationInfo?.acceleratedFeeRate && (!tx.effectiveFeePerVsize || accelerationInfo.acceleratedFeeRate >= tx.effectiveFeePerVsize)) { @@ -11,24 +11,30 @@ }
-
-
+
+
+ @if (tx && (tx.acceleratedBy || accelerationInfo) && miningStats) { +
+ } @else { +
+
+
+ }
Accelerated by - {{ acceleratedByPercentage }} of hashrate + Accelerated by + {{ acceleratedByPercentage }} of hashrate