Revert "align block arrows & reposition selected block pool tag"
This commit is contained in:
		
							parent
							
								
									7721fde7b6
								
							
						
					
					
						commit
						d02a67766d
					
				| @ -60,12 +60,11 @@ | ||||
|           </ng-container> | ||||
|         </div> | ||||
|         <div class="animated" *ngIf="block.extras?.pool != undefined && showPools"> | ||||
|           <a [attr.data-cy]="'bitcoin-block-' + offset + '-index-' + i + '-pool'" class="badge" [class.animate]="animatePoolTag" [class.selectedBlock]="markHeight === block.height" [routerLink]="[('/mining/pool/' + block.extras.pool.slug) | relativeUrl]"> | ||||
|           <a [attr.data-cy]="'bitcoin-block-' + offset + '-index-' + i + '-pool'" class="badge" [routerLink]="[('/mining/pool/' + block.extras.pool.slug) | relativeUrl]"> | ||||
|             <img class="pool-logo" [src]="'/resources/mining-pools/' + block.extras.pool.slug + '.svg'" onError="this.src = '/resources/mining-pools/default.svg'" [alt]="'Logo of ' + block.extras.pool.name + ' mining pool'">  | ||||
|             {{ block.extras.pool.name}} | ||||
|           </a> | ||||
|         </div> | ||||
|         <div [class.arrow-visible]="markHeight === block.height" id="arrow-up"></div> | ||||
|       </div> | ||||
|     </ng-container> | ||||
|     <ng-template #placeholderBlock> | ||||
| @ -86,6 +85,8 @@ | ||||
|       </ng-container> | ||||
|     </ng-template> | ||||
|   </div> | ||||
|   <div [hidden]="!arrowVisible" id="arrow-up" [style.transition]="arrowTransition" | ||||
|     [ngStyle]="{'left': arrowLeftPx + 8 + 'px' }"></div> | ||||
| </div> | ||||
| 
 | ||||
| <ng-template #loadingBlocksTemplate> | ||||
|  | ||||
| @ -123,20 +123,14 @@ | ||||
| } | ||||
| 
 | ||||
| #arrow-up { | ||||
|   position: absolute; | ||||
|   left: calc(var(--block-size) * 0.3); | ||||
|   top: calc(var(--block-size) * 1); | ||||
|   position: relative; | ||||
|   left: calc(var(--block-size) * 0.6); | ||||
|   top: calc(var(--block-size) * 1.28); | ||||
|   width: 0; | ||||
|   height: 0; | ||||
|   border-left: calc(var(--block-size) * 0.2) solid transparent; | ||||
|   border-right: calc(var(--block-size) * 0.2) solid transparent; | ||||
|   border-bottom: calc(var(--block-size) * 0.2) solid var(--fg); | ||||
|   opacity: 0; | ||||
|   transition: opacity 500ms; | ||||
| 
 | ||||
|   &.arrow-visible { | ||||
|     opacity: 1; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| .flashing { | ||||
| @ -164,14 +158,6 @@ | ||||
|   top: 15px; | ||||
|   z-index: 101; | ||||
|   color: #FFF; | ||||
| 
 | ||||
|   &.animate { | ||||
|     transition: transform 500ms; | ||||
|   } | ||||
| 
 | ||||
|   &.selectedBlock { | ||||
|     transform: translateY(20px); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| .pool-logo { | ||||
|  | ||||
| @ -5,7 +5,6 @@ import { specialBlocks } from '../../app.constants'; | ||||
| import { BlockExtended } from '../../interfaces/node-api.interface'; | ||||
| import { Location } from '@angular/common'; | ||||
| import { CacheService } from '../../services/cache.service'; | ||||
| import { nextTick } from 'process'; | ||||
| 
 | ||||
| interface BlockchainBlock extends BlockExtended { | ||||
|   placeholder?: boolean; | ||||
| @ -59,7 +58,6 @@ export class BlockchainBlocksComponent implements OnInit, OnChanges, OnDestroy { | ||||
|   arrowLeftPx = 30; | ||||
|   blocksFilled = false; | ||||
|   arrowTransition = '1s'; | ||||
|   animatePoolTag = false; | ||||
|   timeLtrSubscription: Subscription; | ||||
|   timeLtr: boolean; | ||||
| 
 | ||||
| @ -188,9 +186,6 @@ export class BlockchainBlocksComponent implements OnInit, OnChanges, OnDestroy { | ||||
|       .subscribe((state) => { | ||||
|         this.markHeight = undefined; | ||||
|         if (state.blockHeight !== undefined) { | ||||
|           nextTick(() => { | ||||
|             this.animatePoolTag = true; | ||||
|           }); | ||||
|           this.markHeight = state.blockHeight; | ||||
|         } | ||||
|         this.moveArrowToPosition(false); | ||||
|  | ||||
| @ -51,7 +51,7 @@ | ||||
|         </div> | ||||
|       </ng-template> | ||||
|     </div> | ||||
|     <div *ngIf="arrowVisible" id="arrow-up" [ngStyle]="{'right': rightPosition + (blockWidth * 0.2) + containerOffset + 'px', transition: transition }" [class.blink]="txPosition?.accelerated"></div> | ||||
|     <div *ngIf="arrowVisible" id="arrow-up" [ngStyle]="{'right': rightPosition + (blockWidth * 0.3) + containerOffset + 'px', transition: transition }" [class.blink]="txPosition?.accelerated"></div> | ||||
|   </div> | ||||
| </ng-container> | ||||
| 
 | ||||
|  | ||||
| @ -114,12 +114,12 @@ | ||||
| #arrow-up { | ||||
|   position: relative; | ||||
|   right: calc(var(--block-size) * 0.6); | ||||
|   top: calc(var(--block-size) * 1); | ||||
|   top: calc(var(--block-size) * 1.20); | ||||
|   width: 0; | ||||
|   height: 0; | ||||
|   border-left: calc(var(--block-size) * 0.2) solid transparent; | ||||
|   border-right: calc(var(--block-size) * 0.2) solid transparent; | ||||
|   border-bottom: calc(var(--block-size) * 0.2) solid var(--fg); | ||||
|   border-left: calc(var(--block-size) * 0.3) solid transparent; | ||||
|   border-right: calc(var(--block-size) * 0.3) solid transparent; | ||||
|   border-bottom: calc(var(--block-size) * 0.3) solid var(--fg); | ||||
| } | ||||
| 
 | ||||
| .blockLink { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user