forked from cerc-io/cosmos-explorer
feat: style
This commit is contained in:
parent
393b2da55b
commit
06574f2f2c
@ -53,7 +53,7 @@ const isPositive = controlledComputed(
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div v-if="props.subtitle" size="x-small" class="font-semibold">
|
<div v-if="props.subtitle" size="x-small" class="font-semibold">
|
||||||
<span class="text-truncate">{{ props.subtitle }}</span>
|
<span class="truncate">{{ props.subtitle }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,10 +36,14 @@ function gotoPage(pageNum: number) {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="my-5 text-center">
|
<div class="my-5">
|
||||||
<div v-if="total && limit" class="btn-group">
|
<div v-if="total && limit" class="btn-group">
|
||||||
<button v-for="{ page, color } in pages" class="btn btn-md" :class="color" @click="gotoPage(page)">{{ page
|
<button v-for="{ page, color } in pages" :key="page"
|
||||||
}}</button>
|
class="btn bg-gray-100 text-gray-500 hover:text-white border-none dark:bg-gray-800 dark:text-white" :class="{
|
||||||
|
'!bg-primary text-white': color === 'btn-primary',
|
||||||
|
}" @click="gotoPage(page)">
|
||||||
|
{{ page }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -458,7 +458,7 @@ loadAccount(props.address);
|
|||||||
v.height
|
v.height
|
||||||
}}</RouterLink>
|
}}</RouterLink>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-truncate text-primary py-3" style="max-width: 200px">
|
<td class="truncate text-primary py-3" style="max-width: 200px">
|
||||||
<RouterLink :to="`/${chain}/tx/${v.txhash}`">
|
<RouterLink :to="`/${chain}/tx/${v.txhash}`">
|
||||||
{{ v.txhash }}
|
{{ v.txhash }}
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
@ -121,28 +121,17 @@ const result = ref('');
|
|||||||
<tr v-for="(v, index) in response.contracts" :key="index" class="hover">
|
<tr v-for="(v, index) in response.contracts" :key="index" class="hover">
|
||||||
<td>{{ v }}</td>
|
<td>{{ v }}</td>
|
||||||
<td>
|
<td>
|
||||||
<label
|
<label @click="showInfo(v)" for="modal-contract-detail"
|
||||||
@click="showInfo(v)"
|
class="btn btn-primary btn-xs text-xs mr-2">contract</label>
|
||||||
for="modal-contract-detail"
|
|
||||||
class="btn btn-primary btn-sm text-xs mr-2"
|
|
||||||
>contract</label
|
|
||||||
>
|
|
||||||
|
|
||||||
<label
|
<label class="btn btn-primary btn-xs text-xs mr-2" for="modal-contract-states" @click="showState(v)">
|
||||||
class="btn btn-primary btn-sm text-xs mr-2"
|
|
||||||
for="modal-contract-states"
|
|
||||||
@click="showState(v)"
|
|
||||||
>
|
|
||||||
States
|
States
|
||||||
</label>
|
</label>
|
||||||
<label
|
<label for="modal-contract-query" class="btn btn-primary btn-xs text-xs mr-2" @click="showQuery(v)">
|
||||||
for="modal-contract-query"
|
|
||||||
class="btn btn-primary btn-sm text-xs mr-2"
|
|
||||||
@click="showQuery(v)"
|
|
||||||
>
|
|
||||||
Query
|
Query
|
||||||
</label>
|
</label>
|
||||||
<label for="wasm_execute_contract" class="btn btn-primary btn-sm text-xs" @click="dialog.open('wasm_execute_contract', {contract: v})">
|
<label for="wasm_execute_contract" class="btn btn-primary btn-xs text-xs"
|
||||||
|
@click="dialog.open('wasm_execute_contract', { contract: v })">
|
||||||
Execute
|
Execute
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
@ -151,7 +140,8 @@ const result = ref('');
|
|||||||
</table>
|
</table>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<PaginationBar :limit="50" :total="response.pagination?.total" :callback="loadContract" />
|
<PaginationBar :limit="50" :total="response.pagination?.total" :callback="loadContract" />
|
||||||
<label for="wasm_instantiate_contract" class="btn btn-primary my-5" @click="dialog.open('wasm_instantiate_contract', {codeId: props.code_id})">Instantiate Contract</label>
|
<label for="wasm_instantiate_contract" class="btn btn-primary my-5"
|
||||||
|
@click="dialog.open('wasm_instantiate_contract', { codeId: props.code_id })">Instantiate Contract</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -162,12 +152,7 @@ const result = ref('');
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex items-center justify-between px-3 pt-2">
|
<div class="flex items-center justify-between px-3 pt-2">
|
||||||
<div class="text-lg">Contract Detail</div>
|
<div class="text-lg">Contract Detail</div>
|
||||||
<label
|
<label @click="infoDialog = false" for="modal-contract-detail" class="btn btn-sm btn-circle">✕</label>
|
||||||
@click="infoDialog = false"
|
|
||||||
for="modal-contract-detail"
|
|
||||||
class="btn btn-sm btn-circle"
|
|
||||||
>✕</label
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<DynamicComponent :value="info" />
|
<DynamicComponent :value="info" />
|
||||||
@ -180,20 +165,15 @@ const result = ref('');
|
|||||||
<label for="modal-contract-states" class="modal cursor-pointer">
|
<label for="modal-contract-states" class="modal cursor-pointer">
|
||||||
<label class="modal-box w-11/12 max-w-5xl" for="">
|
<label class="modal-box w-11/12 max-w-5xl" for="">
|
||||||
<div>
|
<div>
|
||||||
<div class="flex items-center justify-between px-3 pt-2">
|
<div class="flex items-center justify-between px-3 pt-2 mb-4">
|
||||||
<div class="text-lg">Contract States</div>
|
<div class="text-lg">Contract States</div>
|
||||||
<label
|
<label @click="infoDialog = false" for="modal-contract-states" class="btn btn-sm btn-circle">✕</label>
|
||||||
@click="infoDialog = false"
|
|
||||||
for="modal-contract-states"
|
|
||||||
class="btn btn-sm btn-circle"
|
|
||||||
>✕</label
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-auto">
|
<div class="overflow-auto">
|
||||||
<table class="table table-compact w-full text-sm">
|
<table class="table table-compact w-full text-sm">
|
||||||
<tr v-for="(v, index) in state.models" :key="index" class="hover">
|
<tr v-for="(v, index) in state.models" :key="index" class="hover">
|
||||||
<td class="text-right" :data-tip="format.hexToString(v.key)">
|
<td class="" :data-tip="format.hexToString(v.key)">
|
||||||
<span class="font-bold float-right">{{ format.hexToString(v.key) }}</span>
|
<span class="font-bold">{{ format.hexToString(v.key) }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-left w-3/4" :title="format.base64ToString(v.value)">
|
<td class="text-left w-3/4" :title="format.base64ToString(v.value)">
|
||||||
{{ format.base64ToString(v.value) }}
|
{{ format.base64ToString(v.value) }}
|
||||||
@ -212,33 +192,16 @@ const result = ref('');
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex items-center justify-between px-3 pt-2 mb-4">
|
<div class="flex items-center justify-between px-3 pt-2 mb-4">
|
||||||
<div class="text-lg font-semibold">Query Contract</div>
|
<div class="text-lg font-semibold">Query Contract</div>
|
||||||
<label
|
<label @click="infoDialog = false" for="modal-contract-query" class="btn btn-sm btn-circle">✕</label>
|
||||||
@click="infoDialog = false"
|
|
||||||
for="modal-contract-query"
|
|
||||||
class="btn btn-sm btn-circle"
|
|
||||||
>✕</label
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="px-3">
|
<div class="px-3">
|
||||||
<div>
|
<div>
|
||||||
<div class="grid grid-cols-2 gap-4 mb-4">
|
<div class="grid grid-cols-2 gap-4 mb-4">
|
||||||
<div
|
<div class="form-control border rounded px-4" v-for="(item, index) of radioContent" :key="index"
|
||||||
class="form-control border rounded px-4"
|
:class="{ 'pt-2': index === 0 }">
|
||||||
v-for="(item, index) of radioContent"
|
<label class="label cursor-pointer justify-start" @click="selectedRadio = item?.value">
|
||||||
:key="index"
|
<input type="radio" name="radio-10" class="radio radio-sm radio-primary mr-4"
|
||||||
:class="{ 'pt-2': index === 0 }"
|
:checked="item?.value === selectedRadio" style="border: 1px solid #d2d6dc" />
|
||||||
>
|
|
||||||
<label
|
|
||||||
class="label cursor-pointer justify-start"
|
|
||||||
@click="selectedRadio = item?.value"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
name="radio-10"
|
|
||||||
class="radio radio-sm radio-primary mr-4"
|
|
||||||
:checked="item?.value === selectedRadio"
|
|
||||||
style="border: 1px solid #d2d6dc"
|
|
||||||
/>
|
|
||||||
<div>
|
<div>
|
||||||
<div class="text-base font-semibold">
|
<div class="text-base font-semibold">
|
||||||
{{ item?.title }}
|
{{ item?.title }}
|
||||||
@ -253,10 +216,7 @@ const result = ref('');
|
|||||||
<VTextarea v-model="result" label="Result" />
|
<VTextarea v-model="result" label="Result" />
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 mb-4">
|
<div class="mt-4 mb-4">
|
||||||
<button
|
<button class="btn !btn-yes !border-yes px-4 text-white" @click="queryContract()">
|
||||||
class="btn !btn-yes !border-yes px-4 text-white"
|
|
||||||
@click="queryContract()"
|
|
||||||
>
|
|
||||||
Query Contract
|
Query Contract
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,36 +36,28 @@ pageload(1)
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="v in codes.code_infos">
|
<tr v-for="(v, index) in codes.code_infos" :key="index">
|
||||||
<td>{{ v.code_id }}</td>
|
<td>{{ v.code_id }}</td>
|
||||||
<td>
|
<td>
|
||||||
<RouterLink
|
<RouterLink :to="`/${props.chain}/cosmwasm/${v.code_id}/contracts`"
|
||||||
:to="`/${props.chain}/cosmwasm/${v.code_id}/contracts`"
|
class="truncate max-w-[200px] block text-primary" :title="v.data_hash">
|
||||||
class="text-truncate max-w-[200px] block text-primary"
|
|
||||||
:title="v.data_hash"
|
|
||||||
>
|
|
||||||
{{ v.data_hash }}
|
{{ v.data_hash }}
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ v.creator }}</td>
|
<td>{{ v.creator }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ v.instantiate_permission?.permission }}
|
{{ v.instantiate_permission?.permission }}
|
||||||
<span
|
<span>{{ v.instantiate_permission?.address }}
|
||||||
>{{ v.instantiate_permission?.address }}
|
{{ v.instantiate_permission.addresses.join(', ') }}</span>
|
||||||
{{ v.instantiate_permission.addresses.join(', ') }}</span
|
|
||||||
>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<PaginationBar :limit="pageRequest.limit" :total="codes.pagination?.total" :callback="pageload" />
|
<PaginationBar :limit="pageRequest.limit" :total="codes.pagination?.total" :callback="pageload" />
|
||||||
<label
|
<label for="wasm_store_code" class="btn btn-primary my-5" @click="dialog.open('wasm_store_code', {})">Upload
|
||||||
for="wasm_store_code"
|
Smart
|
||||||
class="btn btn-primary my-5"
|
Contract</label>
|
||||||
@click="dialog.open('wasm_store_code', {})"
|
|
||||||
>Upload Smart Contract</label
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -344,7 +344,7 @@ onMounted(() => {
|
|||||||
item.height
|
item.height
|
||||||
}}</RouterLink>
|
}}</RouterLink>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-truncate text-primary" style="max-width: 200px">
|
<td class="truncate text-primary" style="max-width: 200px">
|
||||||
<RouterLink :to="`/${props.chain}/tx/${item.txhash}`">
|
<RouterLink :to="`/${props.chain}/tx/${item.txhash}`">
|
||||||
{{ item.txhash }}
|
{{ item.txhash }}
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
@ -131,7 +131,7 @@ function changeTab(v: string) {
|
|||||||
<div class="grid grid-cols-4 gap-x-4 mt-4" :class="tab === '2' ? '' : 'hidden'">
|
<div class="grid grid-cols-4 gap-x-4 mt-4" :class="tab === '2' ? '' : 'hidden'">
|
||||||
<div v-for="({ v, signing, hex }, i) in list" :key="i">
|
<div v-for="({ v, signing, hex }, i) in list" :key="i">
|
||||||
<div class="flex items-center justify-between py-0">
|
<div class="flex items-center justify-between py-0">
|
||||||
<label class="text-truncate text-sm">
|
<label class="truncate text-sm">
|
||||||
<span class="ml-1 text-black dark:text-white">{{ i + 1 }}.{{ v.description.moniker }}</span>
|
<span class="ml-1 text-black dark:text-white">{{ i + 1 }}.{{ v.description.moniker }}</span>
|
||||||
</label>
|
</label>
|
||||||
<div v-if="Number(signing?.missed_blocks_counter || 0) > 10"
|
<div v-if="Number(signing?.missed_blocks_counter || 0) > 10"
|
||||||
|
Loading…
Reference in New Issue
Block a user