Adding Lightning wrapper component
This commit is contained in:
parent
d23e5d0e87
commit
31d280f729
@ -16,9 +16,13 @@
|
|||||||
<div class="col-md">
|
<div class="col-md">
|
||||||
<table class="table table-borderless table-striped">
|
<table class="table table-borderless table-striped">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td i18n="address.total-sent">Created</td>
|
||||||
|
<td><app-time-since [dateString]="channel.created"></app-time-since></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td i18n="address.total-sent">Last update</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td i18n="address.total-sent">Transaction ID</td>
|
<td i18n="address.total-sent">Transaction ID</td>
|
||||||
@ -38,7 +42,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td i18n="address.total-received">Capacity</td>
|
<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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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 { LightningRoutingModule } from './lightning.routing.module';
|
||||||
import { ChannelsListComponent } from './channels-list/channels-list.component';
|
import { ChannelsListComponent } from './channels-list/channels-list.component';
|
||||||
import { ChannelComponent } from './channel/channel.component';
|
import { ChannelComponent } from './channel/channel.component';
|
||||||
|
import { LightningWrapperComponent } from './lightning-wrapper/lightning-wrapper.component';
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
LightningDashboardComponent,
|
LightningDashboardComponent,
|
||||||
@ -18,6 +19,7 @@ import { ChannelComponent } from './channel/channel.component';
|
|||||||
NodeComponent,
|
NodeComponent,
|
||||||
ChannelsListComponent,
|
ChannelsListComponent,
|
||||||
ChannelComponent,
|
ChannelComponent,
|
||||||
|
LightningWrapperComponent,
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@ -1,21 +1,32 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { LightningDashboardComponent } from './lightning-dashboard/lightning-dashboard.component';
|
import { LightningDashboardComponent } from './lightning-dashboard/lightning-dashboard.component';
|
||||||
|
import { LightningWrapperComponent } from './lightning-wrapper/lightning-wrapper.component';
|
||||||
import { NodeComponent } from './node/node.component';
|
import { NodeComponent } from './node/node.component';
|
||||||
import { ChannelComponent } from './channel/channel.component';
|
import { ChannelComponent } from './channel/channel.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: LightningDashboardComponent,
|
component: LightningWrapperComponent,
|
||||||
},
|
children: [
|
||||||
{
|
{
|
||||||
path: 'node/:public_key',
|
path: '',
|
||||||
component: NodeComponent,
|
component: LightningDashboardComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'channel/:short_id',
|
path: 'node/:public_key',
|
||||||
component: ChannelComponent,
|
component: NodeComponent,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'channel/:short_id',
|
||||||
|
component: ChannelComponent,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '**',
|
||||||
|
redirectTo: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '**',
|
path: '**',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user