Skip to content

Commit

Permalink
Merge pull request #183 from TrustyFund/feature/various-fixes
Browse files Browse the repository at this point in the history
feature/various fixes
  • Loading branch information
youaresofunny authored Apr 2, 2018
2 parents 61d6957 + d21bbe0 commit a142590
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions client/components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,8 @@ export default {
&.notie-background-warning {
background-color: rgba(130, 106, 29, 0.95);
}
&.notie-background-info {
background-color: rgba(28, 57, 130, 0.95);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default {
this.percents = newPercents;
this.percentsAsArray = this.convertPercentsToArray(this.percents);
this.$toast.warning('Suggested portfolio percents applied');
this.$toast.info('Portfolio suggested');
},
handleMinus(item) {
if ((item.share - 0.2) < 0) {
Expand Down
1 change: 1 addition & 0 deletions client/components/Portfolio/Portfolio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default {
.trusty_table {
width: 100%;
margin-top: 20px;
margin-bottom: 10px;
thead, th, tbody {
color: white;
border: none;
Expand Down
8 changes: 5 additions & 3 deletions client/components/Portfolio/PortfolioBalance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ export default {
return (this.share && Math.round(this.share, 0)) || 0;
},
formattedBalanceFiat() {
if (!this.item.fiatValue) return '0.00';
const precisedFiatValue = (this.item.fiatValue / (10 ** this.fiatPrecision)).toFixed(2);
return precisedFiatValue;
if (!this.item.fiatValue) return '0';
const precisedFiatValue = this.item.fiatValue / (10 ** this.fiatPrecision);
if (precisedFiatValue > 1) return Math.floor(precisedFiatValue);
if (precisedFiatValue > 0.1) return precisedFiatValue.toFixed(1);
return precisedFiatValue.toFixed(2);
},
formattedChange() {
if (!this.item.change) return 0;
Expand Down
3 changes: 3 additions & 0 deletions client/services/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default {
success(text) {
this.alert('success', text);
},
info(text) {
this.alert('info', text);
},
alert(type, text) {
alert({ type, text, position: 'bottom' });
}
Expand Down
2 changes: 1 addition & 1 deletion vuex-bitshares
Submodule vuex-bitshares updated 1 files
+21 −0 LICENSE

0 comments on commit a142590

Please sign in to comment.