Skip to content

Commit

Permalink
Display amount of the issued coins on colors page
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamaguchi committed Mar 25, 2024
1 parent f76adc8 commit b39465e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
24 changes: 16 additions & 8 deletions frontend/src/app/colors/colors.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ <h3 id="color-header-text">Colors</h3>
</ion-col>
</ion-row>
<ion-row class="table-header">
<ion-col size="8" class="pt-10">COLOR ID</ion-col>
<ion-col size="4" class="pt-10">LATEST USED BLOCK</ion-col>
<ion-col size="6" class="pt-10">COLOR ID</ion-col>
<ion-col size="3" class="pt-10">LATEST USED BLOCK</ion-col>
<ion-col size="3" class="pt-10">ISSUED</ion-col>
</ion-row>
<ion-row
class="text-color table-border-bottom"
*ngFor="let color of colors"
>
<ion-col
size="8"
(click)="goToColorPage(color[0])"
size="6"
(click)="goToColorPage(color['color_id'])"
class="link-color cursor-pointer ellipsis"
>{{ color[0] }}</ion-col
>{{ color['color_id'] }}</ion-col
>
<ion-col
size="4"
(click)="goToBlock(color[1])"
size="3"
(click)="goToBlock(color['height'])"
class="link-color cursor-pointer ellipsis"
>{{ color[1] }}</ion-col
>{{ color['height'] }}</ion-col
>
<ion-col
size="3"
(click)="goToColorPage(color['color_id'])"
class="link-color cursor-pointer ellipsis"
>{{ color['chain_stats']['issued_sum'] +
color['mempool_stats']['issued_sum'] }}</ion-col
>
</ion-row>
</div>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/colors/colors.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export class ColorsPage implements OnInit {
this.backendService.getColors(this.lastSeenColorId).subscribe(
data => {
this.colors = this.colors.concat(data['colors']);
this.lastSeenColorId = data['colors'][data['colors'].length - 1][0];
this.lastSeenColorId =
data['colors'][data['colors'].length - 1]['color_id'];
},
err => {
console.log(err);
Expand Down

0 comments on commit b39465e

Please sign in to comment.