Update mining dashboard graph heights

This commit is contained in:
natsoni
2024-05-29 10:27:45 +02:00
parent e9fc5c0433
commit 3cfd54b4c5
2 changed files with 10 additions and 6 deletions

View File

@@ -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;
}
}
}