Adding Lightning wrapper component
This commit is contained in:
		
							parent
							
								
									d23e5d0e87
								
							
						
					
					
						commit
						31d280f729
					
				| @ -16,9 +16,13 @@ | ||||
|         <div class="col-md"> | ||||
|           <table class="table table-borderless table-striped"> | ||||
|             <tbody> | ||||
|               <tr> | ||||
|                 <td i18n="address.total-sent">Created</td> | ||||
|                 <td><app-time-since [dateString]="channel.created"></app-time-since></td> | ||||
|               </tr> | ||||
|               <tr> | ||||
|                 <td i18n="address.total-sent">Last update</td> | ||||
|                 <td>{{ channel.updated_at | date:'yyyy-MM-dd HH:mm' }}</td> | ||||
|                 <td><app-time-since [dateString]="channel.updated_at"></app-time-since></td> | ||||
|               </tr> | ||||
|               <tr> | ||||
|                 <td i18n="address.total-sent">Transaction ID</td> | ||||
| @ -38,7 +42,7 @@ | ||||
|             <tbody> | ||||
|               <tr> | ||||
|                 <td i18n="address.total-received">Capacity</td> | ||||
|                 <td><app-sats [satoshis]="channel.capacity"></app-sats></td> | ||||
|                 <td><app-sats [satoshis]="channel.capacity"></app-sats>  <app-fiat [value]="channel.capacity" digitsInfo="1.2-2"></app-fiat></td> | ||||
|               </tr> | ||||
|             </tbody> | ||||
|           </table> | ||||
|  | ||||
| @ -0,0 +1 @@ | ||||
| <router-outlet></router-outlet> | ||||
| @ -0,0 +1,16 @@ | ||||
| import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; | ||||
| import { WebsocketService } from 'src/app/services/websocket.service'; | ||||
| 
 | ||||
| @Component({ | ||||
|   selector: 'app-lightning-wrapper', | ||||
|   templateUrl: './lightning-wrapper.component.html', | ||||
|   styleUrls: ['./lightning-wrapper.component.scss'], | ||||
|   changeDetection: ChangeDetectionStrategy.OnPush, | ||||
| }) | ||||
| export class LightningWrapperComponent { | ||||
| 
 | ||||
|   constructor( | ||||
|     private websocketService: WebsocketService, | ||||
|   ) { } | ||||
| 
 | ||||
| } | ||||
| @ -10,6 +10,7 @@ import { NodeComponent } from './node/node.component'; | ||||
| import { LightningRoutingModule } from './lightning.routing.module'; | ||||
| import { ChannelsListComponent } from './channels-list/channels-list.component'; | ||||
| import { ChannelComponent } from './channel/channel.component'; | ||||
| import { LightningWrapperComponent } from './lightning-wrapper/lightning-wrapper.component'; | ||||
| @NgModule({ | ||||
|   declarations: [ | ||||
|     LightningDashboardComponent, | ||||
| @ -18,6 +19,7 @@ import { ChannelComponent } from './channel/channel.component'; | ||||
|     NodeComponent, | ||||
|     ChannelsListComponent, | ||||
|     ChannelComponent, | ||||
|     LightningWrapperComponent, | ||||
|   ], | ||||
|   imports: [ | ||||
|     CommonModule, | ||||
|  | ||||
| @ -1,10 +1,15 @@ | ||||
| import { NgModule } from '@angular/core'; | ||||
| import { RouterModule, Routes } from '@angular/router'; | ||||
| import { LightningDashboardComponent } from './lightning-dashboard/lightning-dashboard.component'; | ||||
| import { LightningWrapperComponent } from './lightning-wrapper/lightning-wrapper.component'; | ||||
| import { NodeComponent } from './node/node.component'; | ||||
| import { ChannelComponent } from './channel/channel.component'; | ||||
| 
 | ||||
| const routes: Routes = [ | ||||
|     { | ||||
|       path: '', | ||||
|       component: LightningWrapperComponent, | ||||
|       children: [ | ||||
|         { | ||||
|           path: '', | ||||
|           component: LightningDashboardComponent, | ||||
| @ -21,6 +26,12 @@ const routes: Routes = [ | ||||
|           path: '**', | ||||
|           redirectTo: '' | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       path: '**', | ||||
|       redirectTo: '' | ||||
|     } | ||||
| ]; | ||||
| 
 | ||||
| @NgModule({ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user