forked from LaconicNetwork/cosmos-explorer
improve votes
This commit is contained in:
@@ -12,7 +12,7 @@ const format = useFormatter();
|
||||
function isMD() {
|
||||
if (
|
||||
props.value &&
|
||||
(props.value.indexOf('\n') > -1 || props.value.indexOf('\\n') > -1)
|
||||
(String(props.value).indexOf('\n') > -1 || String(props.value).indexOf('\\n') > -1)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -344,6 +344,7 @@ function pageload(p: number) {
|
||||
<tr v-for="(item, index) of votes" :key="index">
|
||||
<td class="py-2 text-sm">{{ showValidatorName(item.voter) }}</td>
|
||||
<td
|
||||
v-if="item.option"
|
||||
class="py-2 text-sm"
|
||||
:class="{
|
||||
'text-yes': item.option === 'VOTE_OPTION_YES',
|
||||
@@ -352,6 +353,12 @@ function pageload(p: number) {
|
||||
>
|
||||
{{ String(item.option).replace('VOTE_OPTION_', '') }}
|
||||
</td>
|
||||
<td
|
||||
v-if="item.options"
|
||||
class="py-2 text-sm"
|
||||
>
|
||||
{{ item.options.map(x => `${x.option.replace('VOTE_OPTION_', '')}:${format.percent(x.weight)}`).join(', ') }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user