Update mining dashboard graph heights
This commit is contained in:
		
							parent
							
								
									e9fc5c0433
								
							
						
					
					
						commit
						3cfd54b4c5
					
				| @ -29,7 +29,7 @@ | ||||
|       <div class="card"> | ||||
|         <div class="card-body pl-2 pr-2"> | ||||
|           <div class="mempool-graph"> | ||||
|             <app-pool-ranking [height]="graphHeight" [attr.data-cy]="'pool-distribution'" [widget]=true></app-pool-ranking> | ||||
|             <app-pool-ranking [height]="poolGraphHeight" [attr.data-cy]="'pool-distribution'" [widget]=true></app-pool-ranking> | ||||
|           </div> | ||||
|           <div class="mt-1"><a [attr.data-cy]="'pool-distribution-view-more'" [routerLink]="['/graphs/mining/pools' | relativeUrl]" i18n="dashboard.view-more">View more »</a></div> | ||||
|         </div> | ||||
| @ -41,7 +41,7 @@ | ||||
|       <div class="card"> | ||||
|         <div class="card-body pl-lg-3 pr-lg-3 pl-2 pr-2"> | ||||
|           <div class="fixed-mempool-graph"> | ||||
|             <app-hashrate-chart [height]="graphHeight" [attr.data-cy]="'hashrate-graph'" [widget]="true"></app-hashrate-chart> | ||||
|             <app-hashrate-chart [height]="hashrateGraphHeight" [attr.data-cy]="'hashrate-graph'" [widget]="true"></app-hashrate-chart> | ||||
|           </div> | ||||
|           <div class="mt-1"><a [routerLink]="['/graphs/mining/hashrate-difficulty' | relativeUrl]" fragment="1y" i18n="dashboard.view-more">View more »</a></div> | ||||
|         </div> | ||||
|  | ||||
| @ -12,7 +12,8 @@ import { EventType, NavigationStart, Router } from '@angular/router'; | ||||
|   changeDetection: ChangeDetectionStrategy.OnPush, | ||||
| }) | ||||
| export class MiningDashboardComponent implements OnInit, AfterViewInit { | ||||
|   graphHeight = 375; | ||||
|   hashrateGraphHeight = 335; | ||||
|   poolGraphHeight = 375; | ||||
| 
 | ||||
|   constructor( | ||||
|     private seoService: SeoService, | ||||
| @ -44,11 +45,14 @@ export class MiningDashboardComponent implements OnInit, AfterViewInit { | ||||
|   @HostListener('window:resize', ['$event']) | ||||
|   onResize(): void { | ||||
|     if (window.innerWidth >= 992) { | ||||
|       this.graphHeight = 335; | ||||
|       this.hashrateGraphHeight = 335; | ||||
|       this.poolGraphHeight = 375; | ||||
|     } else if (window.innerWidth >= 768) { | ||||
|       this.graphHeight = 245; | ||||
|       this.hashrateGraphHeight = 245; | ||||
|       this.poolGraphHeight = 265; | ||||
|     } else { | ||||
|       this.graphHeight = 240; | ||||
|       this.hashrateGraphHeight = 240; | ||||
|       this.poolGraphHeight = 240; | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user