Fix skeleton layout jumping in pool detail page

This commit is contained in:
nymkappa 2022-03-08 20:29:09 +01:00
parent 71d500d750
commit 171246f4ef
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
3 changed files with 3 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<div *ngIf="poolStats$ | async as poolStats; else loadingMain">
<h1 class="m-0 mb-2">
<img width="50" src="{{ poolStats['logo'] }}" onError="this.src = './resources/mining-pools/default.svg'"
<img width="50" height="50" src="{{ poolStats['logo'] }}" onError="this.src = './resources/mining-pools/default.svg'"
class="mr-3">
{{ poolStats.pool.name }}
</h1>
@ -91,7 +91,7 @@
<ng-template #loadingMain>
<div>
<h1 class="m-0 mb-2">
<img width="50" src="./resources/mining-pools/default.svg" class="mr-3">
<img width="50" height="50" src="./resources/mining-pools/default.svg" class="mr-3">
<div class="skeleton-loader"></div>
</h1>

View File

@ -42,7 +42,6 @@ div.scrollable {
.skeleton-loader {
width: 100%;
max-width: 90px;
margin: 15px auto 3px;
}
.table {

View File

@ -61,6 +61,7 @@ export class PoolComponent implements OnInit {
return this.apiService.getPoolHashrate$(this.poolId)
.pipe(
switchMap((data) => {
this.isLoading = false;
this.prepareChartOptions(data.hashrates.map(val => [val.timestamp * 1000, val.avgHashrate]));
return poolId;
}),
@ -80,7 +81,6 @@ export class PoolComponent implements OnInit {
poolStats.pool.regexes = regexes.slice(0, -3);
poolStats.pool.addresses = poolStats.pool.addresses;
this.isLoading = false;
return Object.assign({
logo: `./resources/mining-pools/` + poolStats.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg'
}, poolStats);