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