Fix graphs button layout
This commit is contained in:
		
							parent
							
								
									b8b50b552e
								
							
						
					
					
						commit
						f2e703e928
					
				| @ -1,10 +1,10 @@ | ||||
| <div *ngIf="stateService.env.MINING_DASHBOARD || stateService.env.LIGHTNING" class="mb-3 d-flex menu" | ||||
|   style="padding: 0px 35px;"> | ||||
| 
 | ||||
|   <a routerLinkActive="active" class="btn btn-primary w-50 mr-1" | ||||
|   <a routerLinkActive="active" class="btn btn-primary mr-1" [class]="padding" | ||||
|     [routerLink]="['/graphs/mempool' | relativeUrl]">Mempool</a> | ||||
| 
 | ||||
|   <div ngbDropdown class="w-50" *ngIf="stateService.env.MINING_DASHBOARD"> | ||||
|   <div ngbDropdown class="mr-1" [class]="padding" *ngIf="stateService.env.MINING_DASHBOARD"> | ||||
|     <button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="mining">Mining</button> | ||||
|     <div ngbDropdownMenu aria-labelledby="dropdownBasic1"> | ||||
|       <a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/mining/pools' | relativeUrl]" | ||||
| @ -27,7 +27,7 @@ | ||||
|     </div> | ||||
|   </div> | ||||
| 
 | ||||
|   <div ngbDropdown class="w-50" *ngIf="stateService.env.LIGHTNING"> | ||||
|   <div ngbDropdown [class]="padding" *ngIf="stateService.env.LIGHTNING"> | ||||
|     <button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="lightning">Lightning</button> | ||||
|     <div ngbDropdownMenu aria-labelledby="dropdownBasic1"> | ||||
|       <a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/lightning/nodes-networks' | relativeUrl]" | ||||
|  | ||||
| @ -8,6 +8,8 @@ import { WebsocketService } from "src/app/services/websocket.service"; | ||||
|   styleUrls: ['./graphs.component.scss'], | ||||
| }) | ||||
| export class GraphsComponent implements OnInit { | ||||
|   padding = 'w-50'; | ||||
| 
 | ||||
|   constructor( | ||||
|     public stateService: StateService, | ||||
|     private websocketService: WebsocketService | ||||
| @ -15,5 +17,9 @@ export class GraphsComponent implements OnInit { | ||||
| 
 | ||||
|   ngOnInit(): void { | ||||
|     this.websocketService.want(['blocks']); | ||||
| 
 | ||||
|     if (this.stateService.env.MINING_DASHBOARD === true && this.stateService.env.LIGHTNING === true) { | ||||
|       this.padding = 'w-33'; | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user