Tiny UX touchups

Tiny UX touchups
pull/260/head
Shahana Farooqui 5 years ago
parent b59fead1c6
commit de164a371c

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.8d4688cdfdd8aa8f0664.css"></head>
<link rel="stylesheet" href="styles.66b0e59eb8eeeb2328f8.css"></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.85982f4b77bc4519d6a2.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.6a242aa494503231cc16.js"></script></body>
<script src="runtime.53ed2e4058a513894e5c.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.b143b4ece39afafc1004.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

@ -1 +1 @@
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=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(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,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:"38e17bd7c3142e31313f",7:"10f2a3b978c4656b6ba1"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.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: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 f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=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(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,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:"2c4a41212dd765eb8550",7:"3a73b0e2f4ec46ab079b"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.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: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 f=0;f<i.length;f++)r(i[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

@ -32,11 +32,13 @@ exports.getBackup = (req, res, next) => {
let message = '';
if (req.params.channelPoint === 'ALL') {
channel_backup_file = common.selectedNode.channel_backup_path + common.path_separator + 'channel-all.bak';
message = 'All Channels Backup Successful at: ' + channel_backup_file + ' !';
message = 'All Channels Backup Successful.';
// message = 'All Channels Backup Successful at: ' + channel_backup_file + ' !';
options.url = common.getSelLNServerUrl() + '/channels/backup';
} else {
channel_backup_file = common.selectedNode.channel_backup_path + common.path_separator + 'channel-' + req.params.channelPoint.replace(':', '-') + '.bak';
message = 'Channel Backup Successful at: ' + channel_backup_file + ' !';
message = 'Channel Backup Successful.';
// message = 'Channel Backup Successful at: ' + channel_backup_file + ' !';
let channelpoint = req.params.channelPoint.replace(':', '/');
options.url = common.getSelLNServerUrl() + '/channels/backup/' + channelpoint;
let exists = fs.existsSync(channel_backup_file);
@ -78,7 +80,7 @@ exports.postBackupVerify = (req, res, next) => {
let message = '';
let verify_backup = '';
if (req.params.channelPoint === 'ALL') {
message = 'All Channels Verify Successful!';
message = 'All Channels Verify Successful.';
channel_verify_file = common.selectedNode.channel_backup_path + common.path_separator + 'channel-all.bak';
let exists = fs.existsSync(channel_verify_file);
if (exists) {
@ -95,7 +97,8 @@ exports.postBackupVerify = (req, res, next) => {
res.status(404).json({ message: 'Channels backup to verify does not Exist!' });
}
} else {
message = 'Channel ' + req.params.channelPoint + ' Verify Successful!';
message = 'Channel Verify Successful.';
// message = 'Channel ' + req.params.channelPoint + ' Verify Successful!';
channel_verify_file = common.selectedNode.channel_backup_path + common.path_separator + 'channel-' + req.params.channelPoint.replace(':', '-') + '.bak';
let exists = fs.existsSync(channel_verify_file);
if (exists) {
@ -128,7 +131,7 @@ exports.postRestore = (req, res, next) => {
let message = '';
let restore_backup = '';
if (req.params.channelPoint === 'ALL') {
message = 'All Channels Restore Successful!';
message = 'All Channels Restore Successful.';
channel_restore_file = common.selectedNode.channel_backup_path + common.path_separator + 'restore' + common.path_separator + 'channel-all.bak';
let exists = fs.existsSync(channel_restore_file);
if (exists) {
@ -144,7 +147,8 @@ exports.postRestore = (req, res, next) => {
res.status(404).json({ message: 'Channels backup to restore does not Exist!' });
}
} else {
message = 'Channel ' + req.params.channelPoint + ' Restore Successful!';
message = 'Channel Restore Successful.';
// message = 'Channel ' + req.params.channelPoint + ' Restore Successful!';
channel_restore_file = common.selectedNode.channel_backup_path + common.path_separator + 'restore' + common.path_separator + 'channel-' + req.params.channelPoint.replace(':', '-') + '.bak';
let exists = fs.existsSync(channel_restore_file);
if (exists) {

@ -6,7 +6,7 @@ import { Store } from '@ngrx/store';
import { MatTableDataSource, MatSort } from '@angular/material';
import { SelNodeChild } from '../../shared/models/RTLconfig';
import { GetInfoCL, InvoiceCL } from '../../shared/models/clModels';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../shared/models/enums';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../shared/services/consts-enums-functions';
import { LoggerService } from '../../shared/services/logger.service';
import { newlyAddedRowAnimation } from '../../shared/animation/row-animation';

@ -11,5 +11,4 @@
<button fxFlex="100" fxLayoutAlign="center center" mat-raised-button color="primary" (click)="onGenerateAddress()" [disabled]="undefined === selectedAddressType.addressId" tabindex="2" class="top-minus-15px">Generate Address</button>
</div>
</div>
<rtl-on-chain-transaction-history fxLayout="row" fxFlex="100"></rtl-on-chain-transaction-history>
</div>

@ -4,7 +4,7 @@ import { takeUntil } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { AddressType } from '../../../shared/models/lndModels';
import { ADDRESS_TYPES } from '../../../shared/models/enums';
import { ADDRESS_TYPES } from '../../../shared/services/consts-enums-functions';
import { OnChainGeneratedAddressComponent } from '../../../shared/components/data-modal/on-chain-generated-address/on-chain-generated-address.component';
import { LNDEffects } from '../../store/lnd.effects';

@ -1,11 +1,10 @@
<div fxLayout="column" fxFlex="98" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between start">
<div fxLayout="column" fxFlex="98" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between start" *ngIf="!sweepAll; else sweepAllBlock;">
<mat-form-field fxFlex.gt-sm="55">
<input matInput [(ngModel)]="transaction.address" placeholder="Bitcoin Address" tabindex="1" name="address" #address="ngModel">
</mat-form-field>
<mat-form-field fxFlex.gt-sm="30">
<input matInput [(ngModel)]="transaction.amount" placeholder="Amount" name="amount" type="number" step="100" min="0" tabindex="2" #amount="ngModel" [disabled]="sweepAll">
<span matSuffix> {{selAmountUnit}} </span>
<mat-hint *ngIf="sweepAll">{{sweepAllHint}}</mat-hint>
</mat-form-field>
<mat-form-field fxFlex.gt-sm="10" fxLayoutAlign="start end">
<mat-select [value]="selAmountUnit" tabindex="3" required name="amountUnit" (selectionChange)="onAmountUnitChange($event)">
@ -38,5 +37,35 @@
</ng-template>
</button>
</div>
<rtl-on-chain-transaction-history fxLayout="row" fxFlex="100"></rtl-on-chain-transaction-history>
</div>
<ng-template #sweepAllBlock>
<div fxLayout="column" fxFlex="100">
<div fxLayout="column" fxFlex="100" fxLayout.gt-sm="row wrap" fxLayoutAlign="start start" fxLayoutAlign.gt-sm="space-between start">
<mat-form-field fxFlex.gt-sm="55">
<input matInput [(ngModel)]="transaction.address" placeholder="Bitcoin Address" tabindex="1" name="address" #address="ngModel">
</mat-form-field>
<mat-form-field fxFlex.gt-sm="20">
<mat-select [(value)]="selTransType" tabindex="4">
<mat-option *ngFor="let transType of transTypes" [value]="transType.id">
{{transType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex.gt-sm="20" fxLayoutAlign="start end" *ngIf="selTransType=='1'">
<input matInput [(ngModel)]="transaction.blocks" placeholder="Number of Blocks" type="number" name="blocks" step="1" min="0" required tabindex="5" #blocks="ngModel">
</mat-form-field>
<mat-form-field fxFlex.gt-sm="20" fxLayoutAlign="start end" *ngIf="selTransType=='2'">
<input matInput [(ngModel)]="transaction.fees" placeholder="Fee ({{nodeData?.smaller_currency_unit}}/Byte)" type="number" name="fees" step="1" min="0" required tabindex="6" #fees="ngModel">
</mat-form-field>
</div>
<div>
<div fxFlex="30" fxLayout="row wrap" fxLayoutAlign="space-between start">
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="7" type="reset" (click)="resetData()">Clear Fields</button>
<button fxFlex="48" fxLayoutAlign="center center" mat-raised-button color="primary" [disabled]="invalidValues" type="submit" tabindex="8" (click)="onSendFunds()">
<p *ngIf="invalidValues && (address.touched || address.dirty); else sendText">Invalid Values</p>
<ng-template #sendText><p>Send Funds</p></ng-template>
</button>
</div>
</div>
</div>
</ng-template>

@ -3,10 +3,11 @@ import { DecimalPipe } from '@angular/common';
import { Subject } from 'rxjs';
import { takeUntil, take } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { MatSnackBar } from '@angular/material/snack-bar';
import { SelNodeChild, GetInfoRoot } from '../../../shared/models/RTLconfig';
import { GetInfo, Balance, ChannelsTransaction, AddressType } from '../../../shared/models/lndModels';
import { CURRENCY_UNITS, CurrencyUnitEnum, CURRENCY_UNIT_FORMATS } from '../../../shared/models/enums';
import { CURRENCY_UNITS, CurrencyUnitEnum, CURRENCY_UNIT_FORMATS } from '../../../shared/services/consts-enums-functions';
import { RTLConfiguration } from '../../../shared/models/RTLconfig';
import { CommonService } from '../../../shared/services/common.service';
import { LoggerService } from '../../../shared/services/logger.service';
@ -31,7 +32,6 @@ export class OnChainSendComponent implements OnInit, OnDestroy {
this._sweepBalance = bal;
this.transaction.amount = this._sweepBalance;
}
public sweepAllHint = 'Sending all your funds';
public selNode: SelNodeChild = {};
public appConfig: RTLConfiguration;
public nodeData: GetInfoRoot;
@ -51,7 +51,7 @@ export class OnChainSendComponent implements OnInit, OnDestroy {
public currencyUnitFormats = CURRENCY_UNIT_FORMATS;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private rtlEffects: RTLEffects, private commonService: CommonService, private decimalPipe: DecimalPipe) {}
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private rtlEffects: RTLEffects, private commonService: CommonService, private decimalPipe: DecimalPipe, private snackBar: MatSnackBar) {}
ngOnInit() {
this.store.select('root')
@ -77,27 +77,18 @@ export class OnChainSendComponent implements OnInit, OnDestroy {
}
this.rtlEffects.closeConfirm
.pipe(takeUntil(this.unSubs[2]))
.subscribe(confirmRes => {
if (confirmRes) {
if (this.transaction.sendAll && !+this.appConfig.sso.rtlSSO) {
this.store.dispatch(new RTLActions.OpenConfirmation({ width: '70%', data:
{type: 'CONFIRM', titleMessage: 'Enter Login Password', noBtnText: 'Cancel', yesBtnText: 'Authorize', flgShowInput: true, getInputs: [
{placeholder: 'Enter Login Password', inputType: 'password', inputValue: ''}
]}
}));
this.rtlEffects.closeConfirm
.pipe(takeUntil(this.unSubs[3]))
.subscribe(pwdConfirmRes => {
if (pwdConfirmRes) {
const pwd = pwdConfirmRes[0].inputValue;
this.store.dispatch(new RTLActions.IsAuthorized(sha256(pwd)));
this.rtlEffects.isAuthorizedRes
.pipe(take(1))
.subscribe(authRes => {
if (authRes !== 'ERROR') {
this.dispatchToSendFunds();
}
});
.subscribe(pwdConfirmRes => {
if (pwdConfirmRes) {
if (this.sweepAll && !+this.appConfig.sso.rtlSSO) {
const pwd = pwdConfirmRes[0].inputValue;
this.store.dispatch(new RTLActions.IsAuthorized(sha256(pwd)));
this.rtlEffects.isAuthorizedRes
.pipe(take(1))
.subscribe(authRes => {
if (authRes !== 'ERROR') {
this.dispatchToSendFunds();
} else {
this.snackBar.open('Unauthorized User. Logging out from RTL.');
}
});
} else {
@ -125,9 +116,18 @@ export class OnChainSendComponent implements OnInit, OnDestroy {
delete this.transaction.blocks;
confirmationMsg['Fee (' + this.nodeData.smaller_currency_unit + '/Byte)'] = this.transaction.fees;
}
this.store.dispatch(new RTLActions.OpenConfirmation({ width: '70%', data:
{type: 'CONFIRM', message: JSON.stringify(confirmationMsg), noBtnText: 'Cancel', yesBtnText: 'Send'}
}));
if (this.sweepAll && !+this.appConfig.sso.rtlSSO) {
this.store.dispatch(new RTLActions.OpenConfirmation({ width: '70%', data:
{type: 'CONFIRM', titleMessage: 'Please authorize to sweep all funds with login password.',
message: JSON.stringify(confirmationMsg), noBtnText: 'Cancel', yesBtnText: 'Authorize And Sweep All Funds',
flgShowInput: true, getInputs: [{placeholder: 'Enter Login Password', inputType: 'password', inputValue: ''}
]}
}));
} else {
this.store.dispatch(new RTLActions.OpenConfirmation({ width: '70%', data:
{type: 'CONFIRM', message: JSON.stringify(confirmationMsg), noBtnText: 'Cancel', yesBtnText: 'Send'}
}));
}
}
dispatchToSendFunds() {
@ -137,10 +137,8 @@ export class OnChainSendComponent implements OnInit, OnDestroy {
}
get invalidValues(): boolean {
return (undefined === this.transaction.address || this.transaction.address === '')
|| (undefined === this.transaction.amount || this.transaction.amount <= 0)
|| (this.selTransType === '1' && (undefined === this.transaction.blocks || this.transaction.blocks <= 0))
|| (this.selTransType === '2' && (undefined === this.transaction.fees || this.transaction.fees <= 0));
return (this.transaction.address === '') || (this.transaction.amount <= 0)
|| (this.selTransType === '1' && this.transaction.blocks && this.transaction.blocks <= 0) || (this.selTransType === '2' && this.transaction.fees && this.transaction.fees <= 0);
}
resetData() {
@ -150,7 +148,10 @@ export class OnChainSendComponent implements OnInit, OnDestroy {
this.transaction.blocks = null;
this.transaction.fees = null;
} else {
this.transaction = {};
this.transaction.address = '';
this.transaction.amount = null;
this.transaction.blocks = null;
this.transaction.fees = null;
}
}

@ -1,5 +1,5 @@
<div fxLayout="column" fxFlex="100" fxLayoutAlign="start start">
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center" class="padding-gap-x page-sub-title-container mt-2 w-100">
<div fxLayout="column" fxFlex="100" fxLayoutAlign="start start" class="card-content-gap">
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center" class="page-sub-title-container w-100">
<div fxFlex="70">
<fa-icon [icon]="faHistory" class="page-title-img mr-1"></fa-icon>
<span class="page-title">Transaction History</span>

@ -7,9 +7,8 @@ import { faHistory } from '@fortawesome/free-solid-svg-icons';
import { MatTableDataSource, MatSort, MatPaginator, MatPaginatorIntl } from '@angular/material';
import { Transaction } from '../../../shared/models/lndModels';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../../shared/models/enums';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../shared/services/logger.service';
import { getPaginatorLabel } from '../../../shared/services/paginator.service';
import { RTLEffects } from '../../../store/rtl.effects';
import * as RTLActions from '../../../store/rtl.actions';

@ -27,6 +27,7 @@
<rtl-on-chain-send [sweepAll]="true" [sweepBalance]="balances[0].dataValue"></rtl-on-chain-send>
</mat-tab>
</mat-tab-group>
<rtl-on-chain-transaction-history fxLayout="row" fxFlex="100"></rtl-on-chain-transaction-history>
</mat-card-content>
</mat-card>
</div>

@ -6,7 +6,7 @@ import { Store } from '@ngrx/store';
import { MatTableDataSource, MatSort } from '@angular/material';
import { Channel, Peer, GetInfo } from '../../../../shared/models/lndModels';
import { TRANS_TYPES } from '../../../../shared/models/enums';
import { TRANS_TYPES } from '../../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../../shared/services/logger.service';
import { LNDEffects } from '../../../store/lnd.effects';

@ -1,6 +1,4 @@
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { Subject } from 'rxjs';
import { takeUntil, filter } from 'rxjs/operators';
import { Store } from '@ngrx/store';
@ -9,11 +7,9 @@ import { Actions } from '@ngrx/effects';
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 { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../../../shared/services/logger.service';
import { RTLEffects } from '../../../../../store/rtl.effects';
import * as RTLActions from '../../../../../store/rtl.actions';
import * as fromRTLReducer from '../../../../../store/rtl.reducers';
@ -38,7 +34,7 @@ export class ChannelBackupTableComponent implements OnInit, OnDestroy {
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 rtlEffects: RTLEffects, private actions$: Actions, private router: Router) {}
constructor(private logger: LoggerService, private store: Store<fromRTLReducer.RTLState>, private actions$: Actions) {}
ngOnInit() {
this.store.select('lnd')

@ -7,9 +7,8 @@ import { faHistory } from '@fortawesome/free-solid-svg-icons';
import { MatTableDataSource, MatSort, MatPaginator, MatPaginatorIntl } from '@angular/material';
import { ClosedChannel } from '../../../../../shared/models/lndModels';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../../../../shared/models/enums';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../../../shared/services/logger.service';
import { getPaginatorLabel } from '../../../../../shared/services/paginator.service';
import { RTLEffects } from '../../../../../store/rtl.effects';
import * as RTLActions from '../../../../../store/rtl.actions';

@ -11,9 +11,11 @@
<ng-container matColumnDef="remote_alias">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Peer </th>
<td mat-cell *matCellDef="let channel">
<span *ngIf="channel.active" class="green-dot"></span>
<span *ngIf="!channel.active" class="yellow-dot"></span>
{{channel.remote_alias || channel.chan_id}}
<div class="ellipsis-parent">
<span *ngIf="channel.active" class="green-dot"></span>
<span *ngIf="!channel.active" class="yellow-dot"></span>
<span class="ellipsis-child">{{channel.remote_alias || channel.remote_pubkey}}</span>
</div>
</td>
</ng-container>
<ng-container matColumnDef="total_satoshis_sent">

@ -1,6 +1,15 @@
.mat-column-remote_alias {
flex: 0 0 28%;
width: 28%;
& .ellipsis-parent {
display: flex;
max-width: 25rem;
}
}
.mat-column-capacity {
padding-left: 2rem;
padding-right: 2rem;
padding-left: 3rem;
padding-right: 3rem;
flex: 0 0 40%;
width: 40%;
}

@ -5,9 +5,8 @@ import { Store } from '@ngrx/store';
import { MatTableDataSource, MatSort, MatPaginator, MatPaginatorIntl } from '@angular/material';
import { Channel, GetInfo } from '../../../../../shared/models/lndModels';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../../../../shared/models/enums';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../../../shared/services/logger.service';
import { getPaginatorLabel } from '../../../../../shared/services/paginator.service';
import { LNDEffects } from '../../../../store/lnd.effects';
import { RTLEffects } from '../../../../../store/rtl.effects';

@ -82,24 +82,23 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
this.flgLoading[0] = 'error';
}
});
this.selNode = rtlStore.nodeSettings;
this.information = rtlStore.information;
this.pendingChannels = rtlStore.pendingChannels;
if (this.pendingChannels.total_limbo_balance) {
this.flgLoading[1] = false;
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_closing_channels) {
this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels);
}
if (this.pendingChannels.waiting_close_channels) {
this.loadWaitClosingChannelsTable(this.pendingChannels.waiting_close_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_closing_channels) {
this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels);
}
if (this.pendingChannels.waiting_close_channels) {
this.loadWaitClosingChannelsTable(this.pendingChannels.waiting_close_channels);
}
if (this.flgLoading[0] !== 'error') {
this.flgLoading[0] = (this.information.identity_pubkey) ? false : true;

@ -1,5 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { Store } from '@ngrx/store';
@ -7,8 +6,7 @@ import { Store } from '@ngrx/store';
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 { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../../../shared/services/logger.service';
import { LNDEffects } from '../../../../store/lnd.effects';

@ -9,9 +9,8 @@ import { faUsers } from '@fortawesome/free-solid-svg-icons';
import { MatTableDataSource, MatSort, MatPaginator, MatPaginatorIntl } from '@angular/material';
import { Peer, GetInfo } from '../../../shared/models/lndModels';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../../shared/models/enums';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../shared/services/logger.service';
import { getPaginatorLabel } from '../../../shared/services/paginator.service';
import { OpenChannelComponent } from '../../../shared/components/data-modal/open-channel/open-channel.component';
import { newlyAddedRowAnimation } from '../../../shared/animation/row-animation';
import { LNDEffects } from '../../store/lnd.effects';

@ -7,6 +7,7 @@ import { of, Subject } from 'rxjs';
import { map, mergeMap, catchError, withLatestFrom } from 'rxjs/operators';
import { Location } from '@angular/common';
import { MatDialog } from '@angular/material';
import { MatSnackBar } from '@angular/material';
import { environment, API_URL } from '../../../environments/environment';
import { LoggerService } from '../../shared/services/logger.service';
@ -14,7 +15,7 @@ import { SessionService } from '../../shared/services/session.service';
import { GetInfo, GetInfoChain, Fees, Balance, NetworkInfo, Payment, GraphNode, Transaction, SwitchReq, ListInvoices } from '../../shared/models/lndModels';
import { InvoiceInformationComponent } from '../../shared/components/data-modal/invoice-information/invoice-information.component';
import { OpenChannelComponent } from '../../shared/components/data-modal/open-channel/open-channel.component';
import { CurrencyUnitEnum } from '../../shared/models/enums';
import { CurrencyUnitEnum } from '../../shared/services/consts-enums-functions';
import * as RTLActions from '../../store/rtl.actions';
import * as fromRTLReducer from '../../store/rtl.reducers';
@ -33,6 +34,7 @@ export class LNDEffects implements OnDestroy {
private logger: LoggerService,
private sessionService: SessionService,
public dialog: MatDialog,
private snackBar: MatSnackBar,
private router: Router,
private location: Location) { }
@ -291,7 +293,7 @@ export class LNDEffects implements OnDestroy {
map((postRes: any) => {
this.logger.info(postRes);
this.store.dispatch(new RTLActions.CloseSpinner());
this.store.dispatch(new RTLActions.OpenAlert({ config: { width: '70%', data: { type: 'SUCCESS', titleMessage: action.payload.showMessage + ' ' + postRes.message }}}));
this.snackBar.open(action.payload.showMessage + ' ' + postRes.message);
return {
type: RTLActions.BACKUP_CHANNELS_RES,
payload: postRes.message
@ -316,7 +318,7 @@ export class LNDEffects implements OnDestroy {
map((postRes: any) => {
this.logger.info(postRes);
this.store.dispatch(new RTLActions.CloseSpinner());
this.store.dispatch(new RTLActions.OpenAlert({ config: { width: '70%', data: { type: 'SUCCESS', titleMessage: postRes.message }}}));
this.snackBar.open(postRes.message);
return {
type: RTLActions.VERIFY_CHANNELS_RES,
payload: postRes.message
@ -341,7 +343,7 @@ export class LNDEffects implements OnDestroy {
map((postRes: any) => {
this.logger.info(postRes);
this.store.dispatch(new RTLActions.CloseSpinner());
this.store.dispatch(new RTLActions.OpenAlert({ config: { width: '70%', data: { type: 'SUCCESS', titleMessage: postRes.message }}}));
this.snackBar.open(postRes.message);
this.store.dispatch(new RTLActions.SetRestoreChannelsList(postRes.list));
return {
type: RTLActions.RESTORE_CHANNELS_RES,

@ -6,8 +6,7 @@ import { Store } from '@ngrx/store';
import { faHistory } from '@fortawesome/free-solid-svg-icons';
import { MatTableDataSource, MatSort, MatPaginatorIntl } from '@angular/material';
import { getPaginatorLabel } from '../../../shared/services/paginator.service';
import { TimeUnitEnum, CurrencyUnitEnum, TIME_UNITS, CURRENCY_UNIT_FORMATS, PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../../shared/models/enums';
import { TimeUnitEnum, CurrencyUnitEnum, TIME_UNITS, CURRENCY_UNIT_FORMATS, PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../shared/services/consts-enums-functions';
import { SelNodeChild } from '../../../shared/models/RTLconfig';
import { GetInfo, Invoice } from '../../../shared/models/lndModels';
import { LoggerService } from '../../../shared/services/logger.service';

@ -6,9 +6,8 @@ import { faHistory } from '@fortawesome/free-solid-svg-icons';
import { MatTableDataSource, MatSort, MatPaginator, MatPaginatorIntl } from '@angular/material';
import { GetInfo, Payment, PayRequest } from '../../../shared/models/lndModels';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../../shared/models/enums';
import { PAGE_SIZE, PAGE_SIZE_OPTIONS, getPaginatorLabel } from '../../../shared/services/consts-enums-functions';
import { LoggerService } from '../../../shared/services/logger.service';
import { getPaginatorLabel } from '../../../shared/services/paginator.service';
import { newlyAddedRowAnimation } from '../../../shared/animation/row-animation';
import { LNDEffects } from '../../store/lnd.effects';

@ -5,7 +5,7 @@ import { Store } from '@ngrx/store';
import { faTools } from '@fortawesome/free-solid-svg-icons';
import { CURRENCY_UNITS } from '../../models/enums';
import { CURRENCY_UNITS } from '../../services/consts-enums-functions';
import { LightningNode, Settings, RTLConfiguration, GetInfoRoot } from '../../models/RTLconfig';
import { LoggerService } from '../../services/logger.service';
import { CommonService } from '../../services/common.service';

@ -2,7 +2,7 @@ import { Component, Input, OnInit, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { CurrencyUnitEnum, CURRENCY_UNIT_FORMATS } from '../../models/enums';
import { CurrencyUnitEnum, CURRENCY_UNIT_FORMATS } from '../../services/consts-enums-functions';
import { CommonService } from '../../services/common.service';
@Component({

@ -4,7 +4,7 @@ import { faCopy } from '@fortawesome/free-solid-svg-icons';
import { LoggerService } from '../../../services/logger.service';
import { AlertData } from '../../../models/alertData';
import { AlertTypeEnum } from '../../../models/enums';
import { AlertTypeEnum } from '../../../services/consts-enums-functions';
@Component({
selector: 'rtl-alert-message',

@ -50,37 +50,42 @@
Available balance: {{totalBalance | number}} {{information.smaller_currency_unit}}
</div>
<div fxLayout="row" fxFlex="100" fxLayoutAlign="space-between center" class="mt-2">
<mat-form-field fxFlex="20" fxLayoutAlign="start end">
<mat-form-field fxFlex="60" fxLayoutAlign="start end">
<input matInput [(ngModel)]="fundingAmount" placeholder="Amount" type="number" step="1000" min="1" max="{{totalBalance}}" tabindex="1" required name="amount" #amount="ngModel">
<mat-hint>(Remaining Bal: {{totalBalance - ((fundingAmount) ? fundingAmount : 0)}})</mat-hint>
<span matSuffix> {{information?.smaller_currency_unit}} </span>
</mat-form-field>
<mat-form-field fxFlex="25" fxLayoutAlign="start end">
<mat-select tabindex="2" [(value)]="selTransType">
<div fxFlex="35" fxLayoutAlign="start center">
<mat-slide-toggle tabindex="2" color="primary" [(ngModel)]="isPrivate" name="isPrivate">Private Channel</mat-slide-toggle>
</div>
</div>
<div fxLayout="row" fxFlex="100" fxLayoutAlign="space-between center">
<mat-form-field fxFlex="30" fxLayoutAlign="start end">
<mat-select tabindex="3" [(value)]="selTransType">
<mat-option *ngFor="let transType of transTypes" [value]="transType.id">
{{transType.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="25" *ngIf="selTransType=='0'">
<mat-form-field fxFlex="30" *ngIf="selTransType=='0'">
<input matInput placeholder="Default" disabled>
</mat-form-field>
<mat-form-field fxFlex="25" *ngIf="selTransType=='1'">
<input matInput [(ngModel)]="transTypeValue.blocks" placeholder="Target Confirmation Blocks" type="number" name="blocks" step="1" min="0" required tabindex="3" #blocks="ngModel">
<mat-form-field fxFlex="30" *ngIf="selTransType=='1'">
<input matInput [(ngModel)]="transTypeValue.blocks" placeholder="Target Confirmation Blocks" type="number" name="blocks" step="1" min="0" required tabindex="4" #blocks="ngModel">
</mat-form-field>
<mat-form-field fxFlex="25" *ngIf="selTransType=='2'">
<input matInput [(ngModel)]="transTypeValue.fees" placeholder="Fee ({{information?.smaller_currency_unit}}/Byte)" type="number" name="fees" step="1" min="0" required tabindex="4" #fees="ngModel">
<mat-form-field fxFlex="30" *ngIf="selTransType=='2'">
<input matInput [(ngModel)]="transTypeValue.fees" placeholder="Fee ({{information?.smaller_currency_unit}}/Byte)" type="number" name="fees" step="1" min="0" required tabindex="5" #fees="ngModel">
</mat-form-field>
<div fxFlex="25" fxLayoutAlign="start center">
<mat-slide-toggle tabindex="5" color="primary" [(ngModel)]="isPrivate" name="isPrivate">Private Channel</mat-slide-toggle>
<div fxFlex="35" fxLayoutAlign="start center">
<mat-slide-toggle tabindex="6" color="primary" [(ngModel)]="spendUnconfirmed" name="spendUnconfirmed">Spend Unconfirmed Output</mat-slide-toggle>
</div>
</div>
</div>
<div class="mt-2" fxLayout="row" fxLayoutAlign="end center">
<div *ngIf="newlyAdded" fxLayoutAlign="space-between center" fxFlex="60">
<button fxFlex="33" fxLayoutAlign="center center" mat-stroked-button color="warn" (click)="onClose()" tabindex="6">Do It Later</button>
<button fxFlex="32" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="7" type="reset" (click)="resetData()">Clear Field</button>
<button autoFocus fxFlex="33" fxLayoutAlign="center center" mat-raised-button color="primary" (click)="onOpenChannel()" [disabled]="fundingAmount == null || (totalBalance - ((fundingAmount) ? fundingAmount : 0) < 0)" type="submit" tabindex="8">
<button fxFlex="33" fxLayoutAlign="center center" mat-stroked-button color="warn" (click)="onClose()" tabindex="7">Do It Later</button>
<button fxFlex="32" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="8" type="reset" (click)="resetData()">Clear Field</button>
<button autoFocus fxFlex="33" fxLayoutAlign="center center" mat-raised-button color="primary" (click)="onOpenChannel()" [disabled]="fundingAmount == null || (totalBalance - ((fundingAmount) ? fundingAmount : 0) < 0)" type="submit" tabindex="9">
<p *ngIf="(fundingAmount == null) && (amount.touched || amount.dirty); else openText">Invalid Values</p>
<ng-template #openText><p>Open Channel</p></ng-template>
</button>

@ -4,7 +4,7 @@ import { Store } from '@ngrx/store';
import { Peer, GetInfo } from '../../../models/lndModels';
import { AlertData } from '../../../models/alertData';
import { TRANS_TYPES } from '../../../models/enums';
import { TRANS_TYPES } from '../../../services/consts-enums-functions';
import * as RTLActions from '../../../../store/rtl.actions';
import * as fromRTLReducer from '../../../../store/rtl.reducers';
@ -22,6 +22,7 @@ export class OpenChannelComponent implements OnInit {
public isPrivate = false;
public selTransType = '0';
public newlyAdded = false;
public spendUnconfirmed = false;
public transTypeValue = {blocks: '', fees: ''};
public transTypes = TRANS_TYPES;
@ -42,6 +43,7 @@ export class OpenChannelComponent implements OnInit {
resetData() {
this.fundingAmount = null;
this.isPrivate = false;
this.spendUnconfirmed = false;
this.selTransType = '0';
this.transTypeValue = {blocks: '', fees: ''};
}
@ -56,7 +58,7 @@ export class OpenChannelComponent implements OnInit {
this.store.dispatch(new RTLActions.OpenSpinner('Opening Channel...'));
this.store.dispatch(new RTLActions.SaveNewChannel({
selectedPeerPubkey: this.peer.pub_key, fundingAmount: this.fundingAmount, private: this.isPrivate,
transType: this.selTransType, transTypeValue: transTypeValue, spendUnconfirmed: false
transType: this.selTransType, transTypeValue: transTypeValue, spendUnconfirmed: this.spendUnconfirmed
}));
this.dialogRef.close(false);
}

@ -14,7 +14,7 @@
<mat-card-content>
<div fxLayout="column">
<div fxLayout="row" *ngIf="information.uris && information.uris.length > 0">
<mat-form-field fxFlex="100" fxLayoutAlign="start end">
<mat-form-field fxFlex="40" fxLayoutAlign="start end">
<mat-select tabindex="1" [(value)]="selInfoType">
<mat-option *ngFor="let infoType of infoTypes" [value]="infoType">
{{infoType.infoName}}

@ -12,7 +12,6 @@
<div *ngFor="let childNode of menuNode.children">
<button mat-button class="horizontal-button bg-primary px-2" fxFlex="100" fxLayoutAlign="center center" [routerLinkActive]="'h-active-link'" routerLink="{{childNode.link}}" [routerLinkActiveOptions]="{exact: true}">
<fa-icon *ngIf="childNode.iconType === 'FA'" matTooltip="{{childNode.name}}" [icon]="childNode.icon" class="fa-icon-small"></fa-icon>
<span *ngIf="childNode.name === 'Peers/Channels'" [matBadgeHidden]="numPendingChannels<1" matBadge="{{numPendingChannels}}" matBadgeOverlap="false" matBadgeColor="accent"></span>
</button>
</div>
</mat-menu>

@ -10,9 +10,7 @@
<div (click)="onChildNavClicked(node)">
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center">
<fa-icon *ngIf="node.iconType === 'FA'" [icon]="node.icon" class="fa-icon-small mr-4"></fa-icon>
<span *ngIf="settings.menuType === 'regular'">{{node.name}}</span><span
*ngIf="node.name === 'Peers/Channels'" [matBadgeHidden]="numPendingChannels<1"
matBadge="{{numPendingChannels}}" matBadgeOverlap="false" matBadgeColor="primary"></span>
<span *ngIf="settings.menuType === 'regular'">{{node.name}}</span>
</div>
</div>
</mat-tree-node>
@ -44,8 +42,7 @@
<mat-tree-node fxLayout="row" matTreeNodeToggle fxLayoutAlign="start center" *matTreeNodeDef="let node"
(click)="onChildNavClicked(node)" routerLinkActive="active-link" routerLink="{{node.link}}">
<fa-icon *ngIf="node.iconType === 'FA'" [icon]="node.icon" class="fa-icon-small mr-1"></fa-icon>
<span>{{node.name}}<span *ngIf="node.name === 'Peers/Channels'" [matBadgeHidden]="numPendingChannels<1"
matBadge="{{numPendingChannels}}" matBadgeOverlap="false" matBadgeColor="primary"></span></span>
<span>{{node.name}}</span>
</mat-tree-node>
<mat-nested-tree-node fxLayout="column" *matTreeNodeDef="let node; when: hasChild" matTreeNodeToggle>
@ -75,10 +72,7 @@
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle routerLinkActive="active-link" routerLink="{{node.link}}">
<div (click)="onChildNavClicked(node)">
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center">
<fa-icon *ngIf="node.iconType === 'FA'" [icon]="node.icon" class="fa-icon-regular" matTooltip="{{node.name}}" matTooltipPosition="right"><span
*ngIf="node.name === 'Peers/Channels'"
[matBadgeHidden]="numPendingChannels<1" matBadge="{{numPendingChannels}}" matBadgeOverlap="false"
matBadgeColor="primary"></span></fa-icon>
<fa-icon *ngIf="node.iconType === 'FA'" [icon]="node.icon" class="fa-icon-regular" matTooltip="{{node.name}}" matTooltipPosition="right"></fa-icon>
</div>
</div>
</mat-tree-node>

@ -3,8 +3,7 @@ import { HttpClient } from '@angular/common/http';
import { Subject, of, Observable } from 'rxjs';
import { take, map } from 'rxjs/operators';
import { CurrencyUnitEnum, TimeUnitEnum } from '../models/enums';
import { CurrencyUnitEnum, TimeUnitEnum } from './consts-enums-functions';
@Injectable()
export class CommonService implements OnInit, OnDestroy {
@ -33,13 +32,17 @@ export class CommonService implements OnInit, OnDestroy {
}).replace(/\s+/g, '');
}
titleCase(str) {
return str.charAt(0).toUpperCase() + str.substring(1).toLowerCase();
}
changeContainerWidth(fieldType: string) {
this.containerWidthChanged.next(fieldType);
}
convertCurrency(value: number, from: string, otherCurrencyUnit: string): Observable<any> {
let latest_date = new Date().valueOf();
if(this.conversionData.data && this.conversionData.last_fetched && (latest_date < (this.conversionData.last_fetched.valueOf() + 600000))) {
if(this.conversionData.data && this.conversionData.last_fetched && (latest_date < (this.conversionData.last_fetched.valueOf() + 300000))) {
return of(this.convert(value, from, otherCurrencyUnit));
} else {
return this.httpClient.get('https://blockchain.info/ticker')

@ -1,3 +1,11 @@
import { MatPaginatorIntl } from '@angular/material';
export function getPaginatorLabel(field: string) {
const appPaginator = new MatPaginatorIntl();
appPaginator.itemsPerPageLabel = field + ' per page:';
return appPaginator;
}
export const CURRENCY_UNITS = [ 'Sats', 'BTC' ];
export const CURRENCY_UNIT_FORMATS = { Sats: '1.0-0', BTC: '1.6-6', OTHER: '1.2-2'};

@ -1,8 +0,0 @@
import { MatPaginatorIntl } from '@angular/material';
export function getPaginatorLabel(field: string) {
const appPaginator = new MatPaginatorIntl();
field = field.charAt(0).toUpperCase() + field.substring(1).toLowerCase();
appPaginator.itemsPerPageLabel = field + ' per page:';
return appPaginator;
}

@ -472,10 +472,11 @@ body {
}
.flex-ellipsis {
padding-right: 3rem;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-right: 3rem;
}
.mat-list, .mat-list .mat-list-item .mat-list-item-content, .mat-nav-list, .mat-selection-list {
@ -804,6 +805,13 @@ table {
display: none !important;
}
.ellipsis-child {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.blinker {
animation: blink-animation 1s steps(5, start) infinite;
-webkit-animation: blink-animation 1s steps(5, start) infinite;

@ -13,7 +13,7 @@ import { environment, API_URL } from '../../environments/environment';
import { LoggerService } from '../shared/services/logger.service';
import { SessionService } from '../shared/services/session.service';
import { Settings, RTLConfiguration } from '../shared/models/RTLconfig';
import { AuthenticateWith, CURRENCY_UNITS } from '../shared/models/enums';
import { AuthenticateWith, CURRENCY_UNITS } from '../shared/services/consts-enums-functions';
import { SpinnerDialogComponent } from '../shared/components/data-modal/spinner-dialog/spinner-dialog.component';
import { AlertMessageComponent } from '../shared/components/data-modal/alert-message/alert-message.component';

Loading…
Cancel
Save