Some text changes

Some text changes
pull/163/head
ShahanaFarooqui 5 years ago
parent 254899ee41
commit bd6e352d21

@ -8,5 +8,5 @@
<link rel="stylesheet" href="styles.4ea35a27750bb09e5436.css"></head>
<body>
<rtl-app></rtl-app>
<script type="text/javascript" src="runtime.26209474bfa8dc87a77c.js"></script><script type="text/javascript" src="polyfills.d68e8f4f73dfaef206f1.js"></script><script type="text/javascript" src="main.6a18826b4a451ccb5b3b.js"></script></body>
<script type="text/javascript" src="runtime.26209474bfa8dc87a77c.js"></script><script type="text/javascript" src="polyfills.d68e8f4f73dfaef206f1.js"></script><script type="text/javascript" src="main.1ad19ad44093dc8cdae9.js"></script></body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4,8 +4,8 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --base-href /rtl/ --open",
"build": "ng build --prod --base-href /rtl/",
"start": "ng serve --base-href /rtl/ --open --aot",
"build": "ng build --prod --base-href /rtl/ --aot",
"serve": "ng serve",
"prebuild": "node ./prebuild",
"test": "ng test",

@ -3,7 +3,7 @@
<mat-card [ngClass]="{'flip': redirectedWithPeer}">
<mat-card-header>
<mat-card-subtitle>
<h2>Add Channel</h2>
<h2>Open Channel</h2>
</mat-card-subtitle>
</mat-card-header>
<mat-card-content>

@ -3,18 +3,18 @@
<mat-card>
<mat-card-header>
<mat-card-subtitle>
<h2>Add Peer</h2>
<h2>Connect Peer</h2>
</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<form fxLayout="column" fxLayout.gt-sm="row wrap" (ngSubmit)="addPeerForm.form.valid && onAddPeer(addPeerForm)" #addPeerForm="ngForm">
<form fxLayout="column" fxLayout.gt-sm="row wrap" (ngSubmit)="connectPeerForm.form.valid && onConnectPeer(connectPeerForm)" #connectPeerForm="ngForm">
<mat-form-field fxFlex="70" fxLayoutAlign="start end">
<input matInput placeholder="Lightning Address (pubkey OR pubkey@ip:port)" name="peerAddress" [(ngModel)]="peerAddress" tabindex="1" required #peerAdd="ngModel">
</mat-form-field>
<div fxFlex="15" fxLayoutAlign="start start">
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="primary" [disabled]="peerAdd.invalid" type="submit" tabindex="2">
<p *ngIf="peerAdd.invalid && (peerAdd.dirty || peerAdd.touched); else addText">Invalid Address</p>
<ng-template #addText><p>Add</p></ng-template>
<p *ngIf="peerAdd.invalid && (peerAdd.dirty || peerAdd.touched); else connectText">Invalid Address</p>
<ng-template #connectText><p>Connect</p></ng-template>
</button>
</div>
<div fxFlex="15" fxLayoutAlign="start start">
@ -24,7 +24,7 @@
</mat-card-content>
</mat-card>
</div>
<div class="padding-gap">
<div class="pconnecting-gap">
<mat-card>
<mat-card-content class="table-card-content">
<div fxLayout="row" fxLayoutAlign="start start">
@ -39,9 +39,9 @@
<th mat-header-cell *matHeaderCellDef>Detach</th>
<td mat-cell *matCellDef="let peer"><mat-icon color="accent" (click)="onPeerDetach(peer)">link_off</mat-icon></td>
</ng-container>
<ng-container matColumnDef="add_channel">
<th mat-header-cell *matHeaderCellDef>Add Channel</th>
<td mat-cell *matCellDef="let peer"><mat-icon color="accent" (click)="onAddChannel(peer)">playlist_add</mat-icon></td>
<ng-container matColumnDef="open_channel">
<th mat-header-cell *matHeaderCellDef>Open Channel</th>
<td mat-cell *matCellDef="let peer"><mat-icon color="accent" (click)="onOpenChannel(peer)">playlist_add</mat-icon></td>
</ng-container>
<ng-container matColumnDef="pub_key">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Pub Key </th>

@ -42,15 +42,15 @@ export class PeersComponent implements OnInit, OnDestroy {
this.displayedColumns = ['detach', 'pub_key', 'alias', 'address', 'sat_sent', 'sat_recv'];
break;
case (window.innerWidth > 730 && window.innerWidth <= 1024):
this.displayedColumns = ['detach', 'add_channel', 'pub_key', 'alias', 'address', 'sat_sent', 'sat_recv', 'inbound'];
this.displayedColumns = ['detach', 'open_channel', 'pub_key', 'alias', 'address', 'sat_sent', 'sat_recv', 'inbound'];
break;
case (window.innerWidth > 1024 && window.innerWidth <= 1280):
this.flgSticky = true;
this.displayedColumns = ['detach', 'add_channel', 'pub_key', 'alias', 'address', 'sat_sent', 'sat_recv', 'inbound', 'ping_time'];
this.displayedColumns = ['detach', 'open_channel', 'pub_key', 'alias', 'address', 'sat_sent', 'sat_recv', 'inbound', 'ping_time'];
break;
default:
this.flgSticky = true;
this.displayedColumns = ['detach', 'add_channel', 'pub_key', 'alias', 'address', 'bytes_sent', 'bytes_recv', 'sat_sent', 'sat_recv', 'inbound', 'ping_time'];
this.displayedColumns = ['detach', 'open_channel', 'pub_key', 'alias', 'address', 'bytes_sent', 'bytes_recv', 'sat_sent', 'sat_recv', 'inbound', 'ping_time'];
break;
}
}
@ -87,7 +87,7 @@ export class PeersComponent implements OnInit, OnDestroy {
});
}
onAddPeer(form: any) {
onConnectPeer(form: any) {
this.flgAnimate = true;
const pattern = '^([a-zA-Z0-9]){1,66}@(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]):[0-9]+$';
const deviderIndex = this.peerAddress.search('@');
@ -97,7 +97,7 @@ export class PeersComponent implements OnInit, OnDestroy {
if (new RegExp(pattern).test(this.peerAddress)) {
pubkey = this.peerAddress.substring(0, deviderIndex);
host = this.peerAddress.substring(deviderIndex + 1);
this.addPeerWithParams(pubkey, host);
this.connectPeerWithParams(pubkey, host);
} else {
pubkey = (deviderIndex > -1) ? this.peerAddress.substring(0, deviderIndex) : this.peerAddress;
this.store.dispatch(new RTLActions.OpenSpinner('Getting Node Address...'));
@ -106,12 +106,12 @@ export class PeersComponent implements OnInit, OnDestroy {
.pipe(take(1))
.subscribe(graphNode => {
host = (undefined === graphNode.node.addresses || undefined === graphNode.node.addresses[0].addr) ? '' : graphNode.node.addresses[0].addr;
this.addPeerWithParams(pubkey, host);
this.connectPeerWithParams(pubkey, host);
});
}
}
addPeerWithParams(pubkey: string, host: string) {
connectPeerWithParams(pubkey: string, host: string) {
this.newlyAddedPeer = pubkey;
this.store.dispatch(new RTLActions.OpenSpinner('Adding Peer...'));
this.store.dispatch(new RTLActions.SaveNewPeer({pubkey: pubkey, host: host, perm: false}));
@ -135,7 +135,7 @@ export class PeersComponent implements OnInit, OnDestroy {
this.peerAddress = '';
}
onAddChannel(peerToAddChannel: Peer) {
onOpenChannel(peerToAddChannel: Peer) {
this.router.navigate(['chnlmanage'], { state: { peer: peerToAddChannel.pub_key }});
}

Loading…
Cancel
Save