-
Meet the conditions {{this.proposal.meet_conditions_days}} {{this.proposal.meet_conditions_days > 1 ? 'days' : 'day'}}
+
+
{{this.proposal.meet_conditions_days}} {{this.proposal.meet_conditions_days > 1 ? 'days' : 'day'}} satisfied
+
+
{{this.proposal ? this.proposal.stats.votes.accounts : 0}} accounts
{{this.proposal ? this.calcDays(this.proposal.proposal.created_at, new Date().toString()) : 0}} days since poll started
@@ -410,6 +415,19 @@ export default {
})
return comm
},
+ incentives () {
+ if (this.proposal.proposal.proposal_json.incentives !== undefined) {
+ let incentives = Number(this.proposal.proposal.proposal_json.incentives)
+ let integer = Number(incentives.toFixed(0))
+ let decimals = String(incentives * 10000 % 10000)
+ while (decimals.length < 4) {
+ decimals = '0' + decimals
+ }
+ return this.$util.toThousands(integer) + '.' + decimals + ' BOS'
+ } else {
+ return 'Not declare'
+ }
+ },
otherComm () {
let comm = []
this.votes.forEach(vote => {
@@ -481,8 +499,15 @@ export default {
return 'no content'
}
},
- abstainPercent () {
- return Number((100 - this.agreePercent - this.rejectPercent).toFixed(1))
+ satisfiedPercent () {
+ if (this.proposal) {
+ if (this.proposal.meet_conditions_days > 20) {
+ return 100
+ }
+ return Number((100 * this.proposal.meet_conditions_days / 20).toFixed(1))
+ } else {
+ return 0
+ }
},
agreePercent () {
if (!this.proposal || this.proposal.stats.staked.total === 0 || !this.proposal.stats.staked[1]) {
@@ -820,6 +845,9 @@ export default {
if (this.showVotersNum > this.votes.length) {
this.showVotersNum = this.votes.length
}
+ },
+ satisfiedText (percentage) {
+ return `${this.proposal.meet_conditions_days}/20`
}
},
watch: {
@@ -860,7 +888,7 @@ export default {
color #F46666
.el-progress-bar__inner
background-image linear-gradient(269deg, #F06262 0%, #FF7171 100%)
- .abstain-percent
+ .satisfied-percent
.el-progress__text
color #F4D03F
.el-progress-bar__inner
diff --git a/src/views/Referendum.vue b/src/views/Referendum.vue
index 9e90d7b..6f9a341 100644
--- a/src/views/Referendum.vue
+++ b/src/views/Referendum.vue
@@ -180,6 +180,7 @@