LND Services Page Layout
parent
f5fe776cd0
commit
8986fb6771
@ -1,3 +1,11 @@
|
||||
.mat-column-htlc_address, .mat-column-id, .mat-column-id_bytes {
|
||||
flex: 0 0 15%;
|
||||
width: 15%;
|
||||
& .ellipsis-parent {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-column-actions {
|
||||
min-height: 4.8rem;
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="page-title-container">
|
||||
<fa-icon [icon]="faHandshake" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Peerswap</span>
|
||||
</div>
|
||||
<div fxLayout="column" class="padding-gap-x">
|
||||
<mat-card>
|
||||
<mat-card-content fxLayout="column">
|
||||
<nav mat-tab-nav-bar>
|
||||
<div role="tab" mat-tab-link *ngFor="let link of links" class="mat-tab-label" [active]="activeTab.link === link.link" (click)="activeTab = link" routerLink="{{link.link}}">{{link.name}}</div>
|
||||
</nav>
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" class="mat-tab-body-wrapper mb-2">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
@ -1,52 +0,0 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
|
||||
import { RootReducer } from '../../../../store/rtl.reducers';
|
||||
import { LNDReducer } from '../../../../lnd/store/lnd.reducers';
|
||||
import { CLNReducer } from '../../../../cln/store/cln.reducers';
|
||||
import { ECLReducer } from '../../../../eclair/store/ecl.reducers';
|
||||
import { LoopService } from '../../../services/loop.service';
|
||||
|
||||
import { PeerswapComponent } from './peerswap.component';
|
||||
import { SharedModule } from '../../../shared.module';
|
||||
import { mockDataService } from '../../../test-helpers/mock-services';
|
||||
import { CommonService } from '../../../services/common.service';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { DataService } from '../../../services/data.service';
|
||||
|
||||
describe('PeerswapComponent', () => {
|
||||
let component: PeerswapComponent;
|
||||
let fixture: ComponentFixture<PeerswapComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PeerswapComponent],
|
||||
imports: [
|
||||
BrowserAnimationsModule,
|
||||
SharedModule,
|
||||
RouterTestingModule,
|
||||
StoreModule.forRoot({ root: RootReducer, lnd: LNDReducer, cln: CLNReducer, ecl: ECLReducer })
|
||||
],
|
||||
providers: [
|
||||
CommonService,
|
||||
{ provide: DataService, useClass: mockDataService }
|
||||
]
|
||||
}).
|
||||
compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PeerswapComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
TestBed.resetTestingModule();
|
||||
});
|
||||
});
|
@ -1,41 +0,0 @@
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Router, ResolveEnd, Event } from '@angular/router';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil, filter } from 'rxjs/operators';
|
||||
import { faHandshake } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-peerswap',
|
||||
templateUrl: './peerswap.component.html',
|
||||
styleUrls: ['./peerswap.component.scss']
|
||||
})
|
||||
export class PeerswapComponent implements OnInit, OnDestroy {
|
||||
|
||||
public faHandshake = faHandshake;
|
||||
public links = [{ link: 'peers', name: 'Peers' }, { link: 'psout', name: 'Peerswap Out' }, { link: 'psin', name: 'Peerswap In' }, { link: 'pscancelled', name: 'Cancelled Peerswaps' }];
|
||||
public activeTab = this.links[0];
|
||||
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
constructor(private router: Router) { }
|
||||
|
||||
ngOnInit() {
|
||||
const linkFound = this.links.find((link) => this.router.url.includes(link.link));
|
||||
this.activeTab = linkFound ? linkFound : this.links[0];
|
||||
this.router.events.pipe(takeUntil(this.unSubs[0]), filter((e) => e instanceof ResolveEnd)).
|
||||
subscribe({
|
||||
next: (value: ResolveEnd | Event) => {
|
||||
const linkFound = this.links.find((link) => (<ResolveEnd>value).urlAfterRedirects.includes(link.link));
|
||||
this.activeTab = linkFound ? linkFound : this.links[0];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unSubs.forEach((completeSub) => {
|
||||
completeSub.next(<any>null);
|
||||
completeSub.complete();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
<h1>Swap Peers</h1>
|
@ -1,35 +0,0 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { SharedModule } from '../../../../shared.module';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { SwapPeersComponent } from './swap-peers.component';
|
||||
|
||||
describe('SwapPeersComponent', () => {
|
||||
let component: SwapPeersComponent;
|
||||
let fixture: ComponentFixture<SwapPeersComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [SwapPeersComponent],
|
||||
imports: [
|
||||
BrowserAnimationsModule,
|
||||
SharedModule
|
||||
],
|
||||
providers: []
|
||||
}).
|
||||
compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SwapPeersComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
TestBed.resetTestingModule();
|
||||
});
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-peerswap-peers',
|
||||
templateUrl: './swap-peers.component.html',
|
||||
styleUrls: ['./swap-peers.component.scss']
|
||||
})
|
||||
export class SwapPeersComponent implements OnDestroy {
|
||||
|
||||
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unSubs.forEach((completeSub) => {
|
||||
completeSub.next(<any>null);
|
||||
completeSub.complete();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
<h1>Peerswaps Cancelled</h1>
|
@ -1,35 +0,0 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { SharedModule } from '../../../../shared.module';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { PeerswapsCancelledComponent } from './swaps-cancelled.component';
|
||||
|
||||
describe('PeerswapsCancelledComponent', () => {
|
||||
let component: PeerswapsCancelledComponent;
|
||||
let fixture: ComponentFixture<PeerswapsCancelledComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PeerswapsCancelledComponent],
|
||||
imports: [
|
||||
BrowserAnimationsModule,
|
||||
SharedModule
|
||||
],
|
||||
providers: []
|
||||
}).
|
||||
compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PeerswapsCancelledComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
TestBed.resetTestingModule();
|
||||
});
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-peerswap-cancelled',
|
||||
templateUrl: './swaps-cancelled.component.html',
|
||||
styleUrls: ['./swaps-cancelled.component.scss']
|
||||
})
|
||||
export class PeerswapsCancelledComponent implements OnDestroy {
|
||||
|
||||
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unSubs.forEach((completeSub) => {
|
||||
completeSub.next(<any>null);
|
||||
completeSub.complete();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
<h1>Peerswaps In</h1>
|
@ -1,35 +0,0 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { SharedModule } from '../../../../shared.module';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { PeerswapsInComponent } from './swaps-in.component';
|
||||
|
||||
describe('PeerswapsInComponent', () => {
|
||||
let component: PeerswapsInComponent;
|
||||
let fixture: ComponentFixture<PeerswapsInComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PeerswapsInComponent],
|
||||
imports: [
|
||||
BrowserAnimationsModule,
|
||||
SharedModule
|
||||
],
|
||||
providers: []
|
||||
}).
|
||||
compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PeerswapsInComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
TestBed.resetTestingModule();
|
||||
});
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-peer-swaps-in',
|
||||
templateUrl: './swaps-in.component.html',
|
||||
styleUrls: ['./swaps-in.component.scss']
|
||||
})
|
||||
export class PeerswapsInComponent implements OnDestroy {
|
||||
|
||||
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unSubs.forEach((completeSub) => {
|
||||
completeSub.next(<any>null);
|
||||
completeSub.complete();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
<h1>Peerswaps Out</h1>
|
@ -1,35 +0,0 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { SharedModule } from '../../../../shared.module';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { PeerswapsOutComponent } from './swaps-out.component';
|
||||
|
||||
describe('PeerswapsOutComponent', () => {
|
||||
let component: PeerswapsOutComponent;
|
||||
let fixture: ComponentFixture<PeerswapsOutComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PeerswapsOutComponent],
|
||||
imports: [
|
||||
BrowserAnimationsModule,
|
||||
SharedModule
|
||||
],
|
||||
providers: []
|
||||
}).
|
||||
compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PeerswapsOutComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
TestBed.resetTestingModule();
|
||||
});
|
||||
});
|
@ -1,22 +0,0 @@
|
||||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-peer-swaps-out',
|
||||
templateUrl: './swaps-out.component.html',
|
||||
styleUrls: ['./swaps-out.component.scss']
|
||||
})
|
||||
export class PeerswapsOutComponent implements OnDestroy {
|
||||
|
||||
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unSubs.forEach((completeSub) => {
|
||||
completeSub.next(<any>null);
|
||||
completeSub.complete();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue