feat: process add simple Description
This commit is contained in:
parent
2dbdca5161
commit
1f27a4cc30
@ -1,5 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useBlockchain, useFormatter, useStakingStore } from '@/stores';
|
import { useBlockchain, useFormatter, useStakingStore } from '@/stores';
|
||||||
|
import { select } from '@/components/dynamic/index';
|
||||||
import type { PaginatedProposals } from '@/types';
|
import type { PaginatedProposals } from '@/types';
|
||||||
import ProposalProcess from './ProposalProcess.vue';
|
import ProposalProcess from './ProposalProcess.vue';
|
||||||
import type { PropType } from 'vue';
|
import type { PropType } from 'vue';
|
||||||
@ -30,12 +31,36 @@ const statusMap: Record<string, string> = {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(item, index) in proposals?.proposals" :key="index">
|
<tr v-for="(item, index) in proposals?.proposals" :key="index">
|
||||||
<td class="px-4 w-20">
|
<td class="px-4 w-20">
|
||||||
<RouterLink
|
<label
|
||||||
class="text-main text-base hover:text-indigo-400"
|
for="proposal-detail-modal"
|
||||||
:to="`/${chain.chainName}/gov/${item?.proposal_id}`"
|
class="text-main text-base hover:text-indigo-400 cursor-pointer"
|
||||||
>
|
>
|
||||||
#{{ item?.proposal_id }}
|
#{{ item?.proposal_id }}</label
|
||||||
</RouterLink>
|
>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="proposal-detail-modal"
|
||||||
|
class="modal-toggle"
|
||||||
|
/>
|
||||||
|
<div class="modal modal-bottom sm:modal-middle">
|
||||||
|
<div class="modal-box">
|
||||||
|
<h3 class="font-bold text-lg">Description</h3>
|
||||||
|
<p class="py-4">
|
||||||
|
<Component
|
||||||
|
v-if="item.content?.description"
|
||||||
|
:is="select(item.content?.description, 'horizontal')"
|
||||||
|
:value="item.content?.description"
|
||||||
|
></Component>
|
||||||
|
</p>
|
||||||
|
<div class="modal-action">
|
||||||
|
<label
|
||||||
|
for="proposal-detail-modal"
|
||||||
|
class="btn btn-sm btn-primary"
|
||||||
|
>Close</label
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="w-[35%]">
|
<td class="w-[35%]">
|
||||||
<div>
|
<div>
|
||||||
@ -94,9 +119,6 @@ const statusMap: Record<string, string> = {
|
|||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
<button class="btn btn-xs btn-primary rounded-sm mr-3">
|
|
||||||
Detail
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-xs btn-primary rounded-sm">Vote</button>
|
<button class="btn btn-xs btn-primary rounded-sm">Vote</button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -110,14 +132,45 @@ const statusMap: Record<string, string> = {
|
|||||||
:key="index"
|
:key="index"
|
||||||
class="px-4 py-4"
|
class="px-4 py-4"
|
||||||
>
|
>
|
||||||
<RouterLink
|
<div
|
||||||
:to="`/${chain.chainName}/gov/${item?.proposal_id}`"
|
|
||||||
class="text-main text-base mb-1 flex justify-between hover:text-indigo-400"
|
class="text-main text-base mb-1 flex justify-between hover:text-indigo-400"
|
||||||
>
|
>
|
||||||
<div class="flex-1 w-0 truncate mr-4">{{ item?.content?.title }}</div>
|
<RouterLink
|
||||||
|
:to="`/${chain.chainName}/gov/${item?.proposal_id}`"
|
||||||
<div>#{{ item?.proposal_id }}</div>
|
class="flex-1 w-0 truncate mr-4"
|
||||||
</RouterLink>
|
>{{ item?.content?.title }}</RouterLink
|
||||||
|
>
|
||||||
|
<label
|
||||||
|
for="proposal-detail-modals"
|
||||||
|
class="text-main text-base hover:text-indigo-400 cursor-pointer"
|
||||||
|
>
|
||||||
|
#{{ item?.proposal_id }}</label
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="proposal-detail-modals"
|
||||||
|
class="modal-toggle"
|
||||||
|
/>
|
||||||
|
<div class="modal modal-bottom sm:modal-middle">
|
||||||
|
<div class="modal-box">
|
||||||
|
<h3 class="font-bold text-lg">Description</h3>
|
||||||
|
<p class="py-4">
|
||||||
|
<Component
|
||||||
|
v-if="item.content?.description"
|
||||||
|
:is="select(item.content?.description, 'horizontal')"
|
||||||
|
:value="item.content?.description"
|
||||||
|
></Component>
|
||||||
|
</p>
|
||||||
|
<div class="modal-action">
|
||||||
|
<label
|
||||||
|
for="proposal-detail-modals"
|
||||||
|
class="btn btn-sm btn-primary"
|
||||||
|
>Close</label
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-4 mt-2 mb-2">
|
<div class="grid grid-cols-4 mt-2 mb-2">
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
@ -166,9 +219,6 @@ const statusMap: Record<string, string> = {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button class="btn btn-xs btn-primary rounded-sm mr-3 px-4">
|
|
||||||
Detail
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-xs btn-primary rounded-sm px-4">Vote</button>
|
<button class="btn btn-xs btn-primary rounded-sm px-4">Vote</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user