diff --git a/src/components/dynamic/ObjectElement.vue b/src/components/dynamic/ObjectElement.vue index c45a32fa..2d92f453 100644 --- a/src/components/dynamic/ObjectElement.vue +++ b/src/components/dynamic/ObjectElement.vue @@ -6,14 +6,18 @@ const props = defineProps(["value"]); \ No newline at end of file diff --git a/src/modules/[chain]/gov/[proposal_id].vue b/src/modules/[chain]/gov/[proposal_id].vue index 38324c33..ff650719 100644 --- a/src/modules/[chain]/gov/[proposal_id].vue +++ b/src/modules/[chain]/gov/[proposal_id].vue @@ -100,8 +100,11 @@ const total = computed(()=> { }) const turnout = computed(() => { + if (total.value > 0) { const bonded = useStakingStore().pool?.bonded_tokens || "1" return format.percent(total.value / Number(bonded)) + } + return 0 }) const yes = computed(()=> { @@ -135,6 +138,15 @@ const abstain = computed(()=> { } return 0 }) +const processList = computed(()=>{ + return [ + {name: 'Turnout', value : turnout.value, class: 'bg-info' }, + {name: 'Yes', value : yes.value, class: 'bg-success' }, + {name: 'No', value : no.value, class: 'bg-error' }, + {name: 'No With Veto', value : veto.value, class: 'bg-primary' }, + {name: 'Abstain', value : abstain.value, class: 'bg-warning' } + ] +}) @@ -158,16 +170,125 @@ const abstain = computed(()=> { - - - - - {{ proposal_id }}. {{ proposal.content?.title }} {{ status }} - - - - +
+
+

Tally

+
+ +
+
+
+ {{ item.value }} +
+
+
+
+

Timeline

+ + + +
+
+ Submited at: {{ format.toDay(proposal.submit_time) }} +
+ {{ shortTime(proposal.submit_time) }} +
+
+ + + +
+
+ Deposited at: {{ format.toDay(proposal.status==="PROPOSAL_STATUS_DEPOSIT_PERIOD"?proposal.deposit_end_time: proposal.voting_start_time) }} +
+ {{ shortTime(proposal.status==="PROPOSAL_STATUS_DEPOSIT_PERIOD"?proposal.deposit_end_time: proposal.voting_start_time) }} +
+ +

+

+ {{ x.depositor }} {{ format.formatTokens(x.amount) }} +
+

+ + +
+ + + +
+
+ Voting start from {{ format.toDay(proposal.voting_start_time) }} +
+ {{ shortTime(proposal.voting_start_time) }} +
+ + +

+ +

+
+ + + +
+
+ Voting end {{ format.toDay(proposal.voting_end_time) }} +
+ {{ shortTime(proposal.voting_end_time) }} +
+ + +

+ Current Status: {{ proposal.status }} +

+
+ + +
+
+ Upgrade Plan: + (EST) + {{ format.toDay(proposal.content?.plan?.time) }} +
+ {{ shortTime(proposal.voting_end_time) }} +
+ + +

+ +

+
+
+
+
+ + + +