mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 09:50:36 +01:00
More settings update
More settings update
This commit is contained in:
parent
054f4d7658
commit
a629cb235c
1
angular/6.156118a5fd225700d103.js
Normal file
1
angular/6.156118a5fd225700d103.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.325ae7790ee297067bcc.js
Normal file
1
angular/7.325ae7790ee297067bcc.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.a8287f97ce506fffef3f.css"></head>
|
||||
<link rel="stylesheet" href="styles.58896416c21696e94583.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script src="runtime.e5b60cf568517569717c.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.58be42bfaa1eb4a261a4.js"></script></body>
|
||||
<script src="runtime.10fdea7ff19f81f29517.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.d5c80aae84fe3f881d64.js"></script></body>
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
1
angular/main.d5c80aae84fe3f881d64.js
Normal file
1
angular/main.d5c80aae84fe3f881d64.js
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
!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:"df9093d1e13d9e6f0394",6:"c3c6c4c3788a25a07972",7:"cd0c8c61bc5617195b9b"}[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()}([]);
|
||||
!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:"df9093d1e13d9e6f0394",6:"156118a5fd225700d103",7:"325ae7790ee297067bcc"}[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()}([]);
|
1
angular/styles.58896416c21696e94583.css
Normal file
1
angular/styles.58896416c21696e94583.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
@ -65,7 +65,7 @@ connect.setDefaultConfig = () => {
|
||||
menuType: "regular",
|
||||
fontSize: "regular-font",
|
||||
themeMode: "day",
|
||||
themeColor: "purple-white",
|
||||
themeColor: "purple",
|
||||
satsToBTC: false,
|
||||
channelBackupPath: channelBackupPath,
|
||||
enableLogging: "true",
|
||||
|
@ -31,7 +31,7 @@ exports.getRTLConfig = (req, res, next) => {
|
||||
bitcoindConfigPath: common.nodes[0].bitcoind_config_path
|
||||
};
|
||||
jsonConfig.Settings.channelBackupPath = (undefined !== jsonConfig.Settings.channelBackupPath) ? jsonConfig.Settings.channelBackupPath : common.nodes[0].channel_backup_path;
|
||||
res.status(200).json({ selectedNodeIndex: common.selectedNode.index, sso: sso, nodes: [{
|
||||
res.status(200).json({ defaultNodeIndex: 0, selectedNodeIndex: common.selectedNode.index, sso: sso, nodes: [{
|
||||
index: common.nodes[0].index,
|
||||
lnNode: 'SingleNode',
|
||||
lnImplementation: '',
|
||||
@ -46,7 +46,7 @@ exports.getRTLConfig = (req, res, next) => {
|
||||
if (err) {
|
||||
if (err.code === 'ENOENT') {
|
||||
logger.error({fileName: 'RTLConf', lineNum: 46, msg: 'Multi Node Config does not exist!'});
|
||||
res.status(200).json({ selectedNodeIndex: {}, sso: {}, nodes: [] });
|
||||
res.status(200).json({ defaultNodeIndex: 0, selectedNodeIndex: 0, sso: {}, nodes: [] });
|
||||
} else {
|
||||
logger.error({fileName: 'RTLConf', lineNum: 49, msg: 'Getting Multi Node Config Failed!'});
|
||||
res.status(500).json({
|
||||
@ -82,7 +82,7 @@ exports.getRTLConfig = (req, res, next) => {
|
||||
authentication: authentication})
|
||||
});
|
||||
}
|
||||
res.status(200).json({ selectedNodeIndex: common.selectedNode.index, sso: sso, nodes: nodesArr });
|
||||
res.status(200).json({ defaultNodeIndex: multiNodeConfig.defaultNodeIndex, selectedNodeIndex: common.selectedNode.index, sso: sso, nodes: nodesArr });
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -148,6 +148,24 @@ exports.updateUISettings = (req, res, next) => {
|
||||
}
|
||||
};
|
||||
|
||||
exports.updateDefaultNode = (req, res, next) => {
|
||||
RTLConfFile = common.rtl_conf_file_path + '/RTL-Multi-Node-Conf.json';
|
||||
var config = JSON.parse(fs.readFileSync(RTLConfFile, 'utf-8'));
|
||||
config.defaultNodeIndex = req.body.defaultNodeIndex;
|
||||
try {
|
||||
fs.writeFileSync(RTLConfFile, JSON.stringify(config, null, 2), 'utf-8');
|
||||
logger.info({fileName: 'RTLConf', msg: 'Updating Default Node Succesful!'});
|
||||
res.status(201).json({message: 'Default Node Updated Successfully'});
|
||||
}
|
||||
catch (err) {
|
||||
logger.error({fileName: 'Conf', lineNum: 102, msg: 'Updating Default Node Failed!'});
|
||||
res.status(500).json({
|
||||
message: "Updating Default Node Failed!",
|
||||
error: 'Updating Default Node Failed!'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
exports.getConfig = (req, res, next) => {
|
||||
let confFile = '';
|
||||
let JSONFormat = false;
|
||||
|
@ -7,5 +7,5 @@ router.get("/rtlconf", RTLConfController.getRTLConfig);
|
||||
router.post("/", authCheck, RTLConfController.updateUISettings);
|
||||
router.get("/config/:nodeType", authCheck, RTLConfController.getConfig);
|
||||
router.post("/updateSelNode", RTLConfController.updateSelectedNode);
|
||||
|
||||
router.post("/updateDefaultNode", RTLConfController.updateDefaultNode);
|
||||
module.exports = router;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div fxLayout="column" id="rtl-container" class="rtl-container" [ngClass]="[settings.themeColor, settings.themeMode, settings.fontSize]" [class.horizontal]="settings.menu === 'horizontal'" [class.compact]="settings.menuType === 'compact'" [class.mini]="settings.menuType === 'mini'">
|
||||
<mat-toolbar fxLayout="row" fxLayoutAlign="space-between center" class="padding-gap-x bg-primary">
|
||||
<mat-toolbar fxLayout="row" fxLayoutAlign="space-between center" class="padding-gap-x bg-primary" *ngIf="settings.menu === 'vertical'">
|
||||
<div fxLayoutAlign="center center">
|
||||
<button *ngIf="settings.menu === 'vertical'" class="top-toolbar-icon" mat-icon-button (click)="sideNavToggle()">
|
||||
<mat-icon>menu</mat-icon>
|
||||
|
@ -57,7 +57,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="10" fxLayoutAlign="end start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="9" type="reset"
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="9" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<div fxFlex="30" fxLayoutAlign="space-between stretch">
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="primary"
|
||||
[disabled]="fhForm.invalid" type="submit" tabindex="3">Fetch</button>
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="accent" class="ml-2" tabindex="4"
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-stroked-button color="accent" class="ml-2" tabindex="4"
|
||||
type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="primary" type="submit"
|
||||
tabindex="5" [disabled]="!addInvoiceForm.valid">Add</button>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="6" type="reset"
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="6" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="warn" tabindex="7" type="button"
|
||||
(click)="onDeleteExpiredInvoices()">Delete Expired</button>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="3" type="submit" (click)="onLookup()" [disabled]="!form.valid">Lookup</button>
|
||||
</div>
|
||||
<div fxFlex="12" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="4" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="4" type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
@ -109,7 +109,7 @@
|
||||
class="top-minus-15px">Generate Address</button>
|
||||
</div>
|
||||
<div fxFlex.gt-md="30" fxFlex.lt-lg="49" fxLayoutAlign="start end">
|
||||
<button fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="3"
|
||||
<button fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="3"
|
||||
(click)="resetReceiveData()" class="top-minus-15px">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -167,7 +167,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="10" fxLayoutAlign="end start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="9" type="reset"
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="9" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -30,7 +30,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="15" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="4" type="reset"
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="4" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<p>Send Payment</p>
|
||||
</ng-template>
|
||||
</button>
|
||||
<button fxFlex="48" mat-raised-button color="accent" type="reset" tabindex="3" type="reset"
|
||||
<button fxFlex="48" mat-stroked-button color="accent" type="reset" tabindex="3" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -18,7 +18,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="15" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="2" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="2" type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
@ -49,7 +49,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="10" fxLayoutAlign="end start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="9" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="9" type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<mat-checkbox [(ngModel)]="private" matTooltip="Include routing hints for private channels" [matTooltipPosition]="'above'" name="private">Private</mat-checkbox>
|
||||
</div>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="primary" type="submit" tabindex="5">Add</button>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="6" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="6" type="reset" (click)="resetData()">Clear</button>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="3" type="submit" (click)="onLookup()" [disabled]="!form.valid">Lookup</button>
|
||||
</div>
|
||||
<div fxFlex="12" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="4" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="4" type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
@ -95,7 +95,7 @@
|
||||
<button fxLayoutAlign="center center" mat-raised-button color="primary" [disabled]="undefined === selectedAddress.addressId" (click)="onGenerateAddress()" tabindex="2" class="top-minus-15px">Generate Address</button>
|
||||
</div>
|
||||
<div fxFlex.gt-md="30" fxFlex.lt-lg="49" fxLayoutAlign="start end">
|
||||
<button fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="3" (click)="resetReceiveData()" class="top-minus-15px">Clear</button>
|
||||
<button fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="3" (click)="resetReceiveData()" class="top-minus-15px">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="42" fxLayoutAlign="start end">
|
||||
@ -157,7 +157,7 @@
|
||||
<p *ngIf="invalidValues && (address.touched || address.dirty) && (amount.touched || amount.dirty); else sendText">Invalid Values</p>
|
||||
<ng-template #sendText><p>Send</p></ng-template>
|
||||
</button>
|
||||
<button fxFlex="48" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="9" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="9" type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
@ -28,7 +28,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="15" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="4" type="reset"
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="4" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -18,7 +18,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div fxFlex="15" fxLayoutAlign="start start">
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="2" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="90" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="2" type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<div fxFlex="30" fxLayoutAlign="space-between stretch">
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="primary"
|
||||
[disabled]="rpForm.invalid" type="submit" tabindex="3">Fetch</button>
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="accent" class="ml-2" tabindex="4"
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-stroked-button color="accent" class="ml-2" tabindex="4"
|
||||
type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<div fxFlex="30" fxLayoutAlign="space-between stretch">
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="primary"
|
||||
[disabled]="fhForm.invalid" type="submit" tabindex="3">Fetch</button>
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="accent" class="ml-2" tabindex="4"
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-stroked-button color="accent" class="ml-2" tabindex="4"
|
||||
type="reset" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -16,7 +16,6 @@ import * as fromRTLReducer from '../../store/rtl.reducers';
|
||||
export class TransactionsComponent implements OnInit, OnDestroy {
|
||||
faExchangeAlt = faExchangeAlt;
|
||||
faChartPie = faChartPie;
|
||||
currencyUnits = [];
|
||||
balances = [{title: 'Local Capacity', dataValue: 0, tooltip: 'Amount you can send'}, {title: 'Remote Capacity', dataValue: 0, tooltip: 'Amount you can receive'}];
|
||||
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
@ -26,7 +25,6 @@ export class TransactionsComponent implements OnInit, OnDestroy {
|
||||
this.store.select('lnd')
|
||||
.pipe(takeUntil(this.unSubs[0]))
|
||||
.subscribe((rtlStore) => {
|
||||
this.currencyUnits = rtlStore.nodeSettings.currencyUnits;
|
||||
this.balances = [{title: 'Local Capacity', dataValue: rtlStore.totalLocalBalance, tooltip: 'Amount you can send'}, {title: 'Remote Capacity', dataValue: rtlStore.totalRemoteBalance, tooltip: 'Amount you can receive'}];
|
||||
this.logger.info(rtlStore);
|
||||
});
|
||||
|
@ -21,7 +21,7 @@
|
||||
<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-raised-button color="accent" tabindex="5" type="reset" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="15" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="5" type="reset" (click)="resetData()">Clear</button>
|
||||
</form>
|
||||
</div>
|
||||
<ng-template #initBlock>
|
||||
@ -29,7 +29,7 @@
|
||||
<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-raised-button color="accent" tabindex="5" type="reset" (click)="proceed=false;warnRes=true">Cancel</button>
|
||||
<button fxFlex="15" fxLayoutAlign="center center" mat-stroked-button color="accent" 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>
|
||||
@ -61,7 +61,7 @@
|
||||
<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-raised-button color="accent" fxFlex="10" type="reset" matStepperPrevious>Back</button>
|
||||
<button mat-stroked-button color="accent" 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>
|
||||
|
@ -7,8 +7,18 @@
|
||||
<mat-card-content fxLayout="column" class="card-content-gap">
|
||||
<div fxLayout="column" fxLayout.gt-sm="row wrap" fxLayoutAlign.gt-sm="space-between center" fxLayoutAlign="center space-between">
|
||||
<div fxLayout="row" fxFlex="100" fxLayoutAlign="space-between center">
|
||||
<div fxFlex="50">
|
||||
<div fxFlex="60">
|
||||
<div fxFlex="25" *ngIf="appConfig.nodes.length && appConfig.nodes.length > 1">
|
||||
<div fxFlex.gt-md="50" fxFlex="80">
|
||||
<h4>Default Selected Node</h4>
|
||||
<mat-select [(ngModel)]="appConfig.defaultNodeIndex" placeholder="Default Node" tabindex="1" required name="defaultNode">
|
||||
<mat-option *ngFor="let node of appConfig.nodes" [value]="node.index">
|
||||
{{node.lnNode}} ({{node.lnImplementation}})
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="25">
|
||||
<div fxFlex.gt-md="30" fxFlex="70">
|
||||
<h4>Currency Unit</h4>
|
||||
<mat-select [(ngModel)]="selNode.settings.currencyUnit" placeholder="Currency Unit" (selectionChange)="onCurrencyChange($event)" tabindex="1" required name="currencyUnit">
|
||||
<mat-option *ngFor="let currencyUnit of currencyUnits" [value]="currencyUnit.id">
|
||||
@ -109,10 +119,10 @@
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="start start" class="mt-4">
|
||||
<mat-divider class="mb-2"></mat-divider>
|
||||
<div class="mt-4">
|
||||
<button class="mr-4" fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="primary"
|
||||
<div class="mt-2">
|
||||
<button class="mr-2" fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="primary"
|
||||
(click)="onUpdateSettings()" tabindex="12">Update</button>
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-raised-button color="accent" (click)="onResetSettings()"
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-stroked-button color="accent" (click)="onResetSettings()"
|
||||
tabindex="13">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@ import { Store } from '@ngrx/store';
|
||||
|
||||
import { faTools } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
import { CURRENCY_UNITS } from '../../../../environments/environment';
|
||||
import { CURRENCY_UNITS, CURRENCY_UNITS_INVERSE } from '../../models/enums';
|
||||
import { LightningNode, Settings, RTLConfiguration, GetInfoRoot } from '../../models/RTLconfig';
|
||||
import { LoggerService } from '../../services/logger.service';
|
||||
import { CommonService } from '../../services/common.service';
|
||||
@ -26,7 +26,7 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
||||
public menus = [{id: 'vertical', name: 'Vertical'}, {id: 'horizontal', name: 'Horizontal'}];
|
||||
public menuTypes = [{id: 'regular', name: 'Regular'}, {id: 'compact', name: 'Compact'}, {id: 'mini', name: 'Mini'}];
|
||||
public themeModes = [{id: 'day', name: 'Day'}, {id: 'night', name: 'Night'}];
|
||||
public themeColors = ['purple-white', 'green', 'pink', 'blue'];
|
||||
public themeColors = ['purple', 'green', 'pink', 'blue'];
|
||||
public fontSizes = [{id: 1, name: 'Small', class: 'small-font'}, {id: 2, name: 'Regular', class: 'regular-font'}, {id: 3, name: 'Large', class: 'large-font'}];
|
||||
public selectedMenu = {id: 'vertical', name: 'Vertical'};
|
||||
public selectedMenuType = {id: 'regular', name: 'Regular'};
|
||||
@ -38,6 +38,7 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
||||
public showSettingOption = true;
|
||||
public appConfig: RTLConfiguration;
|
||||
public previousSettings: Settings;
|
||||
public previousDefaultNode = 0;
|
||||
|
||||
unsubs: Array<Subject<void>> = [new Subject(), new Subject()];
|
||||
@Output('done') done: EventEmitter<void> = new EventEmitter();
|
||||
@ -65,12 +66,12 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
||||
this.smallerCurrencyUnit = (undefined !== this.information && undefined !== this.information.smaller_currency_unit) ? this.information.smaller_currency_unit : 'Sats';
|
||||
this.currencyUnit = (undefined !== this.information && undefined !== this.information.currency_unit) ? this.information.currency_unit : 'BTC';
|
||||
this.previousSettings = JSON.parse(JSON.stringify(this.selNode.settings));
|
||||
this.previousDefaultNode = this.appConfig.defaultNodeIndex;
|
||||
this.logger.info(rtlStore);
|
||||
});
|
||||
}
|
||||
|
||||
onCurrencyChange(event: any) {
|
||||
console.warn(event);
|
||||
this.selNode.settings.currencyUnit = event.value;
|
||||
}
|
||||
|
||||
@ -85,8 +86,13 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
||||
|
||||
toggleSettings(toggleField: string, event?: any) {
|
||||
if (toggleField === 'satsToBTC') {
|
||||
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 (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;
|
||||
@ -111,9 +117,11 @@ export class AppSettingsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
onUpdateSettings() {
|
||||
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);
|
||||
this.store.dispatch(new RTLActions.OpenSpinner('Updating Settings...'));
|
||||
this.store.dispatch(new RTLActions.SaveSettings(this.selNode.settings));
|
||||
this.store.dispatch(new RTLActions.SaveSettings({settings: updatedSettings, defaultNodeIndex: defaultNodeIndex}));
|
||||
this.done.emit();
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<mat-divider class="pb-1"></mat-divider>
|
||||
<div fxLayoutAlign="center">
|
||||
<button mat-raised-button color="accent" fxFlex="20" type="button" fxLayoutAlign="center center" class="mr-2" (click)="onClose(false)" default>{{noBtnText}}</button>
|
||||
<button mat-stroked-button color="accent" fxFlex="20" type="button" fxLayoutAlign="center center" class="mr-2" (click)="onClose(false)" default>{{noBtnText}}</button>
|
||||
<button *ngIf="flgShowInput" mat-raised-button [color]="msgTypeForeground" fxLayoutAlign="center center" fxFlex="20" type="button" (click)="onClose(getInputs)" [disabled]="!getInputs[0].inputValue">{{yesBtnText}}</button>
|
||||
<button *ngIf="!flgShowInput" mat-raised-button [color]="msgTypeForeground" fxLayoutAlign="center center" fxFlex="20" type="button" (click)="onClose(true)">{{yesBtnText}}</button>
|
||||
</div>
|
||||
|
@ -20,6 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayoutAlign="end end" style="align-self: center;">
|
||||
<button mat-raised-button fxLayoutAlign="center center" class="horizontal-button-show" tabindex="20" type="click">Show Public Key</button>
|
||||
<button mat-stroked-button fxLayoutAlign="center center" color="accent" class="horizontal-button-show" tabindex="20" type="click">Show Public Key</button>
|
||||
<rtl-top-menu></rtl-top-menu>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</mat-radio-group>
|
||||
<div fxFlex="30" fxLayoutAlign="space-between stretch">
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="primary" (click)="onShowConfig()" tabindex="2">Show Config</button>
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-raised-button color="accent" tabindex="3" type="reset" class="ml-2" (click)="resetData()">Clear</button>
|
||||
<button fxFlex="50" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="3" type="reset" class="ml-2" (click)="resetData()">Clear</button>
|
||||
</div>
|
||||
</form>
|
||||
<div *ngIf="configData !== '' && fileFormat === 'JSON'">
|
||||
|
@ -14,7 +14,7 @@
|
||||
</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-raised-button color="accent" tabindex="3" type="reset"
|
||||
<button fxFlex="10" fxLayoutAlign="center center" mat-stroked-button color="accent" tabindex="3" type="reset"
|
||||
(click)="resetData()">Clear</button>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
@ -45,6 +45,7 @@ export class LightningNode {
|
||||
|
||||
export class RTLConfiguration {
|
||||
constructor(
|
||||
public defaultNodeIndex: number,
|
||||
public selectedNodeIndex: number,
|
||||
public sso: SSO,
|
||||
public nodes: LightningNode[]
|
||||
|
@ -1,3 +1,6 @@
|
||||
export const CURRENCY_UNITS = [ 'SATS', 'BTC' ];
|
||||
export const CURRENCY_UNITS_INVERSE = [ 'BTC', 'SATS' ];
|
||||
|
||||
export enum AuthenticateWith {
|
||||
TOKEN = 'TOKEN',
|
||||
PASSWORD = 'PASSWORD'
|
||||
|
@ -1,7 +1,5 @@
|
||||
@import './color-swatches/day-foreground.scss';
|
||||
@import './color-swatches/day-background.scss';
|
||||
@import './color-swatches/white-accent.swatch.scss';
|
||||
@import './color-swatches/blue-primary.swatch.scss';
|
||||
@import '~@angular/material/theming';
|
||||
@include mat-core();
|
||||
|
||||
@ -20,11 +18,5 @@ $blue-primary: mat-palette($mat-indigo, 800, 300, 900);
|
||||
$blue-accent: mat-palette($mat-pink, A200, A100, A400);
|
||||
$blue-warn: mat-palette($mat-red, 500);
|
||||
|
||||
$alternate-blue-primary: mat-palette($blue-primary, 500, 300, 900);
|
||||
$alternate-blue-accent: mat-palette($white-accent, 800, 600, 900);
|
||||
$alternate-blue-warn: mat-palette($mat-red);
|
||||
|
||||
$blue-day-theme: create-custom-theme($blue-primary, $blue-accent, $blue-warn);
|
||||
$alternate-blue-day-theme: mat-light-theme($alternate-blue-primary, $alternate-blue-accent, $alternate-blue-warn);
|
||||
$blue-night-theme: mat-dark-theme($blue-primary, $blue-accent, $blue-warn);
|
||||
$alternate-blue-night-theme: mat-dark-theme($alternate-blue-primary, $alternate-blue-accent, $alternate-blue-warn);
|
||||
|
@ -1,32 +0,0 @@
|
||||
$blue-primary: (
|
||||
50 : #e4e5e6,
|
||||
100 : #bdbfc1,
|
||||
200 : #919498,
|
||||
300 : #64696f,
|
||||
400 : #434850,
|
||||
500 : #222831,
|
||||
600 : #1e242c,
|
||||
700 : #191e25,
|
||||
800 : #14181f,
|
||||
900 : #0c0f13,
|
||||
A100 : #589bff,
|
||||
A200 : #257cff,
|
||||
A400 : #0060f1,
|
||||
A700 : #0056d7,
|
||||
contrast: (
|
||||
50 : #000000,
|
||||
100 : #000000,
|
||||
200 : #000000,
|
||||
300 : #ffffff,
|
||||
400 : #ffffff,
|
||||
500 : #ffffff,
|
||||
600 : #ffffff,
|
||||
700 : #ffffff,
|
||||
800 : #ffffff,
|
||||
900 : #ffffff,
|
||||
A100 : #000000,
|
||||
A200 : #ffffff,
|
||||
A400 : #ffffff,
|
||||
A700 : #ffffff,
|
||||
)
|
||||
);
|
@ -1,36 +1,3 @@
|
||||
// $purple-primary: (
|
||||
// 50 : #ebe6ed,
|
||||
// 100 : #cdc1d3,
|
||||
// 200 : #ac98b5,
|
||||
// 300 : #8b6f97,
|
||||
// 400 : #725081,
|
||||
// 500 : #59316b,
|
||||
// 600 : #512c63,
|
||||
// 700 : #482558,
|
||||
// 800 : #3e1f4e,
|
||||
// 900 : #442553, // #2e133c,
|
||||
// A100 : #cd7aff,
|
||||
// A200 : #ba47ff,
|
||||
// A400 : #a814ff,
|
||||
// A700 : #9d00f9, // #222831,
|
||||
// contrast: (
|
||||
// 50 : #000000,
|
||||
// 100 : #000000,
|
||||
// 200 : #000000,
|
||||
// 300 : #ffffff,
|
||||
// 400 : #ffffff,
|
||||
// 500 : #ffffff,
|
||||
// 600 : #ffffff,
|
||||
// 700 : #ffffff,
|
||||
// 800 : #ffffff,
|
||||
// 900 : #ffffff,
|
||||
// A100 : #000000,
|
||||
// A200 : #ffffff,
|
||||
// A400 : #ffffff,
|
||||
// A700 : #ffffff,
|
||||
// )
|
||||
// );
|
||||
|
||||
$purple-primary: (
|
||||
50 : #eceaf4,
|
||||
100 : #cfcae4,
|
||||
|
@ -1,32 +0,0 @@
|
||||
$white-accent: (
|
||||
50 : #ffffff,
|
||||
100 : #ffffff,
|
||||
200 : #ffffff,
|
||||
300 : #ffffff,
|
||||
400 : #ffffff,
|
||||
500 : #ffffff,
|
||||
600 : #ffffff,
|
||||
700 : #ffffff,
|
||||
800 : #ffffff,
|
||||
900 : #ffffff,
|
||||
A100 : #ffffff,
|
||||
A200 : #ffffff,
|
||||
A400 : #ffffff,
|
||||
A700 : #ffffff,
|
||||
contrast: (
|
||||
50 : #ebe6ed,
|
||||
100 : #cdc1d3,
|
||||
200 : #ac98b5,
|
||||
300 : #8b6f97,
|
||||
400 : #725081,
|
||||
500 : #59316b,
|
||||
600 : #512c63,
|
||||
700 : #482558,
|
||||
800 : #3e1f4e,
|
||||
900 : #2e133c,
|
||||
A100 : #cd7aff,
|
||||
A200 : #ba47ff,
|
||||
A400 : #a814ff,
|
||||
A700 : #9d00f9,
|
||||
)
|
||||
);
|
@ -1,7 +1,5 @@
|
||||
@import './color-swatches/day-foreground.scss';
|
||||
@import './color-swatches/day-background.scss';
|
||||
@import './color-swatches/white-accent.swatch.scss';
|
||||
@import './color-swatches/blue-primary.swatch.scss';
|
||||
@import '~@angular/material/theming';
|
||||
@include mat-core();
|
||||
|
||||
@ -20,12 +18,5 @@ $green-primary: mat-palette($mat-teal, 800, 300, 900);
|
||||
$green-accent: mat-palette($mat-amber, A200, A100, A700);
|
||||
$green-warn: mat-palette($mat-red, A200);
|
||||
|
||||
$alternate-green-primary: mat-palette($blue-primary, 500, 300, 900);
|
||||
$alternate-green-accent: mat-palette($white-accent, 800, 600, 900);
|
||||
$alternate-green-warn: mat-palette($mat-red);
|
||||
|
||||
$green-day-theme: create-custom-theme($green-primary, $green-accent, $green-warn);
|
||||
$alternate-green-day-theme: mat-light-theme($alternate-green-primary, $alternate-green-accent, $alternate-green-warn);
|
||||
|
||||
$green-night-theme: mat-dark-theme($green-primary, $green-accent, $green-warn);
|
||||
$alternate-green-night-theme: mat-dark-theme($alternate-green-primary, $alternate-green-accent, $alternate-green-warn);
|
||||
|
@ -1,5 +1,3 @@
|
||||
@import './color-swatches/white-accent.swatch.scss';
|
||||
@import './color-swatches/blue-primary.swatch.scss';
|
||||
@import '~@angular/material/theming';
|
||||
@include mat-core();
|
||||
|
||||
@ -7,11 +5,5 @@ $pink-primary: mat-palette($mat-pink, 700, 400, 900);
|
||||
$pink-accent: mat-palette($mat-blue-grey, 700, 500, 900);
|
||||
$pink-warn: mat-palette($mat-red, A200);
|
||||
|
||||
$alternate-pink-primary: mat-palette($blue-primary, 500, 300, 900);
|
||||
$alternate-pink-accent: mat-palette($white-accent, 800, 600, 900);
|
||||
$alternate-pink-warn: mat-palette($mat-red);
|
||||
|
||||
$pink-day-theme: mat-light-theme($pink-primary, $pink-accent, $pink-warn);
|
||||
$alternate-pink-day-theme: mat-light-theme($alternate-pink-primary, $alternate-pink-accent, $alternate-pink-warn);
|
||||
$pink-night-theme: mat-dark-theme($pink-primary, $pink-accent, $pink-warn);
|
||||
$alternate-pink-night-theme: mat-dark-theme($alternate-pink-primary, $alternate-pink-accent, $alternate-pink-warn);
|
||||
|
@ -1,18 +0,0 @@
|
||||
@import './color-swatches/purple-primary.swatch.scss';
|
||||
@import './color-swatches/white-accent.swatch.scss';
|
||||
@import './color-swatches/blue-primary.swatch.scss';
|
||||
@import '~@angular/material/theming';
|
||||
@include mat-core();
|
||||
|
||||
$purple-white-primary: mat-palette($purple-primary, 500, 400, 700);
|
||||
$purple-white-accent: mat-palette($white-accent, 800, 600, 900);
|
||||
$purple-white-warn: mat-palette($mat-red);
|
||||
|
||||
$alternate-purple-white-primary: mat-palette($blue-primary, 500, 300, 900);
|
||||
$alternate-purple-white-accent: mat-palette($white-accent, 800, 600, 900);
|
||||
$alternate-purple-white-warn: mat-palette($mat-red);
|
||||
|
||||
$purple-white-day-theme: mat-light-theme($purple-white-primary, $purple-white-accent, $purple-white-warn);
|
||||
$alternate-purple-white-day-theme: mat-light-theme($alternate-purple-white-primary, $alternate-purple-white-accent, $alternate-purple-white-warn);
|
||||
$purple-white-night-theme: mat-dark-theme($purple-white-primary, $purple-white-accent, $purple-white-warn);
|
||||
$alternate-purple-white-night-theme: mat-dark-theme($alternate-purple-white-primary, $alternate-purple-white-accent, $alternate-purple-white-warn);
|
10
src/app/shared/theme/skins/purple.scss
Normal file
10
src/app/shared/theme/skins/purple.scss
Normal file
@ -0,0 +1,10 @@
|
||||
@import './color-swatches/purple-primary.swatch.scss';
|
||||
@import '~@angular/material/theming';
|
||||
@include mat-core();
|
||||
|
||||
$purple-primary: mat-palette($purple-primary, 500, 400, 700);
|
||||
$purple-accent: mat-palette($mat-gray, 800, 600, 900);
|
||||
$purple-warn: mat-palette($mat-red);
|
||||
|
||||
$purple-day-theme: mat-light-theme($purple-primary, $purple-accent, $purple-warn);
|
||||
$purple-night-theme: mat-dark-theme($purple-primary, $purple-accent, $purple-warn);
|
@ -1,6 +1,6 @@
|
||||
@import "constants";
|
||||
|
||||
@mixin change-theme($theme, $alternate-theme) {
|
||||
@mixin change-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$primary-color: mat-color($primary);
|
||||
$primary-lighter: mat-color($primary, lighter);
|
||||
@ -16,7 +16,6 @@
|
||||
$foreground-divider: mat-color($foreground, divider);
|
||||
$background: map-get($theme, background);
|
||||
$hover-background: rgba(0, 0, 0, 0.04);
|
||||
$alternate-primary: map-get($alternate-theme, primary);
|
||||
|
||||
.bg-primary {
|
||||
@include _mat-toolbar-color($primary);
|
||||
@ -37,23 +36,12 @@
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.bg-alternate-primary {
|
||||
@include _mat-toolbar-color($alternate-primary);
|
||||
}
|
||||
|
||||
.toolbar-dropdown-menu {
|
||||
@include _mat-toolbar-color($alternate-primary);
|
||||
}
|
||||
|
||||
&.night {
|
||||
.selected-color {
|
||||
border-color: $primary-lighter;
|
||||
}
|
||||
}
|
||||
&.day {
|
||||
.mat-stroked-button.mat-accent {
|
||||
color: $foreground-text;
|
||||
}
|
||||
.ng-fa-icon, .mat-nested-tree-node-parent .mat-icon {
|
||||
color: $foreground-secondary-text;
|
||||
}
|
||||
@ -68,144 +56,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.small-font {
|
||||
.mr-4 {
|
||||
margin-right: 1rem !important;
|
||||
}
|
||||
.mat-menu-item, .mat-tree .mat-tree-node, .mat-tree .mat-nested-tree-node-parent {
|
||||
min-height: $tree-node-height * 0.7;
|
||||
height: $tree-node-height * 0.7;
|
||||
}
|
||||
.mat-primary .mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple),
|
||||
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
|
||||
font-size: 1.2rem * 1.1;
|
||||
}
|
||||
.validation-error-icon {
|
||||
font-size: 1.2rem * 1.2;
|
||||
}
|
||||
.genseed-message {
|
||||
font-size: 1.2rem * 1.2;
|
||||
}
|
||||
.insecure-message {
|
||||
font-size: 1.2rem * 1.2;
|
||||
}
|
||||
.page-title-container, .page-sub-title-container {
|
||||
font-size: 1.2rem * 1.1;
|
||||
& .page-title-img {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: 1.6rem * 1.1;
|
||||
}
|
||||
}
|
||||
.fa-icon-small, .top-icon-small {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
.mat-icon-button .top-toolbar-icon.icon-pinned {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.horizontal-button .sidenav-img svg {
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
}
|
||||
&.regular-font {
|
||||
.inner-sidenav-content {
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
.mat-tree .mat-tree-node, .mat-tree .mat-nested-tree-node-parent {
|
||||
height: $tree-node-height;
|
||||
}
|
||||
.mat-primary .mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple),
|
||||
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
|
||||
font-size: 1.4rem * 1.1;
|
||||
}
|
||||
.validation-error-icon {
|
||||
font-size: 1.4rem * 1.2;
|
||||
}
|
||||
.genseed-message {
|
||||
font-size: 1.4rem * 1.2;
|
||||
}
|
||||
.insecure-message {
|
||||
font-size: 1.4rem * 1.2;
|
||||
}
|
||||
.page-title-container, .page-sub-title-container {
|
||||
font-size: 1.4rem * 1.1;
|
||||
& .page-title-img {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: 1.6rem * 1.1;
|
||||
}
|
||||
}
|
||||
.mat-button .mat-icon-button .top-toolbar-icon.icon-pinned {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
.fa-icon-small, .top-icon-small {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
.top-toolbar-icon.icon-pinned {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
.horizontal-button .sidenav-img svg {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
&.large-font {
|
||||
.mat-tree .mat-tree-node, .mat-tree .mat-nested-tree-node-parent {
|
||||
height: $tree-node-height;
|
||||
}
|
||||
.mat-primary .mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple),
|
||||
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
|
||||
font-size: 1.6rem * 1.1;
|
||||
}
|
||||
.validation-error-icon {
|
||||
font-size: 1.6rem * 1.2;
|
||||
}
|
||||
.genseed-message {
|
||||
font-size: 1.6rem * 1.2;
|
||||
}
|
||||
.insecure-message {
|
||||
font-size: 1.6rem * 1.2;
|
||||
}
|
||||
.page-title-container, .page-sub-title-container {
|
||||
margin-top: 0.5rem;
|
||||
font-size: 1.6rem * 1.1;
|
||||
& .page-title-img {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
font-size: 2.5rem * 1.1;
|
||||
}
|
||||
}
|
||||
.fa-icon-small, .top-icon-small {
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
.top-toolbar-icon.icon-pinned {
|
||||
font-size: 2rem;
|
||||
}
|
||||
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
font-size: 2rem;
|
||||
}
|
||||
.horizontal-button .sidenav-img svg {
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
font-size: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.foreground.mat-progress-spinner circle, .foreground.mat-spinner circle {
|
||||
stroke: $foreground-text;
|
||||
}
|
||||
@ -242,12 +92,17 @@
|
||||
}
|
||||
|
||||
.mat-tree-node .sidenav-img, .mat-nested-tree-node .sidenav-img, .mat-nested-tree-node-parent .sidenav-img,
|
||||
.page-title-container .page-title-img, .horizontal-button .sidenav-img svg, svg.top-icon-small {
|
||||
.page-title-container .page-title-img, svg.top-icon-small {
|
||||
fill: $foreground-text;
|
||||
}
|
||||
|
||||
.horizontal-button .fa-icon-small {
|
||||
fill: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.h-active-link {
|
||||
border-bottom: 2px solid $accent-color;
|
||||
border-bottom: 2px solid white;
|
||||
}
|
||||
|
||||
.ngx-charts {
|
||||
@ -319,19 +174,18 @@
|
||||
}
|
||||
|
||||
.horizontal-button-show {
|
||||
color: $accent-color;
|
||||
background: $primary-lighter;
|
||||
background: white;
|
||||
border-radius: 12rem;
|
||||
&:hover {
|
||||
background: $accent-color;
|
||||
color: $primary-darker;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-tab-label.mat-tab-label-active {
|
||||
color: $primary-darker;
|
||||
}
|
||||
|
||||
.mat-stroked-button.mat-accent:hover {
|
||||
color: $primary-darker;
|
||||
}
|
||||
|
||||
.cc-data-block {
|
||||
margin-right: 3.2rem;
|
||||
& .cc-data-title {
|
||||
|
@ -31,6 +31,50 @@ body {
|
||||
padding-left: 4rem;
|
||||
}
|
||||
&.small-font {
|
||||
.mr-4 {
|
||||
margin-right: 1rem !important;
|
||||
}
|
||||
.mat-menu-item, .mat-tree .mat-tree-node, .mat-tree .mat-nested-tree-node-parent {
|
||||
min-height: $tree-node-height * 0.7;
|
||||
height: $tree-node-height * 0.7;
|
||||
}
|
||||
.mat-primary .mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple),
|
||||
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
|
||||
font-size: $small-font-size * 1.1;
|
||||
}
|
||||
.validation-error-icon {
|
||||
font-size: $small-font-size * 1.2;
|
||||
}
|
||||
.genseed-message {
|
||||
font-size: $small-font-size * 1.2;
|
||||
}
|
||||
.insecure-message {
|
||||
font-size: $small-font-size * 1.2;
|
||||
}
|
||||
.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;
|
||||
font-size: $small-font-size * 1.5;
|
||||
}
|
||||
}
|
||||
.fa-icon-small, .top-icon-small {
|
||||
font-size: $small-font-size * 1.2;
|
||||
}
|
||||
.mat-icon-button .top-toolbar-icon.icon-pinned {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
|
||||
width: $small-font-size * 1.8;
|
||||
height: $small-font-size * 1.8;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.horizontal-button .sidenav-img svg {
|
||||
width: $small-font-size * 2.1;
|
||||
height: $small-font-size * 2.1;
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
.material-icons {
|
||||
font-size: $small-font-size * 1.5;
|
||||
line-height: 2rem;
|
||||
@ -64,6 +108,52 @@ body {
|
||||
}
|
||||
}
|
||||
&.regular-font {
|
||||
.inner-sidenav-content {
|
||||
padding-top: $regular-font-size;
|
||||
}
|
||||
.mat-tree .mat-tree-node, .mat-tree .mat-nested-tree-node-parent {
|
||||
height: $tree-node-height;
|
||||
}
|
||||
.mat-primary .mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple),
|
||||
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
|
||||
font-size: $regular-font-size * 1.1;
|
||||
}
|
||||
.validation-error-icon {
|
||||
font-size: $regular-font-size * 1.2;
|
||||
}
|
||||
.genseed-message {
|
||||
font-size: $regular-font-size * 1.2;
|
||||
}
|
||||
.insecure-message {
|
||||
font-size: $regular-font-size * 1.2;
|
||||
}
|
||||
.page-title-container, .page-sub-title-container {
|
||||
font-size: $regular-font-size * 1.1;
|
||||
& .page-title-img {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: $regular-font-size * 1.3;
|
||||
}
|
||||
}
|
||||
.mat-button .mat-icon-button .top-toolbar-icon.icon-pinned {
|
||||
font-size: $regular-font-size;
|
||||
}
|
||||
.fa-icon-small, .top-icon-small {
|
||||
font-size: $regular-font-size * 1.5;
|
||||
}
|
||||
.top-toolbar-icon.icon-pinned {
|
||||
font-size: $regular-font-size * 1.3;
|
||||
}
|
||||
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
|
||||
width: $regular-font-size * 1.8;
|
||||
height: $regular-font-size * 1.8;
|
||||
font-size: $regular-font-size * 1.3;
|
||||
}
|
||||
.horizontal-button .sidenav-img svg {
|
||||
width: $regular-font-size * 2.2;
|
||||
height: $regular-font-size * 2.2;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
.material-icons {
|
||||
font-size: $regular-font-size * 2;
|
||||
}
|
||||
@ -96,6 +186,47 @@ body {
|
||||
}
|
||||
}
|
||||
&.large-font {
|
||||
.mat-tree .mat-tree-node, .mat-tree .mat-nested-tree-node-parent {
|
||||
height: $tree-node-height;
|
||||
}
|
||||
.mat-primary .mat-select-panel .mat-option.mat-selected:not(.mat-option-multiple),
|
||||
.mat-primary .mat-option.mat-selected:not(.mat-option-multiple):not(.mat-option-disabled) {
|
||||
font-size: $large-font-size * 1.1;
|
||||
}
|
||||
.validation-error-icon {
|
||||
font-size: $large-font-size * 1.2;
|
||||
}
|
||||
.genseed-message {
|
||||
font-size: $large-font-size * 1.2;
|
||||
}
|
||||
.insecure-message {
|
||||
font-size: $large-font-size * 1.2;
|
||||
}
|
||||
.page-title-container, .page-sub-title-container {
|
||||
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;
|
||||
}
|
||||
}
|
||||
.fa-icon-small, .top-icon-small {
|
||||
font-size: $large-font-size * 1.4;
|
||||
}
|
||||
.top-toolbar-icon.icon-pinned {
|
||||
font-size: $large-font-size * 1.25;
|
||||
}
|
||||
.top-toolbar-icon .top-toolbar-img, .sidenav-img svg {
|
||||
width: $large-font-size * 2;
|
||||
height: $large-font-size * 2;
|
||||
font-size: $large-font-size * 1.25;
|
||||
}
|
||||
.horizontal-button .sidenav-img svg {
|
||||
width: $large-font-size * 2.25;
|
||||
height: $large-font-size * 2.25;
|
||||
font-size: $large-font-size * 2;
|
||||
}
|
||||
.material-icons {
|
||||
font-size: $large-font-size * 2.5;
|
||||
}
|
||||
@ -601,7 +732,7 @@ body {
|
||||
height: 3.75rem;
|
||||
border: 0.25rem solid;
|
||||
}
|
||||
&.purple-white{
|
||||
&.purple{
|
||||
background-color: #5e4ea5;
|
||||
}
|
||||
&.blue{
|
||||
@ -777,7 +908,7 @@ a {
|
||||
.top-toolbar-icon.icon-pinned {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
padding: 0.4rem 0 0 1.5rem;
|
||||
padding: 1rem 0 0 1.2rem;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
|
@ -4,18 +4,18 @@
|
||||
@import 'typography';
|
||||
|
||||
.rtl-container{
|
||||
&.purple-white {
|
||||
@import "../skins/purple-white";
|
||||
&.purple {
|
||||
@import "../skins/purple";
|
||||
&.small-font {@include mat-core($small-typography);}
|
||||
&.regular-font {@include mat-core($regular-typography);}
|
||||
&.large-font {@include mat-core($large-typography);}
|
||||
&.day {
|
||||
@include angular-material-theme($purple-white-day-theme);
|
||||
@include change-theme($purple-white-day-theme, $alternate-purple-white-day-theme);
|
||||
@include angular-material-theme($purple-day-theme);
|
||||
@include change-theme($purple-day-theme);
|
||||
}
|
||||
&.night {
|
||||
@include angular-material-theme($purple-white-night-theme);
|
||||
@include change-theme($purple-white-night-theme, $alternate-purple-white-night-theme);
|
||||
@include angular-material-theme($purple-night-theme);
|
||||
@include change-theme($purple-night-theme);
|
||||
}
|
||||
}
|
||||
&.blue{
|
||||
@ -25,11 +25,11 @@
|
||||
&.large-font {@include mat-core($large-typography);}
|
||||
&.day {
|
||||
@include angular-material-theme($blue-day-theme);
|
||||
@include change-theme($blue-day-theme, $alternate-blue-day-theme);
|
||||
@include change-theme($blue-day-theme);
|
||||
}
|
||||
&.night {
|
||||
@include angular-material-theme($blue-night-theme);
|
||||
@include change-theme($blue-night-theme, $alternate-blue-night-theme);
|
||||
@include change-theme($blue-night-theme);
|
||||
}
|
||||
}
|
||||
&.green{
|
||||
@ -39,11 +39,11 @@
|
||||
&.large-font {@include mat-core($large-typography);}
|
||||
&.day {
|
||||
@include angular-material-theme($green-day-theme);
|
||||
@include change-theme($green-day-theme, $alternate-green-day-theme);
|
||||
@include change-theme($green-day-theme);
|
||||
}
|
||||
&.night {
|
||||
@include angular-material-theme($green-night-theme);
|
||||
@include change-theme($green-night-theme, $alternate-green-night-theme);
|
||||
@include change-theme($green-night-theme);
|
||||
}
|
||||
}
|
||||
&.pink{
|
||||
@ -53,11 +53,11 @@
|
||||
&.large-font {@include mat-core($large-typography);}
|
||||
&.day {
|
||||
@include angular-material-theme($pink-day-theme);
|
||||
@include change-theme($pink-day-theme, $alternate-pink-day-theme);
|
||||
@include change-theme($pink-day-theme);
|
||||
}
|
||||
&.night {
|
||||
@include angular-material-theme($pink-night-theme);
|
||||
@include change-theme($pink-night-theme, $alternate-pink-night-theme);
|
||||
@include change-theme($pink-night-theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ export class SetRTLConfig implements Action {
|
||||
|
||||
export class SaveSettings implements Action {
|
||||
readonly type = SAVE_SETTINGS;
|
||||
constructor(public payload: Settings) {}
|
||||
constructor(public payload: {settings: Settings, defaultNodeIndex?: number}) {}
|
||||
}
|
||||
|
||||
export class SetSelelectedNode implements Action {
|
||||
|
@ -3,16 +3,16 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { Router } from '@angular/router';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Actions, Effect, ofType } from '@ngrx/effects';
|
||||
import { of, Subject } from 'rxjs';
|
||||
import { of, Subject, forkJoin, Observable } from 'rxjs';
|
||||
import { map, mergeMap, catchError, take, withLatestFrom } from 'rxjs/operators';
|
||||
|
||||
import { MatDialog } from '@angular/material';
|
||||
|
||||
import { environment, API_URL, CURRENCY_UNITS } from '../../environments/environment';
|
||||
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 } from '../shared/models/enums';
|
||||
import { AuthenticateWith, CURRENCY_UNITS, CURRENCY_UNITS_INVERSE } from '../shared/models/enums';
|
||||
|
||||
import { SpinnerDialogComponent } from '../shared/components/spinner-dialog/spinner-dialog.component';
|
||||
import { AlertMessageComponent } from '../shared/components/alert-message/alert-message.component';
|
||||
@ -113,19 +113,27 @@ export class RTLEffects implements OnDestroy {
|
||||
ofType(RTLActions.SAVE_SETTINGS),
|
||||
mergeMap((action: RTLActions.SaveSettings) => {
|
||||
this.store.dispatch(new RTLActions.ClearEffectErrorRoot('UpdateSettings'));
|
||||
return this.httpClient.post<Settings>(environment.CONF_API, { updatedSettings: action.payload });
|
||||
if(action.payload.settings && action.payload.defaultNodeIndex) {
|
||||
let settingsRes = this.httpClient.post<Settings>(environment.CONF_API, { updatedSettings: action.payload.settings });
|
||||
let defaultNodeRes = this.httpClient.post(environment.CONF_API + '/updateDefaultNode', { defaultNodeIndex: action.payload.defaultNodeIndex });
|
||||
return forkJoin([settingsRes, defaultNodeRes]);
|
||||
} else if(action.payload.settings && !action.payload.defaultNodeIndex) {
|
||||
return this.httpClient.post<Settings>(environment.CONF_API, { updatedSettings: action.payload.settings });
|
||||
} else if(!action.payload.settings && action.payload.defaultNodeIndex) {
|
||||
return this.httpClient.post(environment.CONF_API + '/updateDefaultNode', { defaultNodeIndex: action.payload.defaultNodeIndex });
|
||||
}
|
||||
}),
|
||||
map((updateStatus: any) => {
|
||||
this.store.dispatch(new RTLActions.CloseSpinner());
|
||||
this.logger.info(updateStatus);
|
||||
return {
|
||||
type: RTLActions.OPEN_ALERT,
|
||||
payload: { data: { type: 'SUCCESS', titleMessage: updateStatus.message } }
|
||||
payload: { data: { type: 'SUCCESS', titleMessage: (!updateStatus.length) ? updateStatus.message : updateStatus[0].message + '. ' + updateStatus[1].message } }
|
||||
};
|
||||
},
|
||||
catchError((err) => {
|
||||
this.store.dispatch(new RTLActions.EffectErrorRoot({ action: 'UpdateSettings', code: err.status, message: err.error.error }));
|
||||
this.handleErrorWithAlert('ERROR', 'Update Settings Failed!', environment.CONF_API, err);
|
||||
this.store.dispatch(new RTLActions.EffectErrorRoot({ action: 'UpdateSettings', code: (!err.length) ? err.status : err[0].status, message: (!err.length) ? err.error.error : err[0].error.error }));
|
||||
this.handleErrorWithAlert('ERROR', 'Update Settings Failed!', environment.CONF_API, (!err.length) ? err : err[0]);
|
||||
return of({type: RTLActions.VOID});
|
||||
})
|
||||
));
|
||||
@ -247,8 +255,9 @@ export class RTLEffects implements OnDestroy {
|
||||
return of();
|
||||
}));
|
||||
|
||||
@Effect()
|
||||
setSelectedNode = this.actions$.pipe(
|
||||
|
||||
@Effect()
|
||||
setSelectedNode = this.actions$.pipe(
|
||||
ofType(RTLActions.SET_SELECTED_NODE),
|
||||
mergeMap((action: RTLActions.SetSelelectedNode) => {
|
||||
this.store.dispatch(new RTLActions.ClearEffectErrorRoot('UpdateSelNode'));
|
||||
@ -271,7 +280,12 @@ export class RTLEffects implements OnDestroy {
|
||||
|
||||
initializeNode(node: any, isInitialSetup: boolean) {
|
||||
const landingPage = isInitialSetup ? '' : 'HOME';
|
||||
let selNode = { channelBackupPath: node.settings.channelBackupPath, satsToBTC: node.settings.satsToBTC, currencyUnits: [...CURRENCY_UNITS, node.settings.currencyUnit] };
|
||||
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));
|
||||
|
@ -20,6 +20,7 @@ const initRootState: RootState = {
|
||||
effectErrorsRoot: [],
|
||||
selNode: {settings: initNodeSettings, authentication: initNodeAuthentication},
|
||||
appConfig: {
|
||||
defaultNodeIndex: -1,
|
||||
selectedNodeIndex: -1,
|
||||
sso: { rtlSSO: 0, logoutRedirectLink: '/login' },
|
||||
nodes: [{ settings: initNodeSettings, authentication: initNodeAuthentication}]
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { VERSION } from './version';
|
||||
|
||||
export const CURRENCY_UNITS = [ 'SATS', 'BTC' ];
|
||||
export const API_URL = './api';
|
||||
|
||||
export const environment = {
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { VERSION } from './version';
|
||||
|
||||
export const CURRENCY_UNITS = [ 'SATS', 'BTC' ];
|
||||
|
||||
export const API_URL = 'http://localhost:3000/rtl/api';
|
||||
|
||||
export const environment = {
|
||||
|
Loading…
Reference in New Issue
Block a user