| 
									
										
										
										
											2022-02-28 17:31:10 +09:00
										 |  |  | <div *ngIf="showTitle" class="main-title" i18n="dashboard.difficulty-adjustment">Difficulty Adjustment</div> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  | <div class="card-wrapper"> | 
					
						
							|  |  |  |   <div class="card"> | 
					
						
							|  |  |  |     <div class="card-body more-padding"> | 
					
						
							|  |  |  |       <div class="difficulty-adjustment-container" *ngIf="(isLoadingWebSocket$ | async) === false && (difficultyEpoch$ | async) as epochData; else loadingDifficulty"> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |         <div class="epoch-progress"> | 
					
						
							| 
									
										
										
										
											2023-03-11 19:32:59 +09:00
										 |  |  |           <svg class="epoch-blocks" height="22px" width="100%" viewBox="0 0 224 9" shape-rendering="crispEdges" preserveAspectRatio="none"> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |             <defs> | 
					
						
							|  |  |  |               <linearGradient id="diff-gradient" x1="0%" y1="0%" x2="100%" y2="0%" gradientUnits="userSpaceOnUse"> | 
					
						
							|  |  |  |                 <stop offset="0%" stop-color="#105fb0" /> | 
					
						
							|  |  |  |                 <stop offset="100%" stop-color="#9339f4" /> | 
					
						
							|  |  |  |               </linearGradient> | 
					
						
							|  |  |  |               <linearGradient id="diff-hover-gradient" x1="0%" y1="0%" x2="100%" y2="0%" gradientUnits="userSpaceOnUse"> | 
					
						
							|  |  |  |                 <stop offset="0%" stop-color="#2486eb" /> | 
					
						
							|  |  |  |                 <stop offset="100%" stop-color="#ae6af7" /> | 
					
						
							|  |  |  |               </linearGradient> | 
					
						
							|  |  |  |             </defs> | 
					
						
							|  |  |  |             <rect | 
					
						
							|  |  |  |               *ngFor="let rect of shapes" | 
					
						
							|  |  |  |               [attr.x]="rect.x" [attr.y]="rect.y" | 
					
						
							|  |  |  |               [attr.width]="rect.w" [attr.height]="rect.h" | 
					
						
							|  |  |  |               class="rect {{rect.status}}" | 
					
						
							|  |  |  |               [class.hover]="hoverSection && rect.status === hoverSection.status" | 
					
						
							|  |  |  |               (pointerover)="onHover($event, rect);" | 
					
						
							|  |  |  |               (pointerout)="onBlur($event);" | 
					
						
							|  |  |  |             > | 
					
						
							|  |  |  |               <animate | 
					
						
							|  |  |  |                 *ngIf="rect.status === 'next'" | 
					
						
							|  |  |  |                 attributeType="XML" | 
					
						
							|  |  |  |                 attributeName="fill" | 
					
						
							|  |  |  |                 [attr.values]="'#fff;' + (rect.expected ? '#D81B60' : '#2d3348') + ';#fff'" | 
					
						
							|  |  |  |                 dur="2s" | 
					
						
							|  |  |  |                 repeatCount="indefinite"/> | 
					
						
							|  |  |  |             </rect> | 
					
						
							|  |  |  |           </svg> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |         <div class="difficulty-stats"> | 
					
						
							|  |  |  |           <div class="item"> | 
					
						
							|  |  |  |             <div class="card-text"> | 
					
						
							| 
									
										
										
										
											2023-04-22 05:56:10 +09:00
										 |  |  |               ~<app-time [time]="epochData.timeAvg / 1000" [fractionDigits]="1"></app-time> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2023-03-11 18:04:06 +09:00
										 |  |  |             <div class="symbol" i18n="difficulty-box.average-block-time">Average block time</div> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  |           </div> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |           <div class="item"> | 
					
						
							| 
									
										
										
										
											2023-03-21 22:20:14 +09:00
										 |  |  |             <div *ngIf="epochData.remainingBlocks < 1870; else recentlyAdjusted" class="card-text bigger" [ngStyle]="{'color': epochData.colorAdjustments}"> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |               <span *ngIf="epochData.change > 0; else arrowDownDifficulty" > | 
					
						
							|  |  |  |                 <fa-icon class="retarget-sign" [icon]="['fas', 'caret-up']" [fixedWidth]="true"></fa-icon> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  |               </span> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |               <ng-template #arrowDownDifficulty > | 
					
						
							|  |  |  |                 <fa-icon class="retarget-sign" [icon]="['fas', 'caret-down']" [fixedWidth]="true"></fa-icon> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  |               </ng-template> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |               {{ epochData.change | absolute | number: '1.2-2' }} | 
					
						
							|  |  |  |               <span class="symbol">%</span> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |             <ng-template #recentlyAdjusted> | 
					
						
							|  |  |  |               <div class="card-text">—</div> | 
					
						
							|  |  |  |             </ng-template> | 
					
						
							|  |  |  |             <div class="symbol"> | 
					
						
							|  |  |  |               <span i18n="difficulty-box.previous">Previous</span>: | 
					
						
							|  |  |  |               <span [ngStyle]="{'color': epochData.colorPreviousAdjustments}"> | 
					
						
							|  |  |  |                 <span *ngIf="epochData.previousRetarget > 0; else arrowDownPreviousDifficulty" > | 
					
						
							|  |  |  |                   <fa-icon class="previous-retarget-sign" [icon]="['fas', 'caret-up']" [fixedWidth]="true"></fa-icon> | 
					
						
							|  |  |  |                 </span> | 
					
						
							|  |  |  |                 <ng-template #arrowDownPreviousDifficulty > | 
					
						
							|  |  |  |                   <fa-icon class="previous-retarget-sign" [icon]="['fas', 'caret-down']" [fixedWidth]="true"></fa-icon> | 
					
						
							|  |  |  |                 </ng-template> | 
					
						
							|  |  |  |                 {{ epochData.previousRetarget | absolute | number: '1.2-2' }} </span> % | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  |           </div> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |           <div class="item"> | 
					
						
							|  |  |  |             <div class="card-text"><app-time kind="until" [time]="epochData.estimatedRetargetDate" [fastRender]="true"></app-time></div> | 
					
						
							|  |  |  |             <div class="symbol"> | 
					
						
							|  |  |  |               {{ epochData.retargetDateString }} | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2022-01-17 15:34:34 +09:00
										 |  |  |           </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |   </div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <ng-template #loadingDifficulty> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  |   <div class="epoch-progress"> | 
					
						
							|  |  |  |     <div class="skeleton-loader"></div> | 
					
						
							|  |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2022-01-17 13:33:07 +09:00
										 |  |  |   <div class="difficulty-skeleton loading-container"> | 
					
						
							|  |  |  |     <div class="item"> | 
					
						
							|  |  |  |       <div class="card-text"> | 
					
						
							|  |  |  |         <div class="skeleton-loader"></div> | 
					
						
							|  |  |  |         <div class="skeleton-loader"></div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |     <div class="item"> | 
					
						
							|  |  |  |       <div class="card-text"> | 
					
						
							|  |  |  |         <div class="skeleton-loader"></div> | 
					
						
							|  |  |  |         <div class="skeleton-loader"></div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |     <div class="item"> | 
					
						
							|  |  |  |       <div class="card-text"> | 
					
						
							|  |  |  |         <div class="skeleton-loader"></div> | 
					
						
							|  |  |  |         <div class="skeleton-loader"></div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |   </div> | 
					
						
							|  |  |  | </ng-template> | 
					
						
							| 
									
										
										
										
											2023-03-07 19:19:28 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | <app-difficulty-tooltip | 
					
						
							|  |  |  |   *ngIf="hoverSection && (isLoadingWebSocket$ | async) === false && (difficultyEpoch$ | async) as epochData" | 
					
						
							|  |  |  |   [cursorPosition]="tooltipPosition" | 
					
						
							|  |  |  |   [status]="hoverSection.status" | 
					
						
							|  |  |  |   [progress]="epochData" | 
					
						
							|  |  |  | ></app-difficulty-tooltip> |