mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
Newly added Invoice/payment/peers will be on top, merged channel dashboard with home, Added accordion for pending channels, Removed stickiness from topbar, changed modal buttons text, other minor UX updates
This commit is contained in:
parent
43ef011ecb
commit
55f66dd69c
@ -468,12 +468,12 @@ MIT
|
||||
|
||||
@angular/material/select
|
||||
|
||||
@angular/material/expansion
|
||||
|
||||
@angular/material/tree
|
||||
|
||||
@angular/material/radio
|
||||
|
||||
@angular/material/expansion
|
||||
|
||||
@angular/material/sidenav
|
||||
|
||||
@angular/material/toolbar
|
||||
|
@ -5,8 +5,8 @@
|
||||
<title>RTL</title>
|
||||
<base href="/rtl/"> <meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico">
|
||||
<link rel="stylesheet" href="styles.9aca8d6b42ca1c4e593e.css"></head>
|
||||
<link rel="stylesheet" href="styles.5e0b52f71274005aea8e.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.805afbeaa1a119f3f6be.js"></script></body>
|
||||
<script type="text/javascript" src="runtime.ec2944dd8b20ec099bf3.js"></script><script type="text/javascript" src="polyfills.418928a701f2040ada02.js"></script><script type="text/javascript" src="main.a260eb3ea37c9cf9911a.js"></script></body>
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
1
angular/main.a260eb3ea37c9cf9911a.js
Normal file
1
angular/main.a260eb3ea37c9cf9911a.js
Normal file
File diff suppressed because one or more lines are too long
1
angular/styles.5e0b52f71274005aea8e.css
Normal file
1
angular/styles.5e0b52f71274005aea8e.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
@ -27,4 +27,13 @@ common.sortDescByKey = (array, key) => {
|
||||
});
|
||||
}
|
||||
|
||||
common.newestOnTop = (array, key, value) => {
|
||||
var index = array.findIndex(function(item){
|
||||
return item[key] === value
|
||||
});
|
||||
var newlyAddedRecord = array.splice(index, 1);
|
||||
array.unshift(newlyAddedRecord[0]);
|
||||
return array;
|
||||
}
|
||||
|
||||
module.exports = common;
|
||||
|
@ -74,7 +74,7 @@ var validateConfigFile = (macaroonPath, config) => {
|
||||
common.enable_logging = config.Authentication.enableLogging;
|
||||
let exists = fs.existsSync(log_file_path);
|
||||
if(exists) {
|
||||
fs.writeFile(log_file_path, '');
|
||||
fs.writeFile(log_file_path, '', () => {});
|
||||
} else if (!exists && config.Authentication.enableLogging) {
|
||||
try {
|
||||
var createStream = fs.createWriteStream(log_file_path);
|
||||
|
@ -64,8 +64,13 @@ exports.postPeer = (req, res, next) => {
|
||||
return getAliasForPeers(peer);
|
||||
}))
|
||||
.then(function(values) {
|
||||
logger.info('\r\nPeers: 63: ' + JSON.stringify(Date.now()) + ': INFO: Peer Added Successfully');
|
||||
logger.info('\r\nPeers: 64: ' + JSON.stringify(Date.now()) + ': INFO: Peer with Alias: ' + JSON.stringify(body));
|
||||
if (undefined !== body.peers) {
|
||||
body.peers = common.sortDescByKey(body.peers, 'alias');
|
||||
logger.info('\r\nPeers: 69: ' + JSON.stringify(Date.now()) + ': INFO: Peer with Alias: ' + JSON.stringify(body));
|
||||
body.peers = common.newestOnTop(body.peers, 'pub_key', req.body.pubkey);
|
||||
logger.info('\r\nPeers: 71: ' + JSON.stringify(Date.now()) + ': INFO: Peer with Newest On Top: ' + JSON.stringify(body));
|
||||
}
|
||||
logger.info('\r\nPeers: 73: ' + JSON.stringify(Date.now()) + ': INFO: Peer Added Successfully');
|
||||
res.status(201).json(body.peers);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -1,35 +1,34 @@
|
||||
var request = require('request-promise');
|
||||
var request = require('request');
|
||||
var options = require("../connect");
|
||||
var common = require('../common');
|
||||
var logger = require('./logger');
|
||||
|
||||
exports.operateWallet = (req, res, next) => {
|
||||
var requestBody = {
|
||||
var requestBody = {
|
||||
wallet_password: Buffer.from(req.body.wallet_password).toString('base64')
|
||||
};
|
||||
if (undefined === req.params.operation || req.params.operation === 'unlock') {
|
||||
options.url = common.lnd_server_url + '/unlockwallet';
|
||||
options.form = JSON.stringify(requestBody);
|
||||
err_message = 'Unlocking wallet failed! Verify that lnd is running!';
|
||||
err_message = 'Unlocking wallet failed! Verify that lnd is running and the wallet is locked!';
|
||||
} else {
|
||||
options.url = common.lnd_server_url + '/initwallet';
|
||||
options.form = JSON.stringify(requestBody);
|
||||
err_message = 'Initializing wallet failed!';
|
||||
}
|
||||
options.qs = req.query;
|
||||
request.post(options).then((body) => {
|
||||
request.post(options, (error, response, body) => {
|
||||
logger.info('\r\nWallet: 20: ' + JSON.stringify(Date.now()) + ': INFO: Unlock Wallet Response: ' + JSON.stringify(body));
|
||||
const body_str = (undefined === body) ? '' : JSON.stringify(body);
|
||||
const search_idx = (undefined === body) ? -1 : body_str.search('Not Found');
|
||||
if(undefined === body) {
|
||||
res.status(500).json({
|
||||
message: err_message,
|
||||
error: 'Unlocking wallet failed! Verify that lnd is running!'
|
||||
error: err_message
|
||||
});
|
||||
} else if(search_idx > -1) {
|
||||
res.status(500).json({
|
||||
message: err_message,
|
||||
error: 'Unlocking wallet failed! Verify that lnd is running!'
|
||||
error: err_message
|
||||
});
|
||||
} else if(body.error) {
|
||||
if((body.code === 1 && body.error === 'context canceled') || (body.code === 14 && body.error === 'transport is closing')) {
|
||||
@ -43,15 +42,5 @@ exports.operateWallet = (req, res, next) => {
|
||||
} else {
|
||||
res.status(201).json({wallet: 'successful'});
|
||||
}
|
||||
})
|
||||
.catch(function (err) {
|
||||
if((err.error.code === 1 && err.error.error === 'context canceled') || (err.error.code === 14 && err.error.error === 'transport is closing')) {
|
||||
res.status(201).json({wallet: 'successful'});
|
||||
} else {
|
||||
res.status(500).json({
|
||||
message: err_message,
|
||||
error: err.error.error
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rtl",
|
||||
"version": "0.1.13-alpha",
|
||||
"version": "0.1.14-alpha",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rtl",
|
||||
"version": "0.1.13-alpha",
|
||||
"version": "0.1.14-alpha",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
|
Loading…
Reference in New Issue
Block a user