mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2025-02-22 14:22:48 +01:00
Payment/Invoices UX Fixes
Payment/Invoices UX Fixes
This commit is contained in:
parent
d513684cb6
commit
5421631d12
29 changed files with 84 additions and 69 deletions
File diff suppressed because one or more lines are too long
|
@ -148,6 +148,8 @@ THE SOFTWARE.
|
|||
|
||||
@angular/material/slide-toggle
|
||||
|
||||
@angular/material/snack-bar
|
||||
|
||||
@angular/material/sort
|
||||
|
||||
@angular/material/stepper
|
||||
|
|
1
angular/6.ed6f619a753cd468a3f1.js
Normal file
1
angular/6.ed6f619a753cd468a3f1.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
angular/7.3b3d365a0c96df4907d8.js
Normal file
1
angular/7.3b3d365a0c96df4907d8.js
Normal file
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.bec74f2f13e5712d0bd8.css"></head>
|
||||
<link rel="stylesheet" href="styles.36940ff719dbed85b186.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script src="runtime.952cedecc1da734f2035.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.4a80c5907248d06b4509.js"></script></body>
|
||||
<script src="runtime.cf15072f755a92e0766f.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.17677b43ba5c7b8274d4.js"></script></body>
|
||||
</html>
|
||||
|
|
1
angular/main.17677b43ba5c7b8274d4.js
Normal file
1
angular/main.17677b43ba5c7b8274d4.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
!function(e){function r(r){for(var n,i,a=r[0],f=r[1],c=r[2],p=0,s=[];p<a.length;p++)o[i=a[p]]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,c||[]),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:"1f534535205fd170f4b8",6:"fcf8cc2d0ffb9c7af5ec",7:"dba53355d8f7cb313570"}[e]+".js"}(e);var f=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(c);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;f.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",f.name="ChunkLoadError",f.type=n,f.request=u,t[1](f)}o[e]=void 0}};var c=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||[],f=a.push.bind(a);a.push=r,a=a.slice();for(var c=0;c<a.length;c++)r(a[c]);var l=f;t()}([]);
|
1
angular/runtime.cf15072f755a92e0766f.js
Normal file
1
angular/runtime.cf15072f755a92e0766f.js
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){function r(r){for(var n,a,i=r[0],f=r[1],c=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,c||[]),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:"180f16dffe826f0afab2",6:"ed6f619a753cd468a3f1",7:"3b3d365a0c96df4907d8"}[e]+".js"}(e);var f=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(c);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;f.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",f.name="ChunkLoadError",f.type=n,f.request=u,t[1](f)}o[e]=void 0}};var c=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||[],f=i.push.bind(i);i.push=r,i=i.slice();for(var c=0;c<i.length;c++)r(i[c]);var l=f;t()}([]);
|
1
angular/styles.36940ff719dbed85b186.css
Normal file
1
angular/styles.36940ff719dbed85b186.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -108,14 +108,14 @@ exports.updateUISettings = (req, res, next) => {
|
|||
});
|
||||
try {
|
||||
fs.writeFileSync(RTLConfFile, JSON.stringify(config, null, 2), 'utf-8');
|
||||
logger.info({fileName: 'RTLConf', msg: 'Updating UI Settings Succesful!'});
|
||||
res.status(201).json({message: 'UI Settings Updated Successfully'});
|
||||
logger.info({fileName: 'RTLConf', msg: 'Updating Application Node Settings Succesful!'});
|
||||
res.status(201).json({message: 'Application Node Settings Updated Successfully'});
|
||||
}
|
||||
catch (err) {
|
||||
logger.error({fileName: 'Conf', lineNum: 102, msg: 'Updating UI Settings Failed!'});
|
||||
logger.error({fileName: 'Conf', lineNum: 102, msg: 'Updating Application Node Settings Failed!'});
|
||||
res.status(500).json({
|
||||
message: "Updating UI Settings Failed!",
|
||||
error: 'Updating UI Settings Failed!'
|
||||
message: "Updating Application Node Settings Failed!",
|
||||
error: 'Updating Application Node Settings Failed!'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
@ -135,14 +135,14 @@ exports.updateUISettings = (req, res, next) => {
|
|||
fs.writeFileSync(RTLConfFile, ini.stringify(config));
|
||||
fs.appendFile(RTLConfFile, ini.stringify(settingsTemp, { section: 'Settings' }), function(err) {
|
||||
if (err) {
|
||||
logger.error({fileName: 'Conf', lineNum: 122, msg:'Updating UI Settings Failed!'});
|
||||
logger.error({fileName: 'Conf', lineNum: 122, msg:'Updating Application Node Settings Failed!'});
|
||||
res.status(500).json({
|
||||
message: "Updating UI Settings Failed!",
|
||||
error: 'Updating UI Settings Failed!'
|
||||
message: "Updating Application Node Settings Failed!",
|
||||
error: 'Updating Application Node Settings Failed!'
|
||||
});
|
||||
} else {
|
||||
logger.info({fileName: 'RTLConf', msg: 'Updating UI Settings Succesful!'});
|
||||
res.status(201).json({message: 'UI Settings Updated Successfully'});
|
||||
logger.info({fileName: 'RTLConf', msg: 'Updating Application Node Settings Succesful!'});
|
||||
res.status(201).json({message: 'Application Node Settings Updated Successfully'});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1029,7 +1029,7 @@ export class LNDEffects implements OnDestroy {
|
|||
this.store.dispatch(new RTLActions.FetchNetwork());
|
||||
this.store.dispatch(new RTLActions.FetchChannels({routeParam: 'all'}));
|
||||
this.store.dispatch(new RTLActions.FetchChannels({routeParam: 'pending'}));
|
||||
this.store.dispatch(new RTLActions.FetchInvoices({num_max_invoices: 25, reversed: true}));
|
||||
this.store.dispatch(new RTLActions.FetchInvoices({num_max_invoices: 10, reversed: true}));
|
||||
this.store.dispatch(new RTLActions.FetchPayments());
|
||||
let newRoute = this.location.path();
|
||||
if(newRoute.includes('/cl/')) {
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
<td mat-cell *matCellDef="let invoice">{{invoice.memo}}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="value">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Value ({{(selNode?.satsToBTC) ? information?.currency_unit : information?.smaller_currency_unit}}) </th>
|
||||
<td mat-cell *matCellDef="let invoice"><span fxLayoutAlign="end center"> {{(selNode?.satsToBTC) ? (invoice?.btc_value | number:'1.0-3') : (invoice?.value | number)}} </span></td>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Value (Sats) </th>
|
||||
<td mat-cell *matCellDef="let invoice"><span fxLayoutAlign="end center"> {{invoice?.value | number}} </span></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="settle_date">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header class="pl-4"> Date Settled </th>
|
||||
|
|
|
@ -5,8 +5,9 @@ import { Subject } from 'rxjs';
|
|||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { faHistory } from '@fortawesome/free-solid-svg-icons';
|
||||
import { getInvoicesPaginator } from '../../../shared/services/paginator.service';
|
||||
|
||||
import { MatTableDataSource, MatSort } from '@angular/material';
|
||||
import { MatTableDataSource, MatSort, MatPaginatorIntl } from '@angular/material';
|
||||
import { SelNodeChild } from '../../../shared/models/RTLconfig';
|
||||
import { GetInfo, Invoice } from '../../../shared/models/lndModels';
|
||||
import { CurrencyUnitConvertPipe } from '../../../shared/pipes/app.pipe';
|
||||
|
@ -21,7 +22,10 @@ import * as fromRTLReducer from '../../../store/rtl.reducers';
|
|||
selector: 'rtl-lightning-invoices',
|
||||
templateUrl: './lightning-invoices.component.html',
|
||||
styleUrls: ['./lightning-invoices.component.scss'],
|
||||
animations: [newlyAddedRowAnimation]
|
||||
animations: [newlyAddedRowAnimation],
|
||||
providers: [
|
||||
{ provide: MatPaginatorIntl, useValue: getInvoicesPaginator() },
|
||||
]
|
||||
})
|
||||
export class LightningInvoicesComponent implements OnInit, OnDestroy {
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div fxLayout="row" class="padding-gap-x page-title-container">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
|
||||
<fa-icon [icon]="faChartPie" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Lightning Balance</span>
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@
|
|||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
<div fxLayout="row" class="padding-gap-x page-title-container">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
|
||||
<fa-icon [icon]="faExchangeAlt" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Lightning Transactions</span>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div fxLayout="row" class="padding-gap-x page-title-container">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
|
||||
<fa-icon [icon]="faTools" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Application Settings</span>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Store } from '@ngrx/store';
|
|||
|
||||
import { faTools } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
import { CURRENCY_UNITS, CURRENCY_UNITS_INVERSE } from '../../models/enums';
|
||||
import { CURRENCY_UNITS } from '../../models/enums';
|
||||
import { LightningNode, Settings, RTLConfiguration, GetInfoRoot } from '../../models/RTLconfig';
|
||||
import { LoggerService } from '../../services/logger.service';
|
||||
import { CommonService } from '../../services/common.service';
|
||||
|
@ -73,6 +73,8 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
|||
|
||||
onCurrencyChange(event: any) {
|
||||
this.selNode.settings.currencyUnit = event.value;
|
||||
this.store.dispatch(new RTLActions.SetChildNodeSettings({channelBackupPath: this.selNode.settings.channelBackupPath, satsToBTC: this.selNode.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS, this.selNode.settings.currencyUnit]}));
|
||||
this.store.dispatch(new RTLActions.SetChildNodeSettingsCL({channelBackupPath: this.selNode.settings.channelBackupPath, satsToBTC: this.selNode.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS, this.selNode.settings.currencyUnit]}));
|
||||
}
|
||||
|
||||
chooseMenuType() {
|
||||
|
@ -86,14 +88,9 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
|||
|
||||
toggleSettings(toggleField: string, event?: any) {
|
||||
if (toggleField === 'satsToBTC') {
|
||||
if (this.selNode.settings.satsToBTC) {
|
||||
this.store.dispatch(new RTLActions.SetChildNodeSettings({channelBackupPath: this.selNode.settings.channelBackupPath, satsToBTC: this.selNode.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS_INVERSE, this.selNode.settings.currencyUnit]}));
|
||||
this.store.dispatch(new RTLActions.SetChildNodeSettingsCL({channelBackupPath: this.selNode.settings.channelBackupPath, satsToBTC: this.selNode.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS_INVERSE, this.selNode.settings.currencyUnit]}));
|
||||
} else {
|
||||
this.store.dispatch(new RTLActions.SetChildNodeSettings({channelBackupPath: this.selNode.settings.channelBackupPath, satsToBTC: this.selNode.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS, this.selNode.settings.currencyUnit]}));
|
||||
this.store.dispatch(new RTLActions.SetChildNodeSettingsCL({channelBackupPath: this.selNode.settings.channelBackupPath, satsToBTC: this.selNode.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS, this.selNode.settings.currencyUnit]}));
|
||||
}
|
||||
}
|
||||
if(toggleField === 'menu') {
|
||||
this.selNode.settings.flgSidenavOpened = (!event.checked) ? false : true;
|
||||
setTimeout(() => {
|
||||
|
@ -120,10 +117,17 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
|||
let updatedSettings = (JSON.stringify(this.previousSettings) !== JSON.stringify(this.selNode.settings)) ? this.selNode.settings : null;
|
||||
let defaultNodeIndex = (this.previousDefaultNode !== this.appConfig.defaultNodeIndex) ? this.appConfig.defaultNodeIndex : null;
|
||||
this.logger.info(this.selNode.settings);
|
||||
if (!updatedSettings && !defaultNodeIndex) {
|
||||
this.store.dispatch(new RTLActions.OpenAlert({config: { width: '75%', data: {
|
||||
type: 'INFO',
|
||||
titleMessage: 'Nothing has been updated to save!'
|
||||
}}}));
|
||||
} else {
|
||||
this.store.dispatch(new RTLActions.OpenSpinner('Updating Settings...'));
|
||||
this.store.dispatch(new RTLActions.SaveSettings({settings: updatedSettings, defaultNodeIndex: defaultNodeIndex}));
|
||||
this.done.emit();
|
||||
}
|
||||
}
|
||||
|
||||
onResetSettings() {
|
||||
this.selNode.settings = this.previousSettings;
|
||||
|
|
|
@ -69,14 +69,11 @@
|
|||
<mat-divider class="w-100 my-1"></mat-divider>
|
||||
</div>
|
||||
<div [ngClass]="{'mt-2': !showAdvanced, 'mt-1': showAdvanced}" fxLayout="row" fxLayoutAlign="end center">
|
||||
<button fxFlex="25" fxLayoutAlign="center center" class="mr-2" mat-stroked-button color="accent" type="reset" (click)="onShowAdvanced()" tabindex="1">
|
||||
<button fxFlex="33" fxLayoutAlign="center center" class="mr-2" mat-raised-button color="primary" tabindex="2" type="submit" rtlClipboard [payload]="invoice.payment_request" (copied)="onCopyPayment($event)">Copy Payment Request</button>
|
||||
<button fxFlex="25" fxLayoutAlign="center center" mat-stroked-button color="accent" type="reset" (click)="onShowAdvanced()" tabindex="1">
|
||||
<p *ngIf="!showAdvanced; else hideAdvancedText">Show Advanced</p>
|
||||
<ng-template #hideAdvancedText><p>Hide Advanced</p></ng-template>
|
||||
</button>
|
||||
<button fxFlex="33" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="2" type="submit" rtlClipboard [payload]="invoice.payment_request" (copied)="onCopyPayment($event)">
|
||||
<p *ngIf="!flgCopied; else copiedText">Copy Payment Request</p>
|
||||
<ng-template #copiedText><p>Copied</p></ng-template>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { faReceipt } from '@fortawesome/free-solid-svg-icons';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
|
||||
import { LoggerService } from '../../../shared/services/logger.service';
|
||||
import { AlertData } from '../../../shared/models/alertData';
|
||||
|
@ -13,11 +14,10 @@ import { Invoice } from '../../../shared/models/lndModels';
|
|||
})
|
||||
export class InvoiceInformationComponent implements OnInit {
|
||||
public faReceipt = faReceipt;
|
||||
public flgCopied = false;
|
||||
public showAdvanced = false;
|
||||
public invoice: Invoice;
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<InvoiceInformationComponent>, @Inject(MAT_DIALOG_DATA) public data: AlertData, private logger: LoggerService) { }
|
||||
constructor(public dialogRef: MatDialogRef<InvoiceInformationComponent>, @Inject(MAT_DIALOG_DATA) public data: AlertData, private logger: LoggerService, private snackBar: MatSnackBar) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.invoice = JSON.parse(this.data.message);
|
||||
|
@ -31,9 +31,8 @@ export class InvoiceInformationComponent implements OnInit {
|
|||
this.showAdvanced = !this.showAdvanced;
|
||||
}
|
||||
|
||||
onCopyPayment(payload) {
|
||||
this.flgCopied = true;
|
||||
setTimeout(() => {this.flgCopied = false; }, 5000);
|
||||
onCopyPayment(payload: string) {
|
||||
this.snackBar.open('Payment request copied');
|
||||
this.logger.info('Copied Text: ' + payload);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div fxLayout="row" class="padding-gap-x page-title-container">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
|
||||
<fa-icon [icon]="faUnlockAlt" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Signin to RTL</span>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
export const CURRENCY_UNITS = [ 'SATS', 'BTC' ];
|
||||
export const CURRENCY_UNITS_INVERSE = [ 'BTC', 'SATS' ];
|
||||
|
||||
export enum AuthenticateWith {
|
||||
TOKEN = 'TOKEN',
|
||||
|
|
|
@ -5,3 +5,9 @@ export function getPaymentsPaginator() {
|
|||
paymentsPaginator.itemsPerPageLabel = 'Payments per page:';
|
||||
return paymentsPaginator;
|
||||
}
|
||||
|
||||
export function getInvoicesPaginator() {
|
||||
const invoicesPaginator = new MatPaginatorIntl();
|
||||
invoicesPaginator.itemsPerPageLabel = 'Invoices per page:';
|
||||
return invoicesPaginator;
|
||||
}
|
|
@ -9,7 +9,7 @@ import {
|
|||
MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule, MatDialogModule, MatExpansionModule, MatGridListModule, MatDatepickerModule,
|
||||
MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatTreeModule, MatNativeDateModule,
|
||||
MatSelectModule, MatSidenavModule, MatSlideToggleModule, MatSortModule, MatTableModule, MatToolbarModule, MatTooltipModule, MAT_DIALOG_DEFAULT_OPTIONS, MatBadgeModule,
|
||||
MatPaginatorModule, MatStepperModule, MatSliderModule, MatTabsModule, MatPaginatorIntl
|
||||
MatPaginatorModule, MatStepperModule, MatSliderModule, MatTabsModule, MatSnackBarModule, MAT_SNACK_BAR_DEFAULT_OPTIONS
|
||||
} from '@angular/material';
|
||||
|
||||
import { QRCodeModule } from 'angularx-qrcode';
|
||||
|
@ -70,6 +70,7 @@ import { CommonService } from './services/common.service';
|
|||
MatStepperModule,
|
||||
MatSliderModule,
|
||||
MatTabsModule,
|
||||
MatSnackBarModule,
|
||||
QRCodeModule,
|
||||
NgxChartsModule,
|
||||
RouterModule,
|
||||
|
@ -109,6 +110,7 @@ import { CommonService } from './services/common.service';
|
|||
MatStepperModule,
|
||||
MatSliderModule,
|
||||
MatTabsModule,
|
||||
MatSnackBarModule,
|
||||
AppSettingsComponent,
|
||||
InvoiceInformationComponent,
|
||||
AlertMessageComponent,
|
||||
|
@ -155,6 +157,7 @@ import { CommonService } from './services/common.service';
|
|||
],
|
||||
providers: [
|
||||
{ provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: { hasBackdrop: true, autoFocus: true, disableClose: true, role: 'dialog', width: '700px' } },
|
||||
{ provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 3000, verticalPosition: 'bottom', panelClass: 'rtl-snack-bar' } },
|
||||
CommonService, CurrencyUnitConvertPipe, DecimalPipe
|
||||
]
|
||||
})
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
.page-title-container, .page-sub-title-container {
|
||||
font-size: $small-font-size * 1.1;
|
||||
& .page-title-img {
|
||||
width: $small-font-size * 1.8;
|
||||
height: $small-font-size * 1.8;
|
||||
width: $small-font-size * 1.5;
|
||||
height: $small-font-size * 1.5;
|
||||
font-size: $small-font-size * 1.5;
|
||||
}
|
||||
}
|
||||
|
@ -98,8 +98,8 @@
|
|||
font-size: $regular-font-size * 1.1;
|
||||
& .page-title-img {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: $regular-font-size * 1.3;
|
||||
height: 2.6rem;
|
||||
font-size: $regular-font-size * 1.4;
|
||||
}
|
||||
}
|
||||
.mat-button .mat-icon-button .top-toolbar-icon.icon-pinned {
|
||||
|
@ -140,7 +140,7 @@
|
|||
font-size: $regular-font-size * 5;
|
||||
}
|
||||
.icon-medium {
|
||||
font-size: $regular-font-size * 2 !important;
|
||||
font-size: $regular-font-size * 2.2 !important;
|
||||
}
|
||||
.icon-small {
|
||||
font-size: $regular-font-size * 1.5 !important;
|
||||
|
@ -173,9 +173,9 @@
|
|||
margin-top: 0.5rem;
|
||||
font-size: $large-font-size * 1.1;
|
||||
& .page-title-img {
|
||||
width: $large-font-size * 2;
|
||||
height: $large-font-size * 2;
|
||||
font-size: $large-font-size * 2.1;
|
||||
width: $large-font-size * 1.9;
|
||||
height: $large-font-size * 2.25;
|
||||
font-size: $large-font-size * 1.5;
|
||||
}
|
||||
}
|
||||
.fa-icon-small, .top-icon-small, .invoice-info-header {
|
||||
|
@ -213,7 +213,7 @@
|
|||
font-size: $large-font-size * 5;
|
||||
}
|
||||
.icon-medium {
|
||||
font-size: $large-font-size * 2 !important;
|
||||
font-size: $large-font-size * 2.2 !important;
|
||||
}
|
||||
.icon-small {
|
||||
font-size: $large-font-size * 1.5 !important;
|
||||
|
|
|
@ -215,9 +215,6 @@
|
|||
thead tr th {
|
||||
color: $foreground-base;
|
||||
}
|
||||
tr.mat-row:hover {
|
||||
background-color: $hover-background;
|
||||
}
|
||||
}
|
||||
|
||||
.invoice-info-header {
|
||||
|
@ -232,4 +229,12 @@
|
|||
background: $foreground-divider;
|
||||
}
|
||||
|
||||
.rtl-snack-bar {
|
||||
background: $primary-darker;
|
||||
& .mat-simple-snackbar {
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,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, CURRENCY_UNITS_INVERSE } from '../shared/models/enums';
|
||||
import { AuthenticateWith, CURRENCY_UNITS } from '../shared/models/enums';
|
||||
|
||||
import { SpinnerDialogComponent } from '../shared/components/spinner-dialog/spinner-dialog.component';
|
||||
import { AlertMessageComponent } from '../shared/components/alert-message/alert-message.component';
|
||||
|
@ -132,7 +132,7 @@ export class RTLEffects implements OnDestroy {
|
|||
this.logger.info(updateStatus);
|
||||
return {
|
||||
type: RTLActions.OPEN_ALERT,
|
||||
payload: { data: { type: 'SUCCESS', titleMessage: (!updateStatus.length) ? updateStatus.message : updateStatus[0].message + '. ' + updateStatus[1].message } }
|
||||
payload: { config : { width: '70%', data: { type: 'SUCCESS', titleMessage: (!updateStatus.length) ? updateStatus.message : updateStatus[0].message + '. ' + updateStatus[1].message }}}
|
||||
};
|
||||
},
|
||||
catchError((err) => {
|
||||
|
@ -285,11 +285,7 @@ export class RTLEffects implements OnDestroy {
|
|||
initializeNode(node: any, isInitialSetup: boolean) {
|
||||
const landingPage = isInitialSetup ? '' : 'HOME';
|
||||
let selNode = {};
|
||||
if (node.settings.satsToBTC) {
|
||||
selNode = { channelBackupPath: node.settings.channelBackupPath, satsToBTC: node.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS_INVERSE, node.settings.currencyUnit] };
|
||||
} else {
|
||||
selNode = { channelBackupPath: node.settings.channelBackupPath, satsToBTC: node.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS, node.settings.currencyUnit] };
|
||||
}
|
||||
this.store.dispatch(new RTLActions.ResetRootStore(node));
|
||||
this.store.dispatch(new RTLActions.ResetLNDStore(selNode));
|
||||
this.store.dispatch(new RTLActions.ResetCLStore(selNode));
|
||||
|
|
Loading…
Add table
Reference in a new issue