Wallet and Channel restore

Wallet and Channel restore
pull/260/head
Shahana Farooqui 5 years ago
parent c2e96740e4
commit 860e72800e

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -9,8 +9,8 @@
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon/favicon-16x16.png">
<link rel="manifest" href="assets/images/favicon/site.webmanifest">
<link rel="stylesheet" href="styles.58bb0d5e23e447322101.css"></head>
<link rel="stylesheet" href="styles.10ea0d6f9c4caa3ba27d.css"></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.97120254803e999a5dc0.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.4f4bd66420eabc97480b.js"></script></body>
<script src="runtime.900a115b5ee8fedc9bea.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.be5448d1824fb41b28d5.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

@ -0,0 +1 @@
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"50859d501eab13ab41b8",6:"244e17a7d7b515a4b924",7:"3c3b40e20ade1c335151"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var l=0;l<i.length;l++)r(i[l]);var f=c;t()}([]);

@ -1 +0,0 @@
!function(e){function r(r){for(var n,i,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)o[i=a[p]]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++)0!==o[t[a]]&&(n=!1);n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={0:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+""+({}[e]||e)+"."+{1:"c7ef37d92d6c98e58e25",6:"bb075656f8b4a826eed4",7:"207f6b0883d4876d89ed"}[e]+".js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,(function(r){return e[r]}).bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="",i.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var l=c;t()}([]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -27,7 +27,7 @@ export const ClRoutes: Routes = [
{ path: 'invoices', component: CLInvoicesComponent, canActivate: [CLUnlockedGuard] },
{ path: 'forwardinghistory', component: CLForwardingHistoryComponent, canActivate: [CLUnlockedGuard] },
{ path: 'lookups', component: CLLookupsComponent, canActivate: [CLUnlockedGuard] },
{ path: 'unlocklnd', redirectTo: 'home' },
{ path: 'wallet', redirectTo: 'home' },
{ path: 'chnlclosed', redirectTo: 'chnlmanage' },
{ path: 'chnlpending', redirectTo: 'chnlmanage' },
{ path: 'chnlbackup', redirectTo: 'chnlmanage' },

@ -14,7 +14,7 @@ import { OnChainSendComponent } from './on-chain/on-chain-send/on-chain-send.com
import { OnChainReceiveComponent } from './on-chain/on-chain-receive/on-chain-receive.component';
import { OnChainComponent } from './on-chain/on-chain.component';
import { OnChainTransactionHistoryComponent } from './on-chain/on-chain-transaction-history/on-chain-transaction-history.component';
import { UnlockLNDComponent } from './unlock-lnd/unlock-lnd.component';
import { WalletComponent } from './wallet/wallet.component';
import { LightningPaymentsComponent } from './transactions/payments/lightning-payments.component';
import { ChannelManageComponent } from './peers-channels/channels/channel-manage/channel-manage.component';
import { ChannelPendingTableComponent } from './peers-channels/channels/channels-tables/channel-pending-table/channel-pending-table.component';
@ -32,6 +32,8 @@ import { QueryRoutesComponent } from './payments/query-routes/query-routes.compo
import { LoggerService, ConsoleLoggerService } from '../shared/services/logger.service';
import { LNDUnlockedGuard } from '../shared/services/auth.guard';
import { ChannelOpenTableComponent } from './peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component';
import { UnlockWalletComponent } from './wallet/unlock/unlock.component';
import { InitializeWalletComponent } from './wallet/initialize/initialize.component';
@NgModule({
imports: [
@ -45,7 +47,7 @@ import { ChannelOpenTableComponent } from './peers-channels/channels/channels-ta
PeersComponent,
PeersChannelsComponent,
LightningInvoicesComponent,
UnlockLNDComponent,
WalletComponent,
LightningPaymentsComponent,
ChannelManageComponent,
ChannelPendingTableComponent,
@ -64,7 +66,9 @@ import { ChannelOpenTableComponent } from './peers-channels/channels/channels-ta
OnChainComponent,
OnChainTransactionHistoryComponent,
ChannelsTablesComponent,
ChannelOpenTableComponent
ChannelOpenTableComponent,
UnlockWalletComponent,
InitializeWalletComponent
],
providers: [
{ provide: LoggerService, useClass: ConsoleLoggerService },

@ -4,7 +4,7 @@ import { ModuleWithProviders } from '@angular/core';
import { LNDRootComponent } from './lnd-root.component';
import { HomeComponent } from './home/home.component';
import { PeersChannelsComponent } from './peers-channels/peers-channels.component';
import { UnlockLNDComponent } from './unlock-lnd/unlock-lnd.component';
import { WalletComponent } from './wallet/wallet.component';
import { TransactionsComponent } from './transactions/transactions.component';
import { QueryRoutesComponent } from './payments/query-routes/query-routes.component';
import { LookupsComponent } from './lookups/lookups.component';
@ -18,7 +18,7 @@ import { NotFoundComponent } from '../shared/components/not-found/not-found.comp
export const LndRoutes: Routes = [
{ path: '', component: LNDRootComponent,
children: [
{ path: 'unlocklnd', component: UnlockLNDComponent, canActivate: [AuthGuard] },
{ path: 'wallet', component: WalletComponent, canActivate: [AuthGuard] },
{ path: 'home', component: HomeComponent, canActivate: [LNDUnlockedGuard] },
{ path: 'peerschannels', component: PeersChannelsComponent, canActivate: [LNDUnlockedGuard] },
{ path: 'transactions', component: TransactionsComponent, canActivate: [LNDUnlockedGuard] },

@ -1,6 +1,6 @@
<div fxLayout="column">
<div fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap">
<h4 fxFlex="100">Save your backup files in a redundant location.</h4>
<h4 fxFlex="100" class="blinker">Save your backup files in a redundant location.</h4>
<h4 fxFlex="100" class="mt-1">Backup folder location: {{selNode.channelBackupPath}}</h4>
<div fxLayout="row" fxFlex.gt-sm="30" fxLayoutAlign.gt-sm="space-between start" fxLayoutAlign="start start" class="mt-2">
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="1" (click)="onVerifyChannels({})">Verify All Channels Backup</button>
@ -16,7 +16,7 @@
<div perfectScrollbar fxLayout="row" fxLayoutAlign="start center" fxFlex="100" class="table-container">
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table [dataSource]="channels" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="chan_point">
<ng-container matColumnDef="channel_point">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
<td mat-cell *matCellDef="let channel">{{channel?.channel_point}}</td>
</ng-container>

@ -28,14 +28,14 @@ import * as fromRTLReducer from '../../../../../store/rtl.reducers';
export class ChannelBackupTableComponent implements OnInit, OnDestroy {
@ViewChild(MatSort, { static: true }) sort: MatSort;
@ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
public pageSize = PAGE_SIZE;
public pageSizeOptions = PAGE_SIZE_OPTIONS;
public selNode: SelNodeChild = {};
public displayedColumns = ['chan_point', 'actions'];
public displayedColumns = ['channel_point', 'actions'];
public selChannel: Channel;
public channels: any;
public flgLoading: Array<Boolean | 'error'> = [true]; // 0: channels
public flgSticky = false;
public pageSize = PAGE_SIZE;
public pageSizeOptions = PAGE_SIZE_OPTIONS;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private rtlEffects: RTLEffects, private actions$: Actions, private router: Router) {}

@ -6,11 +6,11 @@
<mat-expansion-panel-header>
<mat-panel-title>Pending Open Channels({{pendingOpenChannelsLength}})</mat-panel-title>
</mat-expansion-panel-header>
<div perfectScrollbar class="table-container">
<mat-table #table [dataSource]="pendingOpenChannels" matSort [ngClass]="{'error-border bordered-box': flgLoading[0]==='error','bordered-box': true}">
<div perfectScrollbar fxLayout="row" fxLayoutAlign="start center" fxFlex="100" class="table-container">
<mat-table #table [dataSource]="pendingOpenChannels" matSort [ngClass]="{'w-100 error-border bordered-box': flgLoading[0]==='error','bordered-box w-100': true}">
<ng-container matColumnDef="channel_point">
<mat-header-cell class="pl-2" *matHeaderCellDef mat-sort-header> Channel Point </mat-header-cell>
<mat-cell class="pl-2" *matCellDef="let channel">{{channel.channel.channel_point}}</mat-cell>
<mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </mat-header-cell>
<mat-cell *matCellDef="let channel">{{channel.channel.channel_point}}</mat-cell>
</ng-container>
<ng-container matColumnDef="commit_fee">
<mat-header-cell fxLayoutAlign="end center" *matHeaderCellDef mat-sort-header arrowPosition="before">Commit Fee </mat-header-cell>
@ -25,12 +25,10 @@
<mat-cell fxLayoutAlign="end center" *matCellDef="let channel">{{channel.channel.capacity | number}}</mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell fxLayoutAlign="end center" class="pl-4 pr-3" *matHeaderCellDef>Actions</mat-header-cell>
<td mat-cell *matCellDef="let channel" class="pl-4">
<span fxLayoutAlign="end center">
<button mat-stroked-button color="primary" type="button" tabindex="1" (click)="onPendingClick(channel,$event)">View Info</button>
</span>
</td>
<mat-header-cell fxLayoutAlign="end center" class="px-4" *matHeaderCellDef>Actions</mat-header-cell>
<mat-cell fxLayoutAlign="end center" *matCellDef="let channel" class="px-4">
<button mat-stroked-button color="primary" type="button" tabindex="1" (click)="onOpenClick(channel)">View Info</button>
</mat-cell>
</ng-container>
<ng-container matColumnDef="no_pending_open">
<td mat-footer-cell *matFooterCellDef colspan="4">
@ -39,8 +37,7 @@
</ng-container>
<tr mat-footer-row fxLayoutAlign="start center" *matFooterRowDef="['no_pending_open']" [ngClass]="{'display-none': pendingOpenChannels && pendingOpenChannels.data && pendingOpenChannels.data.length>0}"></tr>
<mat-header-row *matHeaderRowDef="displayedOpenColumns"></mat-header-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedOpenColumns;"
(click)="onOpenClick(row, $event)"></mat-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedOpenColumns;"></mat-row>
</mat-table>
</div>
</mat-expansion-panel>
@ -69,11 +66,9 @@
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell fxLayoutAlign="end center" class="pl-4 pr-3" *matHeaderCellDef>Actions</mat-header-cell>
<td mat-cell *matCellDef="let channel" class="pl-4">
<span fxLayoutAlign="end center">
<button mat-stroked-button color="primary" type="button" tabindex="2" (click)="onPendingClick(channel,$event)">View Info</button>
</span>
</td>
<mat-cell fxLayoutAlign="end center" *matCellDef="let channel" class="pl-4">
<button mat-stroked-button color="primary" type="button" tabindex="2" (click)="onForceClosingClick(channel)">View Info</button>
</mat-cell>
</ng-container>
<ng-container matColumnDef="no_pending_force_closing">
<td mat-footer-cell *matFooterCellDef colspan="4">
@ -82,8 +77,7 @@
</ng-container>
<tr mat-footer-row fxLayoutAlign="start center" *matFooterRowDef="['no_pending_force_closing']" [ngClass]="{'display-none': pendingForceClosingChannels && pendingForceClosingChannels.data && pendingForceClosingChannels.data.length>0}"></tr>
<mat-header-row *matHeaderRowDef="displayedForceClosingColumns"></mat-header-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedForceClosingColumns;"
(click)="onForceClosingClick(row, $event)"></mat-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedForceClosingColumns;"></mat-row>
</mat-table>
</div>
</mat-expansion-panel>
@ -119,11 +113,9 @@
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell fxLayoutAlign="end center" class="pl-4 pr-3" *matHeaderCellDef>Actions</mat-header-cell>
<td mat-cell *matCellDef="let channel" class="pl-4">
<span fxLayoutAlign="end center">
<button mat-stroked-button color="primary" type="button" tabindex="3" (click)="onPendingClick(channel,$event)">View Info</button>
</span>
</td>
<mat-cell fxLayoutAlign="end center" *matCellDef="let channel" class="pl-4">
<button mat-stroked-button color="primary" type="button" tabindex="3" (click)="onClosingClick(channel)">View Info</button>
</mat-cell>
</ng-container>
<ng-container matColumnDef="no_pending_closing">
<td mat-footer-cell *matFooterCellDef colspan="4">
@ -132,8 +124,7 @@
</ng-container>
<tr mat-footer-row fxLayoutAlign="start center" *matFooterRowDef="['no_pending_closing']" [ngClass]="{'display-none': pendingClosingChannels && pendingClosingChannels.data && pendingClosingChannels.data.length>0}"></tr>
<mat-header-row *matHeaderRowDef="displayedClosingColumns"></mat-header-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedClosingColumns;"
(click)="onClosingClick(row, $event)"></mat-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedClosingColumns;"></mat-row>
</mat-table>
</div>
</mat-expansion-panel>
@ -175,11 +166,9 @@
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell fxLayoutAlign="end center" class="pl-4 pr-3" *matHeaderCellDef>Actions</mat-header-cell>
<td mat-cell *matCellDef="let channel" class="pl-4">
<span fxLayoutAlign="end center">
<button mat-stroked-button color="primary" type="button" tabindex="4" (click)="onPendingClick(channel,$event)">View Info</button>
</span>
</td>
<mat-cell fxLayoutAlign="end center" *matCellDef="let channel" class="pl-4">
<button mat-stroked-button color="primary" type="button" tabindex="4" (click)="onWaitClosingClick(channel)">View Info</button>
</mat-cell>
</ng-container>
<ng-container matColumnDef="no_pending_wait_closing">
<td mat-footer-cell *matFooterCellDef colspan="4">
@ -188,8 +177,7 @@
</ng-container>
<tr mat-footer-row fxLayoutAlign="start center" *matFooterRowDef="['no_pending_wait_closing']" [ngClass]="{'py-0': true, 'display-none': pendingWaitClosingChannels && pendingWaitClosingChannels.data && pendingWaitClosingChannels.data.length>0}"></tr>
<mat-header-row *matHeaderRowDef="displayedWaitClosingColumns"></mat-header-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedWaitClosingColumns;"
(click)="onWaitClosingClick(row, $event)"></mat-row>
<mat-row fxLayoutAlign="stretch stretch" *matRowDef="let row; columns: displayedWaitClosingColumns;"></mat-row>
</mat-table>
</div>
</mat-expansion-panel>

@ -23,60 +23,51 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
public selectedFilter = 0;
public information: GetInfo = {};
public pendingChannels: PendingChannels = {};
public displayedClosingColumns = [
'closing_txid',
'channel_point', 'remote_balance', 'local_balance', 'remote_node_pub', 'capacity', 'actions'
];
public pendingClosingChannelsLength = 0;
public pendingClosingChannels: any;
public displayedForceClosingColumns = [
'closing_txid', 'limbo_balance', 'maturity_height', 'blocks_til_maturity', 'recovered_balance',
'channel_point', 'remote_balance', 'local_balance', 'remote_node_pub', 'capacity', 'actions'
];
public pendingForceClosingChannelsLength = 0;
public pendingForceClosingChannels: any;
public displayedOpenColumns = ['channel_point', 'commit_fee', 'commit_weight', 'capacity', 'actions'];
public pendingOpenChannelsLength = 0;
public pendingOpenChannels: any;
public displayedWaitClosingColumns = [
'limbo_balance',
'channel_point', 'remote_balance', 'local_balance', 'remote_node_pub', 'capacity', 'actions'
];
public displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'capacity', 'actions'];
public pendingForceClosingChannelsLength = 0;
public pendingForceClosingChannels: any;
public displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'capacity', 'actions'];
public pendingClosingChannelsLength = 0;
public pendingClosingChannels: any;
public displayedWaitClosingColumns = ['channel_point', 'limbo_balance', 'local_balance', 'remote_balance', 'actions'];
public pendingWaitClosingChannelsLength = 0;
public pendingWaitClosingChannels: any;
public flgLoading: Array<Boolean | 'error'> = [true];
private unsub: Array<Subject<void>> = [new Subject(), new Subject()];
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private rtlEffects: RTLEffects) {
switch (true) {
case (window.innerWidth <= 415):
this.displayedClosingColumns = ['channel_point', 'capacity', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'limbo_balance', 'actions'];
this.displayedOpenColumns = ['channel_point', 'commit_fee', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'limbo_balance', 'actions'];
this.displayedClosingColumns = ['channel_point', 'capacity', 'actions'];
this.displayedWaitClosingColumns = ['channel_point', 'limbo_balance', 'actions'];
break;
case (window.innerWidth > 415 && window.innerWidth <= 730):
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'actions'];
this.displayedOpenColumns = ['channel_point', 'commit_fee', 'commit_weight', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'actions'];
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'actions'];
this.displayedWaitClosingColumns = ['channel_point', 'limbo_balance', 'capacity', 'actions'];
break;
case (window.innerWidth > 730 && window.innerWidth <= 1024):
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'capacity', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'capacity', 'actions'];
this.displayedOpenColumns = ['channel_point', 'commit_fee', 'commit_weight', 'capacity', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'capacity', 'actions'];
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'capacity', 'actions'];
this.displayedWaitClosingColumns = ['channel_point', 'limbo_balance', 'local_balance', 'remote_balance', 'actions'];
break;
case (window.innerWidth > 1024 && window.innerWidth <= 1280):
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'capacity', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'capacity', 'actions'];
this.displayedOpenColumns = ['channel_point', 'commit_fee', 'commit_weight', 'capacity', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'capacity', 'actions'];
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'capacity', 'actions'];
this.displayedWaitClosingColumns = ['channel_point', 'limbo_balance', 'local_balance', 'remote_balance', 'actions'];
break;
default:
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'capacity', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'capacity', 'actions'];
this.displayedOpenColumns = ['channel_point', 'commit_fee', 'commit_weight', 'capacity', 'actions'];
this.displayedForceClosingColumns = ['channel_point', 'recovered_balance', 'limbo_balance', 'capacity', 'actions'];
this.displayedClosingColumns = ['channel_point', 'local_balance', 'remote_balance', 'capacity', 'actions'];
this.displayedWaitClosingColumns = ['channel_point', 'limbo_balance', 'local_balance', 'remote_balance', 'actions'];
break;
}
@ -84,7 +75,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
ngOnInit() {
this.store.select('lnd')
.pipe(takeUntil(this.unsub[0]))
.pipe(takeUntil(this.unSubs[0]))
.subscribe((rtlStore) => {
rtlStore.effectErrorsLnd.forEach(effectsErr => {
if (effectsErr.action === 'FetchChannels/pending') {
@ -97,14 +88,14 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
this.pendingChannels = rtlStore.pendingChannels;
if (this.pendingChannels.total_limbo_balance) {
this.flgLoading[1] = false;
if (this.pendingChannels.pending_closing_channels) {
this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels);
if (this.pendingChannels.pending_open_channels) {
this.loadOpenChannelsTable(this.pendingChannels.pending_open_channels);
}
if (this.pendingChannels.pending_force_closing_channels) {
this.loadForceClosingChannelsTable(this.pendingChannels.pending_force_closing_channels);
}
if (this.pendingChannels.pending_open_channels) {
this.loadOpenChannelsTable(this.pendingChannels.pending_open_channels);
if (this.pendingChannels.pending_closing_channels) {
this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels);
}
if (this.pendingChannels.waiting_close_channels) {
this.loadWaitClosingChannelsTable(this.pendingChannels.waiting_close_channels);
@ -118,7 +109,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
}
onOpenClick(selRow: any, event: any) {
onOpenClick(selRow: any) {
const selChannel = this.pendingOpenChannels.data.filter(channel => {
return channel.channel.channel_point === selRow.channel.channel_point;
})[0];
@ -132,7 +123,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
}}}));
}
onForceClosingClick(selRow: any, event: any) {
onForceClosingClick(selRow: any) {
const selChannel = this.pendingForceClosingChannels.data.filter(channel => {
return channel.channel.channel_point === selRow.channel.channel_point;
})[0];
@ -146,7 +137,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
}}}));
}
onClosingClick(selRow: any, event: any) {
onClosingClick(selRow: any) {
const selChannel = this.pendingClosingChannels.data.filter(channel => {
return channel.channel.channel_point === selRow.channel.channel_point;
})[0];
@ -160,7 +151,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
}}}));
}
onWaitClosingClick(selRow: any, event: any) {
onWaitClosingClick(selRow: any) {
const selChannel = this.pendingWaitClosingChannels.data.filter(channel => {
return channel.channel.channel_point === selRow.channel.channel_point;
})[0];
@ -218,23 +209,8 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
this.selectedFilter = selFilter;
}
onPendingClick(selRow: any, event: any) {
// // const flgExpansionClicked = event.target.className.includes('mat-expansion-panel-header') || event.target.className.includes('mat-expansion-indicator');
// // if (flgExpansionClicked) { return; }
// const selPayment = this.payments.data.filter(payment => {
// return payment.payment_hash === selRow.payment_hash;
// })[0];
// const reorderedPayment = JSON.parse(JSON.stringify(selPayment, [
// 'creation_date_str', 'payment_hash', 'fee', 'value_msat', 'value_sat', 'value', 'payment_preimage', 'path'
// ] , 2));
// this.store.dispatch(new RTLActions.OpenAlert({config: { width: '75%', data: {
// type: 'INFO',
// message: JSON.stringify(reorderedPayment)
// }}}));
}
ngOnDestroy() {
this.unsub.forEach(completeSub => {
this.unSubs.forEach(completeSub => {
completeSub.next();
completeSub.complete();
});

@ -1,69 +1,47 @@
<div fxLayout="column">
<div class="padding-gap" *ngIf="allRestoreExists">
<mat-card>
<mat-card-header>
<mat-card-subtitle>
<h2>Channels Restore</h2>
</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<div fxLayout="column" fxLayout.gt-sm="row wrap" fxFlex="100" fxLayoutAlign="space-between start">
<h4 fxFlex="100">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
<button fxFlex="49" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="1"
(click)="onRestoreChannels({})">Restore All Channels</button>
</div>
</mat-card-content>
</mat-card>
<div fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" *ngIf="allRestoreExists">
<h4 fxFlex="100" class="mt-1">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
<div fxLayout="row" fxFlex.gt-sm="20" fxLayoutAlign="start start" class="mt-2">
<button fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="1" (click)="onRestoreChannels({})">Restore All Channels</button>
</div>
</div>
<div class="padding-gap" *ngIf="!allRestoreExists && (!channels || channels.data.length<=0)">
<mat-card>
<mat-card-header>
<mat-card-subtitle>
<h2>Channels Restore</h2>
<h4 fxLayout="row" fxLayoutAlign="start start" class="pt-2">
Restore folder location: {{selNode.channelBackupPath}}/restore
</h4>
</mat-card-subtitle>
</mat-card-header>
<mat-card-content class="table-card-content">
Backup file/s not found!<br>To perform channel restoration, channel backup file/s must be placed at the above location.
</mat-card-content>
</mat-card>
<div fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" *ngIf="!allRestoreExists && (!channels || channels.data.length<=0)">
<h4 fxFlex="100" class="mt-1">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
<h4 fxFlex="100" class="mt-1">All channel backup file not found! To perform channel restoration, channel backup file/s must be placed at the above location.</h4>
</div>
<div class="padding-gap" *ngIf="channels && channels.data.length>0">
<mat-card>
<mat-card-header *ngIf="!allRestoreExists">
<mat-card-subtitle>
<h2>Channels Restore</h2>
<h4 fxLayout="row" fxLayoutAlign="start start" class="pt-2">Restore folder location:
{{selNode.channelBackupPath}}/restore</h4>
</mat-card-subtitle>
</mat-card-header>
<mat-card-content class="table-card-content">
<div fxLayout="row" fxLayoutAlign="start start">
<mat-form-field fxFlex="30">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field>
</div>
<div perfectScrollbar class="table-container">
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table [dataSource]="channels" matSort
[ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="chan_point">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
<td mat-cell *matCellDef="let channel">{{channel?.channel_point}}</td>
</ng-container>
<ng-container matColumnDef="restore">
<th mat-header-cell *matHeaderCellDef>Restore</th>
<td mat-cell *matCellDef="let channel">
<mat-icon color="primary" (click)="onRestoreChannels(channel)">restore</mat-icon>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: flgSticky;"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
</div>
</mat-card-content>
</mat-card>
<div fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-md="row wrap" *ngIf="!allRestoreExists && channels && channels.data.length && channels.data.length>0">
<h4 fxFlex="100" class="mt-1">Restore folder location: {{selNode.channelBackupPath}}/restore</h4>
</div>
</div>
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-sub-title-container mt-minus-2">
<div fxFlex="70"></div>
<mat-form-field fxFlex="30">
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter">
</mat-form-field>
</div>
<div perfectScrollbar fxLayout="row" fxLayoutAlign="start center" fxFlex="100" class="table-container">
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table [dataSource]="channels" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="channel_point">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Channel Point </th>
<td mat-cell *matCellDef="let channel">{{channel?.channel_point}}</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef class="pl-4 pr-3"><span fxLayoutAlign="end center">Actions</span></th>
<td mat-cell *matCellDef="let channel" class="pl-4">
<span fxLayoutAlign="end center">
<button mat-stroked-button color="primary" type="button" tabindex="1" (click)="onRestoreChannels(channel)">Restore</button>
</span>
</td>
</ng-container>
<ng-container matColumnDef="no_channel">
<td mat-footer-cell *matFooterCellDef colspan="4">
<p *ngIf="!channels || !channels.data || channels.data.length<1">No singular channel backups available.</p>
</td>
</ng-container>
<tr mat-footer-row *matFooterRowDef="['no_channel']" [ngClass]="{'display-none': channels && channels.data && channels.data.length>0}"></tr>
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: flgSticky;"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
</div>
<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions" showFirstLastButtons class="mb-4"></mat-paginator>
</div>

@ -1,12 +1,6 @@
.mat-column-chan_point {
flex: 1 1 25%;
min-width: 100px;
max-width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1 1 25%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
table {
width:100%;
}

@ -1,30 +1,35 @@
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil, filter } from 'rxjs/operators';
import { takeUntil } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { Actions } from '@ngrx/effects';
import { MatTableDataSource, MatSort } from '@angular/material';
import { MatTableDataSource, MatSort, MatPaginator, MatPaginatorIntl } from '@angular/material';
import { SelNodeChild } from '../../../../../shared/models/RTLconfig';
import { Channel } from '../../../../../shared/models/lndModels';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../../../../shared/models/enums';
import { getPaginatorLabel } from '../../../../../shared/services/paginator.service';
import { LoggerService } from '../../../../../shared/services/logger.service';
import { LNDEffects } from '../../../../store/lnd.effects';
import { RTLEffects } from '../../../../../store/rtl.effects';
import * as RTLActions from '../../../../../store/rtl.actions';
import * as fromRTLReducer from '../../../../../store/rtl.reducers';
@Component({
selector: 'rtl-channel-restore-table',
templateUrl: './channel-restore-table.component.html',
styleUrls: ['./channel-restore-table.component.scss']
styleUrls: ['./channel-restore-table.component.scss'],
providers: [
{ provide: MatPaginatorIntl, useValue: getPaginatorLabel('Channels') }
]
})
export class ChannelRestoreTableComponent implements OnInit {
@ViewChild(MatSort, { static: true }) sort: MatSort;
@ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
public pageSize = PAGE_SIZE;
public pageSizeOptions = PAGE_SIZE_OPTIONS;
public selNode: SelNodeChild = {};
public displayedColumns = ['chan_point', 'restore'];
public displayedColumns = ['channel_point', 'actions'];
public selChannel: Channel;
public channels: any;
public allRestoreExists = false;
@ -32,7 +37,7 @@ export class ChannelRestoreTableComponent implements OnInit {
public flgSticky = false;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private lndEffects: LNDEffects, private actions$: Actions) {}
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private lndEffects: LNDEffects) {}
ngOnInit() {
this.store.dispatch(new RTLActions.RestoreChannelsList());
@ -49,6 +54,8 @@ export class ChannelRestoreTableComponent implements OnInit {
this.channels = new MatTableDataSource([...resRCList.files]);
this.channels.data = resRCList.files;
this.channels.sort = this.sort;
this.channels.paginator = this.paginator;
console.warn(this.channels);
if (this.flgLoading[0] !== 'error' || (resRCList && resRCList.files)) {
this.flgLoading[0] = false;
}
@ -65,6 +72,24 @@ export class ChannelRestoreTableComponent implements OnInit {
this.channels.filter = selFilter;
}
onChannelClick(selRow: Channel, event: any) {
const flgButtonsClicked = event.target.className.includes('mat-icon')
|| event.target.className.includes('mat-column-backup')
|| event.target.className.includes('mat-column-verify');
if (flgButtonsClicked) { return; }
const selChannel = this.channels.data.filter(channel => {
return channel.chan_id === selRow.chan_id;
})[0];
const reorderedChannel = JSON.parse(JSON.stringify(selChannel, [
'active', 'remote_pubkey', 'remote_alias', 'channel_point', 'chan_id', 'capacity', 'local_balance', 'remote_balance', 'commit_fee', 'commit_weight',
'fee_per_kw', 'unsettled_balance', 'total_satoshis_sent', 'total_satoshis_received', 'num_updates', 'pending_htlcs', 'csv_delay', 'private'
] , 2));
this.store.dispatch(new RTLActions.OpenAlert({ config: { width: '75%', data: {
type: 'INFO',
message: JSON.stringify(reorderedChannel)
}}}));
}
ngOnDestroy() {
this.unSubs.forEach(completeSub => {
completeSub.next();

@ -47,7 +47,7 @@ export class LNDEffects implements OnDestroy {
if (undefined === info.identity_pubkey) {
this.sessionService.removeItem('lndUnlocked');
this.logger.info('Redirecting to Unlock');
this.router.navigate(['/lnd/unlocklnd']);
this.router.navigate(['/lnd/wallet']);
return {
type: RTLActions.SET_INFO,
payload: {}
@ -64,7 +64,7 @@ export class LNDEffects implements OnDestroy {
if ((typeof err.error.error === 'string' && err.error.error.includes('Not Found')) || err.status === 502) {
this.sessionService.removeItem('lndUnlocked');
this.logger.info('Redirecting to Unlock');
this.router.navigate(['/lnd/unlocklnd']);
this.router.navigate(['/lnd/wallet']);
this.handleErrorWithoutAlert('FetchInfo', err);
} else {
let code = err.status ? err.status : '';
@ -85,8 +85,8 @@ export class LNDEffects implements OnDestroy {
}
this.router.navigate(['/error'], { state: { errorCode: code, errorMessage: message }});
this.handleErrorWithoutAlert('FetchInfo', err);
return of({type: RTLActions.VOID});
}
return of({type: RTLActions.VOID});
})
);
}

@ -1,124 +0,0 @@
<div fxLayout="column">
<div class="padding-gap">
<mat-card>
<mat-card-header>
<mat-card-subtitle>
<h2>Unlock/Initialize Wallet</h2>
</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<div fxLayout="column" fxFlex="100" fxLayoutAlign="start">
<div fxLayout="row" fxFlex.gt-sm="100"><div fxLayout="column" fxFlex="40" fxFlex.lt-sm="100">
<mat-radio-group [(ngModel)]="walletOperation" color="primary" aria-label="Select an option" fxLayoutAlign="space-between">
<mat-radio-button value="unlock" tabindex="1">Unlock</mat-radio-button>
<mat-radio-button value="init" tabindex="2">Initialize</mat-radio-button>
</mat-radio-group>
</div></div>
<div *ngIf="walletOperation === 'unlock'; else initBlock">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<mat-form-field fxFlex="65" fxLayoutAlign="start">
<input matInput type="password" placeholder="Password" name="walletPassword" [(ngModel)]="walletPassword" tabindex="3" required>
<mat-hint>Enter Wallet Password</mat-hint>
</mat-form-field>
<button mat-raised-button fxFlex="15" color="primary" [disabled]="walletPassword == ''" (click)="onOperateWallet()" tabindex="4">Unlock Wallet</button>
<button fxFlex="15" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="5" type="reset" (click)="resetData()">Clear</button>
</form>
</div>
<ng-template #initBlock>
<div *ngIf="insecureLND && !warnRes">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message">Warning: Your connection is unsecure, it's not safe to generate private keys over this connection.Are you sure you want to proceed?</div>
<button mat-raised-button fxFlex="15" color="primary" type="submit" (click)="proceed=true;warnRes=true" tabindex="4">Proceed</button>
<button fxFlex="15" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="5" type="reset" (click)="proceed=false;warnRes=true">Cancel</button>
</form>
</div>
<div *ngIf="warnRes && !proceed" fxFlex="100" fxLayoutAlign="start" class="insecure-message mt-2">Please reconfig & restart RTL after securing your LND connction. You can close this window now.</div>
<mat-vertical-stepper *ngIf="(!insecureLND || (warnRes && proceed)) && genSeedResponse.length <= 0 && initWalletResponse === ''" [linear]="true" #stepper>
<mat-step [stepControl]="passwordFormGroup" label="Wallet Password" state="password">
<form [formGroup]="passwordFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<mat-form-field fxFlex="44" fxLayoutAlign="start">
<input matInput type="password" placeholder="Password" name="initWalletPassword" formControlName="initWalletPassword" tabindex="6" required>
<mat-hint>Enter Wallet Password</mat-hint>
</mat-form-field>
<mat-form-field fxFlex="44" fxLayoutAlign="start">
<input matInput type="password" placeholder="Confirm Password" name="initWalletConfirmPassword" formControlName="initWalletConfirmPassword" tabindex="7" required>
<mat-hint>Confirm Wallet Password</mat-hint>
</mat-form-field>
<button mat-raised-button color="primary" fxFlex="10" [disabled]="!passwordFormGroup.valid" type="submit" matStepperNext>Next</button>
<div *ngIf="passwordFormGroup.controls.initWalletPassword.errors?.minlength && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty)" class="validation-error-message">
<mat-icon class="validation-error-icon red">cancel</mat-icon>Password must be at least 8 characters in length.
</div>
<div *ngIf="passwordFormGroup.errors?.unmatchedPasswords && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty) && (passwordFormGroup.controls.initWalletConfirmPassword.touched || passwordFormGroup.controls.initWalletConfirmPassword.dirty)" class="validation-error-message">
<mat-icon class="validation-error-icon red">cancel</mat-icon>Passwords do not match.
</div>
</form>
</mat-step>
<mat-step [stepControl]="cipherFormGroup" label="Cipher" state="cipher">
<form [formGroup]="cipherFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<mat-checkbox fxFlex="20" fxFlex.gt-lg="10" tabindex="8" fxLayoutAlign="start center" class="chkbox-wallet" formControlName="existingCipher" name="existingCipher">Existing Cipher</mat-checkbox>
<mat-form-field fxFlex="58" fxFlex.gt-lg="58" fxLayoutAlign="start">
<input matInput type="input" placeholder="Comma separated array of 24 words cipher seed" name="cipherSeed" formControlName="cipherSeed" tabindex="9" required>
<mat-hint>Cipher Seed</mat-hint>
</mat-form-field>
<button mat-raised-button color="primary" fxFlex="10" [disabled]="!cipherFormGroup.valid" type="submit" matStepperNext>Next</button>
<button mat-stroked-button color="primary" fxFlex="10" type="reset" matStepperPrevious>Back</button>
<div *ngIf="cipherFormGroup.errors?.invalidCipher && cipherFormGroup.controls.existingCipher.value && (cipherFormGroup.controls.cipherSeed.touched || cipherFormGroup.controls.cipherSeed.dirty)" class="validation-error-message">
<mat-icon class="validation-error-icon red">cancel</mat-icon>Invalid Cipher. Enter comma separated 24 words cipher seed.
</div>
</form>
</mat-step>
<mat-step [stepControl]="passphraseFormGroup" label="Passphrase" state="passphrase">
<form [formGroup]="passphraseFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<mat-checkbox fxFlex="20" fxFlex.gt-lg="10" tabindex="10" fxLayoutAlign="start center" class="chkbox-wallet" formControlName="enterPassphrase" name="enterPassphrase">Enter Passphrase</mat-checkbox>
<mat-form-field fxFlex="40" fxFlex.gt-lg="50" fxLayoutAlign="start">
<input matInput type="input" type="password" placeholder="Passphrase" name="passphrase" formControlName="passphrase" tabindex="11" required>
<mat-hint>Enter Passphrase</mat-hint>
</mat-form-field>
<button mat-raised-button fxFlex="15" fxFlex.gt-lg="14" color="primary" [disabled]="!passphraseFormGroup.valid" (click)="onInitWallet()" tabindex="12" type="submit">Initialize Wallet</button>
<button mat-raised-button fxFlex="10" fxFlex.gt-lg="9" color="accent" type="button" matStepperPrevious>Back</button>
<button fxFlex="10" fxFlex.gt-lg="9" fxLayoutAlign="center center" mat-raised-button color="warn" tabindex="13" type="reset" (click)="resetData()">Clear</button>
</form>
</mat-step>
<ng-template matStepperIcon="password">
<mat-icon>fingerprint</mat-icon>
</ng-template>
<ng-template matStepperIcon="cipher">
<mat-icon>swap_calls</mat-icon>
</ng-template>
<ng-template matStepperIcon="passphrase">
<mat-icon>waves</mat-icon>
</ng-template>
</mat-vertical-stepper>
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse !== ''">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="100" fxLayoutAlign="start" class="insecure-message blinker">YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET!</div>
<div fxFlex="40" fxLayout="row wrap" class="mt-2">
<span *ngFor="let genSeed of genSeedResponse; index as i;" fxFlex="25" fxLayoutAlign="start" class="genseed-message">
{{genSeed}}
</span>
</div>
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Wallet initialization is done.</div>
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">The node will be usable only after LND has synced completely with the network.</div>
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Click continue only after writing down the seed.</div>
<button mat-raised-button fxFlex="15" color="primary" type="submit" (click)="onGoToHome()" tabindex="14">Go To Home</button>
</form>
</div>
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse === ''">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Something went wrong! Unable to initialize wallet!</div>
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="warn" tabindex="15" type="reset" (click)="resetData()">Restart</button>
</form>
</div>
<div *ngIf="genSeedResponse.length <= 0 && initWalletResponse !== ''">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">Wallet recovery is done.</div>
<div fxFlex="65" fxLayoutAlign="start" class="insecure-message mt-2">The node will be usable only after LND has synced completely with the network.</div>
<button mat-raised-button fxFlex="15" color="primary" type="submit" (click)="onGoToHome()" tabindex="14">Go To Home</button>
</form>
</div>
</ng-template>
</div>
</mat-card-content>
</mat-card>
</div>
</div>

@ -1,12 +0,0 @@
.chkbox-wallet:focus {
outline: none !important;
}
.blinker {
animation: blink-animation 1s steps(5, start) infinite;
-webkit-animation: blink-animation 1s steps(5, start) infinite;
}
@keyframes blink-animation { to { visibility: hidden; }}
@-webkit-keyframes blink-animation { to { visibility: hidden; }}

@ -0,0 +1,113 @@
<div fxLayout="column" class="padding-gap mb-4">
<div *ngIf="insecureLND && !warnRes">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="100" fxLayoutAlign="start">Warning: Your connection is unsecure, it's not safe to generate private keys over this connection.Are you sure you want to proceed?</div>
<div fxLayout="column" fxFlex.gt-sm="30" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="1" type="reset" (click)="proceed=false;warnRes=true">Do Not Proceed</button>
<button mat-raised-button fxFlex="48" color="primary" type="submit" (click)="proceed=true;warnRes=true" tabindex="2">Proceed</button>
</div>
</form>
</div>
<div *ngIf="warnRes && !proceed" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<div fxFlex="100" class="mt-2">Please re-configure & re-start RTL after securing your LND connction. You can close this window now.</div>
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
<button fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="3" type="reset" (click)="warnRes=false">Go Back</button>
</div>
</div>
<mat-vertical-stepper *ngIf="(!insecureLND || (warnRes && proceed)) && genSeedResponse.length <= 0 && initWalletResponse === ''" [linear]="true" #stepper>
<mat-step [stepControl]="passwordFormGroup" label="Wallet Password" state="password">
<form [formGroup]="passwordFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<mat-form-field fxFlex="49" fxLayoutAlign="start">
<input matInput type="password" placeholder="Password" name="initWalletPassword" formControlName="initWalletPassword" tabindex="5" required>
<mat-hint>Enter Wallet Password</mat-hint>
</mat-form-field>
<mat-form-field fxFlex="49" fxLayoutAlign="start">
<input matInput type="password" placeholder="Confirm Password" name="initWalletConfirmPassword" formControlName="initWalletConfirmPassword" tabindex="6" required>
<mat-hint>Confirm Wallet Password</mat-hint>
</mat-form-field>
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="my-2">
<button mat-raised-button color="primary" fxFlex="10" [disabled]="!passwordFormGroup.valid" tabindex="7" type="submit" matStepperNext>Next</button>
</div>
<div *ngIf="passwordFormGroup.controls.initWalletPassword.errors?.minlength && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty)" class="validation-error-message">
<mat-icon class="validation-error-icon red">cancel</mat-icon>Password must be at least 8 characters in length.
</div>
<div *ngIf="passwordFormGroup.errors?.unmatchedPasswords && (passwordFormGroup.controls.initWalletPassword.touched || passwordFormGroup.controls.initWalletPassword.dirty) && (passwordFormGroup.controls.initWalletConfirmPassword.touched || passwordFormGroup.controls.initWalletConfirmPassword.dirty)" class="validation-error-message">
<mat-icon class="validation-error-icon red">cancel</mat-icon>Passwords do not match.
</div>
</form>
</mat-step>
<mat-step [stepControl]="cipherFormGroup" label="Cipher" state="cipher">
<form [formGroup]="cipherFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<div fxFlex="100" fxLayoutAlign="space-between center">
<mat-slide-toggle [labelPosition]="'before'" fxFlex="20" tabindex="8" color="primary" class="chkbox-wallet" formControlName="existingCipher" name="existingCipher">Existing Cipher</mat-slide-toggle>
<mat-form-field fxFlex="75" fxLayoutAlign="start">
<input matInput type="input" placeholder="Comma separated array of 24 words cipher seed" name="cipherSeed" formControlName="cipherSeed" tabindex="9" required>
<mat-hint>Cipher Seed</mat-hint>
</mat-form-field>
</div>
<div fxLayout="column" fxFlex.gt-sm="30" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="my-2">
<button mat-stroked-button color="primary" fxFlex="48" type="reset" tabindex="10" matStepperPrevious>Back</button>
<button mat-raised-button color="primary" fxFlex="48" [disabled]="!cipherFormGroup.valid" tabindex="11" type="submit" matStepperNext>Next</button>
</div>
<div *ngIf="cipherFormGroup.errors?.invalidCipher && cipherFormGroup.controls.existingCipher.value && (cipherFormGroup.controls.cipherSeed.touched || cipherFormGroup.controls.cipherSeed.dirty)" class="validation-error-message">
<mat-icon class="validation-error-icon red">cancel</mat-icon>Invalid Cipher. Enter comma separated 24 words cipher seed.
</div>
</form>
</mat-step>
<mat-step [stepControl]="passphraseFormGroup" label="Passphrase" state="passphrase">
<form [formGroup]="passphraseFormGroup" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<div fxFlex="100" fxLayoutAlign="space-between center">
<mat-slide-toggle [labelPosition]="'before'" fxFlex="20" tabindex="10" color="primary" class="chkbox-wallet" formControlName="enterPassphrase" name="enterPassphrase">Existing Passphrase</mat-slide-toggle>
<mat-form-field fxFlex="75" fxLayoutAlign="start">
<input matInput type="input" type="password" placeholder="Passphrase" name="passphrase" formControlName="passphrase" tabindex="12" required>
<mat-hint>Enter Passphrase</mat-hint>
</mat-form-field>
</div>
<div fxLayout="column" fxFlex.gt-sm="40" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="my-2">
<button fxFlex="32" fxLayoutAlign="center center" mat-stroked-button color="warn" tabindex="13" type="reset" (click)="resetData()">Clear</button>
<button mat-stroked-button fxFlex="32" tabindex="14" color="primary" type="button" matStepperPrevious>Back</button>
<button mat-raised-button fxFlex="32" color="primary" [disabled]="!passphraseFormGroup.valid" (click)="onInitWallet()" tabindex="15" type="submit">Initialize Wallet</button>
</div>
</form>
</mat-step>
<ng-template matStepperIcon="password">
<mat-icon>vpn_key</mat-icon>
</ng-template>
<ng-template matStepperIcon="cipher">
<mat-icon>swap_calls</mat-icon>
</ng-template>
<ng-template matStepperIcon="passphrase">
<mat-icon>fingerprint</mat-icon>
</ng-template>
</mat-vertical-stepper>
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse !== ''">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="100" fxLayoutAlign="start" class="blinker">YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET!</div>
<div fxFlex="40" fxLayout="row wrap" class="mt-2">
<span *ngFor="let genSeed of genSeedResponse; index as i;" fxFlex="25" fxLayoutAlign="start" class="genseed-message">{{genSeed}}</span>
</div>
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Wallet initialization is done.</div>
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">The node will be usable only after LND has synced completely with the network.</div>
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Click continue only after writing down the seed.</div>
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
<button mat-raised-button color="primary" type="submit" (click)="onGoToHome()" tabindex="16">Go To Home</button>
</div>
</form>
</div>
<div *ngIf="genSeedResponse.length > 0 && initWalletResponse === ''">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Something went wrong! Unable to initialize wallet!</div>
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
<button fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="17" type="reset" (click)="resetData()">Restart</button>
</div>
</form>
</div>
<div *ngIf="genSeedResponse.length <= 0 && initWalletResponse !== ''">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between" class="mt-2">
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">Wallet recovery is done.</div>
<div fxFlex="100" fxLayoutAlign="start" class="mt-2">The node will be usable only after LND has synced completely with the network.</div>
<div fxLayout="column" fxFlex.gt-sm="20" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
<button mat-raised-button color="primary" type="submit" (click)="onGoToHome()" tabindex="18">Go To Home</button>
</div>
</form>
</div>

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { InitializeWalletComponent } from './initialize.component';
describe('InitializeWalletComponent', () => {
let component: InitializeWalletComponent;
let fixture: ComponentFixture<InitializeWalletComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ InitializeWalletComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(InitializeWalletComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -1,15 +1,15 @@
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { Subject } from 'rxjs';
import { takeUntil, take } from 'rxjs/operators';
import { takeUntil } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { FormBuilder, FormGroup, Validators, ValidatorFn, AbstractControl, ValidationErrors } from '@angular/forms';
import { FormBuilder, FormGroup, Validators, ValidatorFn, ValidationErrors } from '@angular/forms';
import { STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';
import { MatStepper } from '@angular/material';
import { LNDEffects } from '../store/lnd.effects';
import * as RTLActions from '../../store/rtl.actions';
import * as fromRTLReducer from '../../store/rtl.reducers';
import { LNDEffects } from '../../store/lnd.effects';
import * as RTLActions from '../../../store/rtl.actions';
import * as fromRTLReducer from '../../../store/rtl.reducers';
export const matchedPasswords: ValidatorFn = (control: FormGroup): ValidationErrors | null => {
const initWalletPassword = control.get('initWalletPassword');
@ -25,31 +25,28 @@ export const cipherSeedLength: ValidatorFn = (control: FormGroup): ValidationErr
};
@Component({
selector: 'rtl-unlock-lnd',
templateUrl: './unlock-lnd.component.html',
styleUrls: ['./unlock-lnd.component.scss'],
selector: 'rtl-initialize-wallet',
templateUrl: './initialize.component.html',
styleUrls: ['./initialize.component.scss'],
providers: [{
provide: STEPPER_GLOBAL_OPTIONS, useValue: {displayDefaultIndicatorType: false}
}]
})
export class UnlockLNDComponent implements OnInit, OnDestroy {
export class InitializeWalletComponent implements OnInit, OnDestroy {
@ViewChild(MatStepper, { static: true }) stepper: MatStepper;
public insecureLND = false;
public genSeedResponse = [];
public initWalletResponse = '';
walletOperation = 'unlock';
walletPassword = '';
passwordFormGroup: FormGroup;
cipherFormGroup: FormGroup;
passphraseFormGroup: FormGroup;
proceed = true;
warnRes = true;
warnRes = false;
private unsubs = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
constructor(private store: Store<fromRTLReducer.RTLState>, private formBuilder: FormBuilder, private lndEffects: LNDEffects, private router: Router) {}
ngOnInit() {
this.walletPassword = '';
this.passwordFormGroup = this.formBuilder.group({
initWalletPassword: ['', [Validators.required, Validators.minLength(8)]],
initWalletConfirmPassword: ['', [Validators.required, Validators.minLength(8)]]
@ -111,11 +108,6 @@ export class UnlockLNDComponent implements OnInit, OnDestroy {
}
onOperateWallet() {
this.store.dispatch(new RTLActions.OpenSpinner('Unlocking...'));
this.store.dispatch(new RTLActions.UnlockWallet({pwd: window.btoa(this.walletPassword)}));
}
onInitWallet() {
this.store.dispatch(new RTLActions.OpenSpinner('Initializing...'));
if (this.cipherFormGroup.controls.existingCipher.value) {
@ -149,8 +141,6 @@ export class UnlockLNDComponent implements OnInit, OnDestroy {
}
resetData() {
this.walletOperation = 'unlock';
this.walletPassword = '';
this.genSeedResponse = [];
this.initWalletResponse = '';
}

@ -0,0 +1,12 @@
<div fxLayout="column" class="padding-gap mb-2">
<form fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<mat-form-field fxFlex="100" fxLayoutAlign="start">
<input matInput type="password" placeholder="Password" name="walletPassword" [(ngModel)]="walletPassword" tabindex="1" required>
<mat-hint>Enter Wallet Password</mat-hint>
</mat-form-field>
<div fxLayout="column" fxFlex.gt-sm="30" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="2" type="reset" (click)="resetData()">Clear Field</button>
<button mat-raised-button fxFlex="48" color="primary" [disabled]="walletPassword == ''" (click)="onUnlockWallet()" tabindex="3">Unlock Wallet</button>
</div>
</form>
</div>

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { UnlockWalletComponent } from './unlock.component';
describe('UnlockWalletComponent', () => {
let component: UnlockWalletComponent;
let fixture: ComponentFixture<UnlockWalletComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ UnlockWalletComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(UnlockWalletComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,29 @@
import { Component, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import * as RTLActions from '../../../store/rtl.actions';
import * as fromRTLReducer from '../../../store/rtl.reducers';
@Component({
selector: 'rtl-unlock-wallet',
templateUrl: './unlock.component.html',
styleUrls: ['./unlock.component.scss']
})
export class UnlockWalletComponent implements OnInit {
walletPassword = '';
constructor(private store: Store<fromRTLReducer.RTLState>) {}
ngOnInit() {
this.walletPassword = '';
}
onUnlockWallet() {
this.store.dispatch(new RTLActions.OpenSpinner('Unlocking...'));
this.store.dispatch(new RTLActions.UnlockWallet({pwd: window.btoa(this.walletPassword)}));
}
resetData() {
this.walletPassword = '';
}
}

@ -0,0 +1,14 @@
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
<fa-icon [icon]="faWallet" class="page-title-img mr-1"></fa-icon>
<span class="page-title">Wallet</span>
</div>
<div fxLayout="column" class="padding-gap-x">
<mat-card>
<mat-card-content fxLayout="column">
<mat-tab-group>
<mat-tab label="Unlock"><rtl-unlock-wallet></rtl-unlock-wallet></mat-tab>
<mat-tab label="Initialize"><rtl-initialize-wallet></rtl-initialize-wallet></mat-tab>
</mat-tab-group>
</mat-card-content>
</mat-card>
</div>

@ -0,0 +1,17 @@
import { Component, OnInit } from '@angular/core';
import { faWallet } from '@fortawesome/free-solid-svg-icons';
@Component({
selector: 'rtl-wallet',
templateUrl: './wallet.component.html',
styleUrls: ['./wallet.component.scss']
})
export class WalletComponent implements OnInit {
public faWallet = faWallet;
constructor() {}
ngOnInit() {}
}

@ -6,16 +6,16 @@
<div class="padding-gap">
<mat-card>
<mat-card-content class="card-content-gap">
<form (ngSubmit)="onSignin()" #signinForm="ngForm" fxLayoutAlign="start center">
<mat-form-field fxFlex="50" fxLayoutAlign="start">
<form (ngSubmit)="onSignin()" #signinForm="ngForm" fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign="start" fxLayoutAlign.gt-sm="space-between">
<mat-form-field fxFlex="100" fxLayoutAlign="start">
<input matInput placeholder="Password" type="password" id="password" name="password" [(ngModel)]="password"
tabindex="1" required>
<mat-hint>{{hintStr}}</mat-hint>
</mat-form-field>
<button fxFlex="10" class="mr-2" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="2"
type="submit" [disabled]="!password">Login</button>
<button fxFlex="10" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="3" type="reset"
(click)="resetData()">Clear</button>
<div fxLayout="column" fxFlex.gt-sm="30" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between center" class="mt-2">
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="2" type="reset" (click)="resetData()">Clear</button>
<button fxFlex="48" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="3" type="submit" [disabled]="!password">Login</button>
</div>
</form>
</mat-card-content>
</mat-card>

@ -18,7 +18,7 @@
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
font-size: $small-font-size * 1.1;
}
.genseed-message, .insecure-message, .validation-error-icon, .fa-icon-small, .top-icon-small {
.genseed-message, .validation-error-message .validation-error-icon.mat-icon, .fa-icon-small, .top-icon-small {
font-size: $small-font-size * 1.2;
}
.page-title-container, .page-sub-title-container {
@ -29,7 +29,7 @@
font-size: $small-font-size * 1.5;
}
}
.mat-icon-button .top-toolbar-icon.icon-pinned {
.mat-icon-button .top-toolbar-icon.icon-pinned, .mat-step-header .mat-step-icon .mat-icon {
padding-top: 1rem;
}
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
@ -94,7 +94,7 @@
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
font-size: $regular-font-size * 1.1;
}
.genseed-message, .insecure-message, .validation-error-icon {
.genseed-message, .validation-error-message .validation-error-icon.mat-icon {
font-size: $regular-font-size * 1.2;
}
.page-title-container, .page-sub-title-container {
@ -105,13 +105,10 @@
font-size: $regular-font-size * 1.4;
}
}
.mat-button .mat-icon-button .top-toolbar-icon.icon-pinned {
font-size: $regular-font-size;
}
.fa-icon-small, .top-icon-small, .modal-info-header {
font-size: $regular-font-size * 1.5;
}
.top-toolbar-icon.icon-pinned {
.top-toolbar-icon.icon-pinned, .mat-step-header .mat-step-icon .mat-icon {
font-size: $regular-font-size * 1.3;
}
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
@ -172,7 +169,7 @@
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
font-size: $large-font-size * 1.1;
}
.genseed-message, .insecure-message, .validation-error-icon {
.genseed-message, .validation-error-message .validation-error-icon.mat-icon {
font-size: $large-font-size * 1.2;
}
.page-title-container, .page-sub-title-container {
@ -187,7 +184,7 @@
.fa-icon-small, .top-icon-small, .modal-info-header {
font-size: $large-font-size * 1.4;
}
.top-toolbar-icon.icon-pinned {
.top-toolbar-icon.icon-pinned, .mat-step-header .mat-step-icon .mat-icon {
font-size: $large-font-size * 1.25;
}
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {

@ -8,6 +8,7 @@
$accent: map-get($theme, accent);
$accent-color: mat-color($accent);
$warn: map-get($theme, warn);
$warn-color: mat-color($warn);
$foreground: map-get($theme, foreground);
$foreground-base: mat-color($foreground, base);
$foreground-text: mat-color($foreground, text);
@ -45,6 +46,12 @@
.mat-stroked-button.mat-primary {
border-color: $primary-color;
}
.mat-stroked-button.mat-accent {
border-color: $accent-color;
}
.mat-stroked-button.mat-warn {
border-color: $warn-color;
}
.ng-fa-icon, .mat-nested-tree-node-parent .mat-icon, .mat-form-field-suffix {
color: $foreground-secondary-text;
}
@ -137,10 +144,6 @@
color: $primary-color;
}
.insecure-message {
width:100%;
}
.page-title-container, .page-sub-title-container, .mat-form-field-infix .mat-form-field-label-wrapper .mat-form-field-label {
color: $foreground-text;
}

@ -436,7 +436,7 @@ body {
}
.px-4 {
padding: 0 3.2rem !important;
padding: 0 4rem !important;
}
.py-2 {
@ -799,3 +799,12 @@ table {
.display-none {
display: none !important;
}
.blinker {
animation: blink-animation 1s steps(5, start) infinite;
-webkit-animation: blink-animation 1s steps(5, start) infinite;
}
@keyframes blink-animation { to { visibility: hidden; }}
@-webkit-keyframes blink-animation { to { visibility: hidden; }}

Loading…
Cancel
Save