From 525e5084f09afb294eacf8d12efaf3e14eb7ef37 Mon Sep 17 00:00:00 2001 From: Yamaguchi Date: Tue, 30 Apr 2024 20:48:58 +0900 Subject: [PATCH 1/6] Fix problems with testnet env. * BackendService generates urls such as 'http://example.com//api/blocks', but these url doesnt work with AWS ALB * BackendService.getBlocks did not use page/perPage parameters --- frontend/src/app/backend.service.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/backend.service.ts b/frontend/src/app/backend.service.ts index e6b7074..d9ca29b 100644 --- a/frontend/src/app/backend.service.ts +++ b/frontend/src/app/backend.service.ts @@ -11,7 +11,12 @@ export class BackendService { constructor(private http: HttpClient, private configService: ConfigService) {} getBlocks(page: number, perPage: number): Observable { - return this.request('/api/blocks'); + return this.request( + '/api/blocks', + new HttpParams({ + fromObject: { page: page.toString(), perPage: perPage.toString() } + }) + ); } searchBlock(query: string): Observable { @@ -108,7 +113,7 @@ export class BackendService { private request(url: string, params?: HttpParams): Observable { return this.getConfig().pipe( mergeMap((config: Config) => { - return this.http.get(`${config.backendUrl}/${url}`, { params }); + return this.http.get(`${config.backendUrl}${url}`, { params }); }) ); } From c85fa3673913224e848b1acaaa106e96f1faf8ac Mon Sep 17 00:00:00 2001 From: Yamaguchi Date: Tue, 7 May 2024 03:47:30 +0900 Subject: [PATCH 2/6] Fix coin amount --- frontend/src/app/address/address.page.html | 51 ++++++++-------- frontend/src/app/block/block.page.html | 41 ++++++++----- frontend/src/app/color/color.page.html | 58 +++++++++++-------- .../src/app/transaction/transaction.page.html | 40 ++++++++----- 4 files changed, 112 insertions(+), 78 deletions(-) diff --git a/frontend/src/app/address/address.page.html b/frontend/src/app/address/address.page.html index 5676203..e9b7006 100644 --- a/frontend/src/app/address/address.page.html +++ b/frontend/src/app/address/address.page.html @@ -95,20 +95,21 @@ >COINBASE - - {{ input.prevout?.value | asTpc}} - COIN - - TPC + + + + + {{ input.prevout?.value }} + COIN + + + + {{ input.prevout?.value | asTpc}} + TPC + @@ -123,15 +124,19 @@ OUT - {{ output.value | asTpc }} - COIN - - TPC + + + {{ output.value }} + COIN + + + + {{ output.value | asTpc }} + TPC + diff --git a/frontend/src/app/block/block.page.html b/frontend/src/app/block/block.page.html index 574973c..044bca6 100644 --- a/frontend/src/app/block/block.page.html +++ b/frontend/src/app/block/block.page.html @@ -173,14 +173,19 @@ {{ input.prevout.value | asTpc }} - + + {{ input.prevout.value }} + COIN - - TPC + + + + {{ input.prevout.value | asTpc }} + TPC + @@ -210,15 +215,19 @@ (click)="goToAddress(vout.scriptpubkey_uncolored_address)" >{{ vout.scriptpubkey_uncolored_address }} - {{ vout.value | asTpc }} - COIN - - TPC + + + {{ vout.value }} + COIN + + + + {{ vout.value | asTpc }} + TPC + diff --git a/frontend/src/app/color/color.page.html b/frontend/src/app/color/color.page.html index a733731..3c93987 100644 --- a/frontend/src/app/color/color.page.html +++ b/frontend/src/app/color/color.page.html @@ -74,20 +74,24 @@

Transactions

>COINBASE - - {{ input.prevout?.value | asTpc}} - COIN - - TPC + + + + {{ input.prevout?.value }} + COIN + + + + {{ input.prevout?.value }} + COIN + + + {{ input.prevout?.value | asTpc}} + TPC + @@ -102,15 +106,23 @@

Transactions

OUT - {{ output.value | asTpc }} - COIN - - TPC + + + {{ output.value }} + COIN + + + + {{ output.value }} + COIN + + + {{ output.value | asTpc }} + TPC + diff --git a/frontend/src/app/transaction/transaction.page.html b/frontend/src/app/transaction/transaction.page.html index 300b4e7..82a8152 100644 --- a/frontend/src/app/transaction/transaction.page.html +++ b/frontend/src/app/transaction/transaction.page.html @@ -103,14 +103,18 @@ size="4" class="ion-no-margin ion-text-right text-gray" > - {{ vin.prevout.value | asTpc }} - COIN - - TPC + + {{ vin.prevout.value }} + COIN + + + + {{ vin.prevout.value | asTpc }} + TPC + @@ -205,14 +209,18 @@ >{{ vout.scriptpubkey_uncolored_address }} - {{vout.value | asTpc }} - COIN - - TPC + + {{ vout.value }} + COIN + + + + {{vout.value | asTpc }} + TPC + Date: Wed, 8 May 2024 00:32:34 +0900 Subject: [PATCH 3/6] Fixed display of token balance --- backend/actions/address_detail.js | 3 +- backend/actions/color_list.js | 1 - frontend/src/app/address/address.page.html | 62 ++++++++++++------- frontend/src/app/address/address.page.scss | 14 +++++ frontend/src/app/address/address.page.ts | 13 ++-- frontend/src/app/modules/sharePipe.module.ts | 5 +- .../src/app/pipes/format-color-id.pipe.ts | 17 +++++ 7 files changed, 81 insertions(+), 34 deletions(-) create mode 100644 frontend/src/app/pipes/format-color-id.pipe.ts diff --git a/backend/actions/address_detail.js b/backend/actions/address_detail.js index df4b24b..324e422 100644 --- a/backend/actions/address_detail.js +++ b/backend/actions/address_detail.js @@ -38,8 +38,9 @@ app.get('/api/address/:address', async (req, res) => { txs = sortTxs(txs); txs.forEach(updateAddress); let balances = []; - for (let [, scriptStats] of Object.entries(stats.chain_stats)) { + for (let [colorId, scriptStats] of Object.entries(stats.chain_stats)) { balances.push({ + colorId: colorId, count: scriptStats.tx_count, received: scriptStats.funded_txo_sum, sent: scriptStats.spent_txo_sum, diff --git a/backend/actions/color_list.js b/backend/actions/color_list.js index 52910f2..7808c38 100644 --- a/backend/actions/color_list.js +++ b/backend/actions/color_list.js @@ -16,7 +16,6 @@ app.get('/api/colors', async (req, res) => { try { const colors = await rest.color.list(lastSeenColorId); - console.log(colors); res.json({ colors: colors }); } catch (err) { logger.error(`Error retrieving colors. Error Message - ${err.message}`); diff --git a/frontend/src/app/address/address.page.html b/frontend/src/app/address/address.page.html index e9b7006..41ae4ba 100644 --- a/frontend/src/app/address/address.page.html +++ b/frontend/src/app/address/address.page.html @@ -15,39 +15,55 @@ id="copy-icon" > -
- - Balance: {{ balanced | asTpc}} TPC -
- - - - Total Received: - {{ received | asTpc }} - - - Total Sent: - {{ sent | asTpc }} - - - No. Transactions: - {{ txCount }} - -
-

Transactions

+

Balances

+
+
+ + Color ID + Total Balance + Total Received + Total Sent + No. Transactions + + + + {{ color['colorId'] | formatColorId }} + {{ color['balanced'] }} + {{ color['received'] }} + {{ color['sent'] }} + {{ color['count'] }} + + + {{ color['colorId'] | formatColorId }} + {{ color['balanced'] | asTpc }} + {{ color['received'] | asTpc }} + {{ color['sent'] | asTpc }} + {{ color['count'] }} + + +
+
+ + +

Transactions

diff --git a/frontend/src/app/address/address.page.scss b/frontend/src/app/address/address.page.scss index 7dcfc5d..bb2045d 100644 --- a/frontend/src/app/address/address.page.scss +++ b/frontend/src/app/address/address.page.scss @@ -19,6 +19,20 @@ ion-content { font-weight: 500; } +.table-title { + @media (max-width: 539px) { + font-size: 12px; + margin: 17px 10px 10px; + } + + @media (min-width: 540px) { + font-size: 27px; + margin: 0px 10px 20px; + } + + font-weight: 500; +} + #block-hash-bg { display: flex; flex-wrap: wrap; diff --git a/frontend/src/app/address/address.page.ts b/frontend/src/app/address/address.page.ts index daaf2fa..9cef317 100644 --- a/frontend/src/app/address/address.page.ts +++ b/frontend/src/app/address/address.page.ts @@ -16,9 +16,7 @@ export class AddressPage implements OnInit { block = {}; qrcode = 'tapyrus:'; address = ''; - balanced: number; - received: number; - sent: number; + colors = []; transactions = []; txids = new Set(); copied = false; @@ -71,10 +69,7 @@ export class AddressPage implements OnInit { .getAddressInfo(this.address, this.lastSeenTxid) .subscribe( data => { - this.received = data['balances'][0]['received'] || 0; - this.sent = data['balances'][0]['sent'] || 0; - this.balanced = data['balances'][0]['balanced'] || 0; - this.txCount = data['balances'][0]['count'] || 0; + this.colors = data['balances']; data['tx']['txs'] .filter(tx => !this.txids.has(tx.txid)) .forEach(tx => { @@ -99,4 +94,8 @@ export class AddressPage implements OnInit { this.statusMsg = null; this.detailMsg = null; } + + isColored(colorId) { + return colorId !== '000000000000000000000000000000000000000000000000000000000000000000'; + } } diff --git a/frontend/src/app/modules/sharePipe.module.ts b/frontend/src/app/modules/sharePipe.module.ts index 6688476..a61591e 100644 --- a/frontend/src/app/modules/sharePipe.module.ts +++ b/frontend/src/app/modules/sharePipe.module.ts @@ -3,9 +3,10 @@ import { CommonModule } from '@angular/common'; import { MomentFromNowPipe } from '../pipes/moment-from-now.pipe'; import { AsTpcPipe } from '../pipes/as-tpc.pipe'; import { DateFormatPipe } from '../pipes/date-format.pipe'; +import { FormatColorIdPipe } from '../pipes/format-color-id.pipe'; @NgModule({ - declarations: [MomentFromNowPipe, AsTpcPipe, DateFormatPipe], + declarations: [MomentFromNowPipe, AsTpcPipe, DateFormatPipe, FormatColorIdPipe], imports: [CommonModule], - exports: [MomentFromNowPipe, AsTpcPipe, DateFormatPipe] + exports: [MomentFromNowPipe, AsTpcPipe, DateFormatPipe, FormatColorIdPipe] }) export class SharedPipeModule {} diff --git a/frontend/src/app/pipes/format-color-id.pipe.ts b/frontend/src/app/pipes/format-color-id.pipe.ts new file mode 100644 index 0000000..9ed33a2 --- /dev/null +++ b/frontend/src/app/pipes/format-color-id.pipe.ts @@ -0,0 +1,17 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import { Injectable } from '@angular/core'; + +@Injectable() +@Pipe({ + name: 'formatColorId', + pure: false +}) +export class FormatColorIdPipe implements PipeTransform { + transform(colorId: any, ...args: any[]): any { + if (colorId === '000000000000000000000000000000000000000000000000000000000000000000') { + return '(TPC)'; + } else { + return colorId; + } + } +} From 0a78964faf4e2e5a698d84f948db842ae713dbf2 Mon Sep 17 00:00:00 2001 From: Yamaguchi Date: Wed, 8 May 2024 03:26:58 +0900 Subject: [PATCH 4/6] Display the color id below the address --- frontend/src/app/address/address.page.html | 132 +++++++++------- frontend/src/app/address/address.page.scss | 11 -- frontend/src/app/block/block.page.html | 102 +++++++------ frontend/src/app/blocks/blocks.page.scss | 4 - frontend/src/app/color/color.page.html | 142 ++++++++++-------- frontend/src/app/colors/colors.page.scss | 10 -- .../src/app/transaction/transaction.page.html | 98 +++++++----- .../app/transactions/transactions.page.scss | 5 - frontend/src/global.scss | 11 ++ 9 files changed, 287 insertions(+), 228 deletions(-) diff --git a/frontend/src/app/address/address.page.html b/frontend/src/app/address/address.page.html index 41ae4ba..b1c91f8 100644 --- a/frontend/src/app/address/address.page.html +++ b/frontend/src/app/address/address.page.html @@ -96,65 +96,85 @@ {{ tx.status?.block_height || "" }} {{ tx.status?.block_time | momentFromNow }} - - {{ input.prevout?.scriptpubkey_uncolored_address }} - - IN + + +
+ {{ input.prevout?.scriptpubkey_uncolored_address }} +
+
+ + IN + COINBASE + + + + + + {{ input.prevout?.value }} + COIN + + + + {{ input.prevout?.value | asTpc}} + TPC + + +
+ + - COINBASE - - - - - - {{ input.prevout?.value }} - COIN - - - - {{ input.prevout?.value | asTpc}} - TPC - - - + Color ID: {{ input.prevout?.colorId | formatColorId }} +
+
+
- - {{ output.scriptpubkey_uncolored_address }} - - OUT - - - - {{ output.value }} - COIN - - - - {{ output.value | asTpc }} - TPC - - - + + + {{ output.scriptpubkey_uncolored_address }} + + OUT + + + + {{ output.value }} + COIN + + + + {{ output.value | asTpc }} + TPC + + + + + + Color ID: {{ output.colorId | formatColorId }} + + +
diff --git a/frontend/src/app/address/address.page.scss b/frontend/src/app/address/address.page.scss index bb2045d..8cf1941 100644 --- a/frontend/src/app/address/address.page.scss +++ b/frontend/src/app/address/address.page.scss @@ -93,11 +93,6 @@ ion-content { color: #aaaaaa; } -.table-border-bottom { - border-bottom: 1px solid #f6f6f6; - padding: 10px 10px; -} - .pt-10 { padding-top: 10px; } @@ -105,9 +100,3 @@ ion-content { .text-wrap { word-break: break-all; } - -.ellipsis { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} diff --git a/frontend/src/app/block/block.page.html b/frontend/src/app/block/block.page.html index 044bca6..1c0cb65 100644 --- a/frontend/src/app/block/block.page.html +++ b/frontend/src/app/block/block.page.html @@ -164,29 +164,38 @@ No Inputs (Newly Generated Coins)
- {{ input.prevout.scriptpubkey_uncolored_address }} - + {{ input.prevout.scriptpubkey_uncolored_address }} - - {{ input.prevout.value }} - COIN - - - - {{ input.prevout.value | asTpc }} - TPC - - + + + {{ input.prevout.value }} + COIN + + + + {{ input.prevout.value | asTpc }} + TPC + + + + + + Color ID: {{ input.prevout.colorId | formatColorId }} + +
@@ -209,26 +218,35 @@
- {{ vout.scriptpubkey_uncolored_address }} - - - {{ vout.value }} - COIN - - - - {{ vout.value | asTpc }} - TPC - - + + {{ vout.scriptpubkey_uncolored_address }} + + + {{ vout.value }} + COIN + + + + {{ vout.value | asTpc }} + TPC + + + + + + Color ID: {{ vout.colorId | formatColorId }} + +
diff --git a/frontend/src/app/blocks/blocks.page.scss b/frontend/src/app/blocks/blocks.page.scss index f1a9821..b41fef1 100644 --- a/frontend/src/app/blocks/blocks.page.scss +++ b/frontend/src/app/blocks/blocks.page.scss @@ -21,10 +21,6 @@ ion-content { } } -.table-border-bottom { - border-bottom: 1px solid #f6f6f6; - padding: 10px 10px; -} .display-none-max-md { @media (max-width: 768px) { diff --git a/frontend/src/app/color/color.page.html b/frontend/src/app/color/color.page.html index 3c93987..94f8429 100644 --- a/frontend/src/app/color/color.page.html +++ b/frontend/src/app/color/color.page.html @@ -59,72 +59,90 @@

Transactions

{{ tx.status?.block_height || "" }} {{ tx.status?.block_time | momentFromNow }} - - {{ input.prevout?.scriptpubkey_uncolored_address }} - - IN + + {{ input.prevout?.scriptpubkey_uncolored_address }} - COINBASE + IN + COINBASE + + + + + {{ input.prevout?.value }} + COIN + + + + {{ input.prevout?.value }} + COIN + + + {{ input.prevout?.value | asTpc}} + TPC + + + + + - - - - - {{ input.prevout?.value }} - COIN - - - - {{ input.prevout?.value }} - COIN - - - {{ input.prevout?.value | asTpc}} - TPC - - - + Color ID: {{ input.prevout.colorId | formatColorId }} + + + - - {{ output.scriptpubkey_uncolored_address }} - - OUT - - - - {{ output.value }} - COIN - - - - {{ output.value }} - COIN - - - {{ output.value | asTpc }} - TPC - - - + + + {{ output.scriptpubkey_uncolored_address }} + + OUT + + + + {{ output.value }} + COIN + + + + {{ output.value }} + COIN + + + {{ output.value | asTpc }} + TPC + + + + + + Color ID: {{ output.colorId | formatColorId }} + + + diff --git a/frontend/src/app/colors/colors.page.scss b/frontend/src/app/colors/colors.page.scss index 9e27b98..031e2ba 100644 --- a/frontend/src/app/colors/colors.page.scss +++ b/frontend/src/app/colors/colors.page.scss @@ -25,13 +25,3 @@ ion-content { color: #aaaaaa; } -.table-border-bottom { - border-bottom: 1px solid #f6f6f6; - padding: 10px 10px; -} - -.ellipsis { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; -} diff --git a/frontend/src/app/transaction/transaction.page.html b/frontend/src/app/transaction/transaction.page.html index 82a8152..53ec77f 100644 --- a/frontend/src/app/transaction/transaction.page.html +++ b/frontend/src/app/transaction/transaction.page.html @@ -93,28 +93,39 @@ #{{ i }} - {{ vin.prevout.scriptpubkey_uncolored_address }} - - - {{ vin.prevout.value }} - + + {{ vin.prevout.scriptpubkey_uncolored_address }} + + + {{ vin.prevout.value }} + COIN + + + + {{ vin.prevout.value | asTpc }} + TPC + + + + + COIN - - - - {{ vin.prevout.value | asTpc }} - TPC - + > + Color ID: {{ vin.prevout.colorId | formatColorId }} + + @@ -202,25 +213,36 @@ #{{ i }} - {{ vout.scriptpubkey_uncolored_address }} - - - {{ vout.value }} - + + {{ vout.scriptpubkey_uncolored_address }} + + + {{ vout.value }} + COIN + + + + {{vout.value | asTpc }} + TPC + + + + + COIN - - - - {{vout.value | asTpc }} - TPC - + > + Color ID: {{ vout.colorId | formatColorId }} + + Date: Wed, 8 May 2024 10:57:23 +0900 Subject: [PATCH 5/6] Fix prettier warnings --- frontend/src/app/address/address.page.html | 62 ++++++++++++++----- frontend/src/app/address/address.page.ts | 5 +- frontend/src/app/block/block.page.html | 20 ++++-- frontend/src/app/blocks/blocks.page.scss | 1 - frontend/src/app/color/color.page.html | 33 +++++++--- frontend/src/app/colors/colors.page.scss | 1 - frontend/src/app/modules/sharePipe.module.ts | 7 ++- .../src/app/pipes/format-color-id.pipe.ts | 5 +- .../src/app/transaction/transaction.page.html | 21 +++++-- frontend/src/global.scss | 2 +- 10 files changed, 115 insertions(+), 42 deletions(-) diff --git a/frontend/src/app/address/address.page.html b/frontend/src/app/address/address.page.html index b1c91f8..c1ee5bf 100644 --- a/frontend/src/app/address/address.page.html +++ b/frontend/src/app/address/address.page.html @@ -46,17 +46,35 @@ (click)="goToCoin(color['colorId'])" >{{ color['colorId'] | formatColorId }} - {{ color['balanced'] }} - {{ color['received'] }} - {{ color['sent'] }} - {{ color['count'] }} + {{ color['balanced'] }} + {{ color['received'] }} + {{ color['sent'] }} + {{ color['count'] }} - {{ color['colorId'] | formatColorId }} - {{ color['balanced'] | asTpc }} - {{ color['received'] | asTpc }} - {{ color['sent'] | asTpc }} - {{ color['count'] }} + {{ color['colorId'] | formatColorId }} + {{ color['balanced'] | asTpc }} + {{ color['received'] | asTpc }} + {{ color['sent'] | asTpc }} + {{ color['count'] }} @@ -99,7 +117,7 @@ -
@@ -115,9 +133,10 @@ > - - - + + {{ input.prevout?.value }} COIN - + {{ input.prevout?.value | asTpc}} TPC - - + Color ID: {{ input.prevout?.colorId | formatColorId }} @@ -168,7 +194,9 @@ - Color ID: {{ output.colorId | formatColorId }} diff --git a/frontend/src/app/address/address.page.ts b/frontend/src/app/address/address.page.ts index 9cef317..701b48b 100644 --- a/frontend/src/app/address/address.page.ts +++ b/frontend/src/app/address/address.page.ts @@ -96,6 +96,9 @@ export class AddressPage implements OnInit { } isColored(colorId) { - return colorId !== '000000000000000000000000000000000000000000000000000000000000000000'; + return ( + colorId !== + '000000000000000000000000000000000000000000000000000000000000000000' + ); } } diff --git a/frontend/src/app/block/block.page.html b/frontend/src/app/block/block.page.html index 1c0cb65..8ac7b92 100644 --- a/frontend/src/app/block/block.page.html +++ b/frontend/src/app/block/block.page.html @@ -169,18 +169,19 @@ size="8" class="ion-no-margin text-primary cursor-pointer" (click)="goToAddress(input.prevout.scriptpubkey_uncolored_address)" - >{{ input.prevout.scriptpubkey_uncolored_address }}{{ input.prevout.scriptpubkey_uncolored_address + }} + > {{ input.prevout.value }} COIN + >COIN @@ -189,8 +190,13 @@ - - + Color ID: {{ input.prevout.colorId | formatColorId }} @@ -241,7 +247,9 @@ - Color ID: {{ vout.colorId | formatColorId }} diff --git a/frontend/src/app/blocks/blocks.page.scss b/frontend/src/app/blocks/blocks.page.scss index b41fef1..a26d8f2 100644 --- a/frontend/src/app/blocks/blocks.page.scss +++ b/frontend/src/app/blocks/blocks.page.scss @@ -21,7 +21,6 @@ ion-content { } } - .display-none-max-md { @media (max-width: 768px) { display: none; diff --git a/frontend/src/app/color/color.page.html b/frontend/src/app/color/color.page.html index 94f8429..c7588b1 100644 --- a/frontend/src/app/color/color.page.html +++ b/frontend/src/app/color/color.page.html @@ -77,7 +77,9 @@

Transactions

- + {{ input.prevout?.value }} Transactions >COIN - + {{ input.prevout?.value }} COIN - + {{ input.prevout?.value | asTpc}} TPC
- - + Color ID: {{ input.prevout.colorId | formatColorId }} @@ -117,7 +128,9 @@

Transactions

OUT
- + {{ output.value }} Transactions >COIN - + {{ output.value }} COIN @@ -136,7 +151,9 @@

Transactions

- Color ID: {{ output.colorId | formatColorId }} diff --git a/frontend/src/app/colors/colors.page.scss b/frontend/src/app/colors/colors.page.scss index 031e2ba..48bebe1 100644 --- a/frontend/src/app/colors/colors.page.scss +++ b/frontend/src/app/colors/colors.page.scss @@ -24,4 +24,3 @@ ion-content { font-size: 14px; color: #aaaaaa; } - diff --git a/frontend/src/app/modules/sharePipe.module.ts b/frontend/src/app/modules/sharePipe.module.ts index a61591e..f48e200 100644 --- a/frontend/src/app/modules/sharePipe.module.ts +++ b/frontend/src/app/modules/sharePipe.module.ts @@ -5,7 +5,12 @@ import { AsTpcPipe } from '../pipes/as-tpc.pipe'; import { DateFormatPipe } from '../pipes/date-format.pipe'; import { FormatColorIdPipe } from '../pipes/format-color-id.pipe'; @NgModule({ - declarations: [MomentFromNowPipe, AsTpcPipe, DateFormatPipe, FormatColorIdPipe], + declarations: [ + MomentFromNowPipe, + AsTpcPipe, + DateFormatPipe, + FormatColorIdPipe + ], imports: [CommonModule], exports: [MomentFromNowPipe, AsTpcPipe, DateFormatPipe, FormatColorIdPipe] }) diff --git a/frontend/src/app/pipes/format-color-id.pipe.ts b/frontend/src/app/pipes/format-color-id.pipe.ts index 9ed33a2..02ca751 100644 --- a/frontend/src/app/pipes/format-color-id.pipe.ts +++ b/frontend/src/app/pipes/format-color-id.pipe.ts @@ -8,7 +8,10 @@ import { Injectable } from '@angular/core'; }) export class FormatColorIdPipe implements PipeTransform { transform(colorId: any, ...args: any[]): any { - if (colorId === '000000000000000000000000000000000000000000000000000000000000000000') { + if ( + colorId === + '000000000000000000000000000000000000000000000000000000000000000000' + ) { return '(TPC)'; } else { return colorId; diff --git a/frontend/src/app/transaction/transaction.page.html b/frontend/src/app/transaction/transaction.page.html index 53ec77f..6c0ab3f 100644 --- a/frontend/src/app/transaction/transaction.page.html +++ b/frontend/src/app/transaction/transaction.page.html @@ -99,7 +99,8 @@ size="8" class="ion-no-margin link-color cursor-pointer" (click)="goToAddress(vin.prevout.scriptpubkey_uncolored_address)" - >{{ vin.prevout.scriptpubkey_uncolored_address }}{{ vin.prevout.scriptpubkey_uncolored_address + }} - - + Color ID: {{ vin.prevout.colorId | formatColorId }} @@ -236,8 +242,13 @@ - - + Color ID: {{ vout.colorId | formatColorId }} diff --git a/frontend/src/global.scss b/frontend/src/global.scss index 77a5d21..e9a6173 100644 --- a/frontend/src/global.scss +++ b/frontend/src/global.scss @@ -103,4 +103,4 @@ ion-toast { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; -} \ No newline at end of file +} From 89d924537501a0e62faf0ce5b95882cdd169af7a Mon Sep 17 00:00:00 2001 From: Yamaguchi Date: Wed, 8 May 2024 17:53:04 +0900 Subject: [PATCH 6/6] Remove redundant bottom borders --- frontend/src/app/address/address.page.html | 9 ++++---- frontend/src/app/block/block.page.html | 6 ++--- frontend/src/app/color/color.page.html | 23 +++++++++++++++---- .../src/app/transaction/transaction.page.html | 10 ++------ frontend/src/global.scss | 5 ++++ 5 files changed, 31 insertions(+), 22 deletions(-) diff --git a/frontend/src/app/address/address.page.html b/frontend/src/app/address/address.page.html index c1ee5bf..af06534 100644 --- a/frontend/src/app/address/address.page.html +++ b/frontend/src/app/address/address.page.html @@ -152,10 +152,7 @@ - + + @@ -193,7 +191,7 @@ - + + diff --git a/frontend/src/app/block/block.page.html b/frontend/src/app/block/block.page.html index 8ac7b92..a8899ce 100644 --- a/frontend/src/app/block/block.page.html +++ b/frontend/src/app/block/block.page.html @@ -190,10 +190,7 @@ - + +
diff --git a/frontend/src/app/color/color.page.html b/frontend/src/app/color/color.page.html index c7588b1..be7f73a 100644 --- a/frontend/src/app/color/color.page.html +++ b/frontend/src/app/color/color.page.html @@ -91,7 +91,7 @@

Transactions

*ngIf="!input.is_coinbase && !!input.prevout.colorId && input.prevout.colorId === colorId" > {{ input.prevout?.value }} - COIN + COIN
Transactions Transactions Color ID: {{ input.prevout.colorId | formatColorId }} + + + Color ID: {{ input.prevout.colorId | formatColorId }} + + + @@ -142,7 +149,7 @@

Transactions

*ngIf="!!output.colorId && output.colorId === colorId" > {{ output.value }} - COIN + COIN {{ output.value | asTpc }} @@ -150,7 +157,7 @@

Transactions

- + Transactions Color ID: {{ output.colorId | formatColorId }} + + + Color ID: {{ output.colorId | formatColorId }} + + + diff --git a/frontend/src/app/transaction/transaction.page.html b/frontend/src/app/transaction/transaction.page.html index 6c0ab3f..0209e9e 100644 --- a/frontend/src/app/transaction/transaction.page.html +++ b/frontend/src/app/transaction/transaction.page.html @@ -120,10 +120,7 @@ - + - +