Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Explorer redesign - Closes #796 #813 #816 #820 #825 #741 #847

Merged
merged 62 commits into from
Dec 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b640220
Copy less-more service to create pagination service
lsilvs Sep 13, 2018
1757eb6
Implement load next/load prev
lsilvs Sep 13, 2018
c42e8ad
Improve pagination
lsilvs Sep 13, 2018
0233160
Remove count param as Explorer API does not provide it
lsilvs Sep 13, 2018
f24049e
Remove unused code
lsilvs Sep 13, 2018
0d1c500
Add pagination to txs list in account page
lsilvs Sep 13, 2018
3ca83fb
Navigation dropdown update
Nov 12, 2018
26321ce
See all transactions/blocks links
Nov 12, 2018
2d7c259
Merge tag 'v2.1.6' into 813-add-generic-transaction-page
Nov 19, 2018
6957475
Merge remote-tracking branch 'origin/796-pagination-instead-lazy-load…
Nov 19, 2018
d08bd46
Version bump
Nov 19, 2018
f089f09
Set pagination default to 25
Nov 19, 2018
e8bf188
New UI
Nov 19, 2018
1730090
Add network monitor distribution stats
Nov 21, 2018
94af202
Network monitor UI update
Nov 21, 2018
faa89e7
Delegate monitor UI update
Nov 21, 2018
d929a8d
Main page update
Nov 23, 2018
f437980
Transactions page URL pagination support
Nov 23, 2018
21581e4
Headers update
Nov 23, 2018
42c41bf
Navigation bar update
Nov 23, 2018
e0ef3cb
Blank landing page (home)
Nov 23, 2018
ec80622
Network Monitor desktop view spacing fix
Nov 26, 2018
bf39ca1
Add development mode to Webpack config
Nov 26, 2018
6de187c
Fix volume presentation
Nov 26, 2018
2ee371f
Footer links update
Nov 26, 2018
503e619
Indentation fix
Nov 26, 2018
1ce538e
Backend fix for multisig accounts
Nov 28, 2018
f0a27e0
Partial UI support of multisig accounts
Nov 28, 2018
3f5fc85
Merge with 825-multisig-bug
Nov 28, 2018
03b2aae
Transaction view redesign
Nov 29, 2018
ff6a2db
Block view redesign
Nov 29, 2018
359131a
Address page redesign
Nov 29, 2018
48fc29e
Navbar responsive UI support
Dec 3, 2018
a593ba9
Mobile and tablet view improvements
Dec 3, 2018
af661b0
Currency and decimal selector in one row with breadcrumbs
Dec 3, 2018
6b40f1b
Page headers update
Dec 4, 2018
6f54cd2
Home page concept
Dec 4, 2018
a8846c2
Network monitor redesign
Dec 4, 2018
d5e4719
Add detailed mutisignature support
Dec 4, 2018
326d065
Home blocks/transactions additional links
Dec 5, 2018
87f5215
Netowrk monitor responsive UI improvements
Dec 6, 2018
de33ea9
Network monitor spacing fix
Dec 6, 2018
77a9095
Network Monitor spacing fix
Dec 6, 2018
c70e2d8
Delegate monitor responsive UI updates
Dec 6, 2018
3e84bc9
Remove map support from home component
Dec 6, 2018
7d36e0f
Home page redesign
Dec 6, 2018
d9d150f
Remove votes total value
Dec 6, 2018
035c4f9
Update address page view
Dec 6, 2018
b63cd43
Routing - delegate link leads to the address page
Dec 6, 2018
94d5857
Linting fixes
Dec 6, 2018
04fc051
Add glyphicons to address tabs
Dec 6, 2018
9ebecce
Remove commented tags
Dec 6, 2018
64d1fb2
Add spacing for currency-decimal picker
Dec 6, 2018
79cd09c
getUserName not needed anymore
Dec 6, 2018
2a34f61
Improve home screen blocks table view
Dec 6, 2018
70475e9
Add number of transactions to block page in the header
Dec 6, 2018
3e10a18
Captions for network stats
Dec 7, 2018
f07780d
Add operating system distribution
Dec 7, 2018
18b0308
Add Windows as an aggregated platform in the Network Monitor
Dec 7, 2018
ec622e8
Change cacheTTL back to 20 seconds
Dec 7, 2018
a973592
Merge branch '2.2.0' into xxx-explorer-ux-redesign
MichalTuleja Dec 7, 2018
1f31b9d
Test suite update
Dec 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions lib/api/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*
*/
const request = require('request');
const _ = require('underscore');
const async = require('async');
const coreUtils = require('../../utils/core.js');

Expand Down Expand Up @@ -143,7 +142,12 @@ module.exports = function (app) {
} else if (err || response.statusCode !== 200) {
return cb(err || 'Response was unsuccessful');
} else if (body && Array.isArray(body.data) && body.data.length > 0) {
account.multisignatures = account.multisignatures || [];
account.multisignatureAccount = {
lifetime: body.data[0].lifetime,
members: body.data[0].members,
min: body.data[0].min,
};
account.multisignatureGroups = body.data[0].members || [];
return cb(null, account);
}
return cb(body.error);
Expand All @@ -159,9 +163,18 @@ module.exports = function (app) {
return cb(err || 'Response was unsuccessful');
} else if (body && Array.isArray(body.data)) {
if (body.data.length > 0) {
account.multisignatures = _.extend(
account.multisignatures || [],
body.data[0].members.map(o => o.publicKey));
// eslint-disable-next-line arrow-body-style
account.multisignatureMemberships = body.data.map((o) => {
return {
address: o.address,
balance: o.balance,
lifetime: o.lifetime,
min: o.min,
publicKey: o.publicKey,
secondPublicKey: o.secondPublicKey,
unconfirmedBalance: o.unconfirmedBalance,
};
});
}
return cb(null, account);
}
Expand Down Expand Up @@ -278,11 +291,13 @@ module.exports = function (app) {
delegate: o.delegate,
incoming_cnt: String(o.incoming_cnt),
knowledge: o.knowledge,
multisignatures: o.multisignatures || [],
multisignatures: o.multisignatureGroups || [],
multisignatureAccount: o.multisignatureAccount || {},
multisignatureMemberships: o.multisignatureMemberships || [],
outgoing_cnt: String(o.outgoing_cnt),
publicKey: o.publicKey,
secondPublicKey: o.secondPublicKey,
secondSignature: o.secondSignature || 0,
secondSignature: !!o.secondPublicKey,
success: o.success,
u_multisignatures: o.u_multisignatures || [],
unconfirmedBalance: o.unconfirmedBalance,
Expand Down
15 changes: 6 additions & 9 deletions src/assets/styles/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,10 @@ h1 {
margin: 0;
}

h1>small {
white-space: nowrap;
}

@media (max-width: 769px) {
h1 {
padding: 30px 12px 25px;
padding: 30px 12px 25px;
font-size: 2em;
}
}

Expand Down Expand Up @@ -1200,8 +1197,8 @@ a.v_highlight_more {
}

.big-info {
padding-bottom: 23px;
padding-top: 23px;
padding-bottom: 24px;
padding-top: 0px;
}

.big-info p.small-title {
Expand All @@ -1223,8 +1220,8 @@ a.v_highlight_more {

@media (max-width: 768px) {
.big-info {
padding-bottom: 10px;
padding-top: 10px;
padding-bottom: 12px;
padding-top: 0px;
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/components/activity-graph/activity-graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
*/
-->
<div>
<h1>Activity Graph</h1>
<h1>
Activity Graph
<br />
<small><span>Real-time graphical presentation of the network activty</span></small>
</h1>
<div class="row horizontal-padding-xs horizontal-padding-s horizontal-padding-m horizontal-padding-l">
<div class="col-xs-12">
<p class="text-justify">The following is a live graphical visualisation of the lisk blockchain. Upon initialization only the latest block
Expand Down
57 changes: 56 additions & 1 deletion src/components/address/address.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,41 @@ const AddressConstructor = function (
) {
const vm = this;

const addAccountTypeDescription = (d) => {
if (vm.isMultisig && vm.isDelegate) {
vm.accountType = 'Multisignature delegate account';
} else if (vm.isMultisig) {
vm.accountType = 'Multisignature account';
} else if (vm.isDelegate) {
vm.accountType = 'Delegate account';
} else {
vm.accountType = 'Regular account';
}

if (d.secondSignature) {
vm.accountType += ' with a second signature';
}
if (Array.isArray(d.multisignatureMemberships) && d.multisignatureMemberships.length >= 1) {
vm.accountType += `, member of ${d.multisignatureMemberships.length} multisignature group`;
}
if (Array.isArray(d.multisignatureMemberships) && d.multisignatureMemberships.length > 1) {
vm.accountType += 's';
}
return d;
};

vm.getAddress = () => {
$http.get('/api/getAccount', {
params: {
address: $stateParams.address,
},
}).then((resp) => {
if (resp.data.success) {
vm.address = resp.data;
vm.isMultisig = resp.data.multisignatureAccount !== null && typeof resp.data.multisignatureAccount === 'object' && resp.data.multisignatureAccount.members;
vm.isDelegate = resp.data.delegate !== null && typeof resp.data.delegate === 'object' && resp.data.delegate.username;
vm.address = addAccountTypeDescription(resp.data);
vm.getVotes(vm.address.publicKey);
if (vm.isDelegate) { vm.getVoters(vm.address.publicKey); }
} else {
throw new Error('Account was not found!');
}
Expand All @@ -50,6 +76,34 @@ const AddressConstructor = function (
});
};

vm.getVoters = (publicKey) => {
$http.get('/api/getVoters', { params: { publicKey } }).then((resp) => {
if (resp.data.success) {
vm.address.voters = resp.data.voters;
vm.address.votersMeta = resp.data.meta;
vm.address.votersCount = vm.address.votersMeta.count;
}
});
};

vm.loadMoreVoters = () => {
const limit = vm.address.votersMeta.limit;
const offset = vm.address.votersMeta.offset + limit;

$http.get('/api/getVoters', { params: { publicKey: vm.address.publicKey, limit, offset } }).then((resp) => {
if (resp.data.success) {
for (let i = 0; i < resp.data.voters.length; i++) {
if (vm.address.voters.indexOf(resp.data.voters[i]) < 0) {
vm.address.voters.push(resp.data.voters[i]);
}
}

vm.address.votersMeta = resp.data.meta;
vm.address.votersCount = vm.address.votersMeta.count;
}
});
};

vm.address = {
address: $stateParams.address,
};
Expand All @@ -69,6 +123,7 @@ const AddressConstructor = function (
};

vm.getAddress();

vm.txs = addressTxs({ address: $stateParams.address });
};

Expand Down
Loading