Skip to content

Commit

Permalink
feat: show proposal description for namada
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan-LukeKlopper committed Apr 10, 2024
1 parent 337d727 commit 95c0e88
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/modules/[chain]/gov/[proposal_id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,17 @@ function metaItem(metadata: string|undefined): { title: string; summary: string
{{ status }}
</div>
</h2>
<div class="">
<template v-if="chainStore.chainName === 'namada'">
<div class="">
<ObjectElement :value="{'title' : proposal.content?.title , 'description' : proposal.content?.description}" />
</div>
</template>
<template v-else>
<div class="">
<ObjectElement :value="proposal.content" />
</div>
</div>
</template>

<div v-if="proposal.summary && !proposal.content?.description || metaItem(proposal?.metadata)?.summary ">
<MdEditor
:model-value="format.multiLine(proposal.summary || metaItem(proposal?.metadata)?.summary)"
Expand Down Expand Up @@ -245,7 +253,12 @@ function metaItem(metadata: string|undefined): { title: string; summary: string
<p
class="absolute inset-x-0 inset-y-0 text-center text-sm text-[#666] dark:text-[#eee] flex items-center justify-center"
>
<template v-if="item.value === '-'">
0%
</template>
<template v-else>
{{ item.value }}
</template>
</p>
</div>
</div>
Expand Down Expand Up @@ -356,7 +369,8 @@ function metaItem(metadata: string|undefined): { title: string; summary: string
</div>
</div>

<div class="bg-[#ffffff] dark:bg-[#222222] px-4 pt-3 pb-4 rounded mb-4 shadow">
<template v-if="chainStore.chainName !== 'namada'">
<div class="bg-[#ffffff] dark:bg-[#222222] px-4 pt-3 pb-4 rounded mb-4 shadow">
<h2 class="card-title">{{ $t('gov.votes') }}</h2>
<div class="overflow-x-auto">
<table class="table w-full table-zebra">
Expand Down Expand Up @@ -389,5 +403,7 @@ function metaItem(metadata: string|undefined): { title: string; summary: string
/>
</div>
</div>
</template>

</div>
</template>

0 comments on commit 95c0e88

Please sign in to comment.