Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Conform all numbers with comma - Closes #326 #339

Merged
merged 16 commits into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
4513b3c
Merge branch 'development' into 321-visual-bug-with-the-tabs
yasharAyari Jun 7, 2017
94cf268
Add Number filter to lisk component and forging component
yasharAyari Jun 7, 2017
e6bf278
Merge branch 'development' into 326-conform-all-numbers-with-comma
yasharAyari Jun 8, 2017
74dfbea
Increase numbers can be shown after floating point to 8 numbers
yasharAyari Jun 9, 2017
01a7f52
Merge branch 'development' into 326-conform-all-numbers-with-comma
yasharAyari Jun 9, 2017
4fc35d6
Increase numbers can be shown after floating point to 8 numbers in fo…
yasharAyari Jun 9, 2017
b527591
Create liskNumber filter to conform all numbers with comma
yasharAyari Jun 9, 2017
253a37b
Use liskNumber in lsk component and forging component
yasharAyari Jun 9, 2017
909ab5a
Add liskNumber filter to loskNano.js
yasharAyari Jun 9, 2017
3e534e9
Merge branch 'development' into 326-conform-all-numbers-with-comma
slaweet Jun 9, 2017
e11d614
Merge branch 'development' into 326-conform-all-numbers-with-comma
slaweet Jun 9, 2017
517f280
Merge branch 'development' into 326-conform-all-numbers-with-comma
slaweet Jun 12, 2017
e76b071
Merge branch 'development' into 326-conform-all-numbers-with-comma
slaweet Jun 12, 2017
740d916
Merge branch 'development' into 326-conform-all-numbers-with-comma
yasharAyari Jun 12, 2017
659773b
Merge branch 'development' into 326-conform-all-numbers-with-comma
yasharAyari Jun 12, 2017
56e5819
Merge branch 'development' into 326-conform-all-numbers-with-comma
reyraa Jun 12, 2017
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
2 changes: 1 addition & 1 deletion src/components/forging/forging.pug
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ md-card.offline-hide
th(md-column) Reward
tbody(md-body, infinite-scroll='$ctrl.loadMoreBlocks()', infinite-scroll-distance='1')
tr(md-row, ng-repeat='block in $ctrl.blocks')
td(md-cell data-title='tableBlocks.cols.height', sortable="'height'") {{block.height}}
td(md-cell data-title='tableBlocks.cols.height', sortable="'height'") {{block.height | liskNumber}}
td(md-cell data-title='tableBlocks.cols.blockId', ng-show='$ctrl.showAllColumns') {{block.id}}
td(md-cell data-title='tableBlocks.cols.timestamp', sortable="'timestamp'")
span(ng-show='block.timestamp > 0')
Expand Down
2 changes: 1 addition & 1 deletion src/components/lsk/lsk.pug
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
span(ng-bind='$ctrl.amount | lsk')
span(ng-bind='$ctrl.amount | lsk | liskNumber')
span(ng-show='$ctrl.append')= ' LSK'
1 change: 1 addition & 0 deletions src/components/main/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './main.less';
/**
* The main component, used as parent for transaction, forging and delgate tabs.
*
Expand Down
9 changes: 9 additions & 0 deletions src/components/main/main.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
md-tabs.main-tabs .md-tab.md-active {
background: white;
box-shadow: none;
}
md-tabs.main-tabs md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper {
padding-left: 0;
box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.12);
margin-left: 2px;
}
15 changes: 15 additions & 0 deletions src/filters/liskNumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* This filter format numbers and add comma sperator to them
*
* @module app
*/
app.filter('liskNumber', ($filter) => {
const numberFilter = $filter('number');
return (input) => {
const temp = input.toString().split('.');
if (temp.length === 1) {
return numberFilter(temp[0]);
}
return `${numberFilter(temp[0])}.${temp[1]}`;
};
});
1 change: 1 addition & 0 deletions src/liskNano.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import './services/sync';
import './services/notification';

import './filters/lsk';
import './filters/liskNumber';

import './run';
import './states';