forked from cerc-io/cosmos-explorer
feat: contract detail
This commit is contained in:
parent
c4bf34598f
commit
b3531c8207
@ -29,7 +29,7 @@ const selected = ref('');
|
|||||||
function showInfo(address: string) {
|
function showInfo(address: string) {
|
||||||
wasmStore.wasmClient.getWasmContracts(address).then((x) => {
|
wasmStore.wasmClient.getWasmContracts(address).then((x) => {
|
||||||
info.value = x.contract_info;
|
info.value = x.contract_info;
|
||||||
infoDialog.value = true;
|
// infoDialog.value = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function showState(address: string) {
|
function showState(address: string) {
|
||||||
@ -99,20 +99,21 @@ const result = ref('');
|
|||||||
<table class="table w-full mt-4">
|
<table class="table w-full mt-4">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="position: relative; z-index: 2;">Contract List</th>
|
<th style="position: relative; z-index: 2">Contract List</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="v in response.contracts">
|
<tr v-for="(v, index) in response.contracts" :key="index">
|
||||||
<td>{{ v }}</td>
|
<td>{{ v }}</td>
|
||||||
<td>
|
<td>
|
||||||
<button
|
<label
|
||||||
class="btn btn-primary btn-sm text-xs mr-2"
|
|
||||||
@click="showInfo(v)"
|
@click="showInfo(v)"
|
||||||
|
for="modal-contract-detail"
|
||||||
|
class="btn btn-primary btn-sm text-xs mr-2"
|
||||||
|
>contract</label
|
||||||
>
|
>
|
||||||
contract
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary btn-sm text-xs mr-2"
|
class="btn btn-primary btn-sm text-xs mr-2"
|
||||||
@click="showState(v)"
|
@click="showState(v)"
|
||||||
@ -132,19 +133,25 @@ const result = ref('');
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-dialog v-model="infoDialog" width="auto">
|
<input type="checkbox" id="modal-contract-detail" class="modal-toggle" />
|
||||||
<v-card>
|
<label for="modal-contract-detail" class="modal cursor-pointer">
|
||||||
<VCardTitle>Contract Detail</VCardTitle>
|
<label class="modal-box relative p-2" for="">
|
||||||
<v-card-text>
|
<div>
|
||||||
<DynamicComponent :value="info" />
|
<div class="flex items-center justify-between px-3 pt-2">
|
||||||
</v-card-text>
|
<div class="text-lg">Contract Detail</div>
|
||||||
<v-card-actions>
|
<label
|
||||||
<v-btn color="primary" block @click="infoDialog = false"
|
@click="infoDialog = false"
|
||||||
>Close Dialog</v-btn
|
for="modal-contract-detail"
|
||||||
>
|
class="btn btn-sm btn-circle"
|
||||||
</v-card-actions>
|
>✕</label
|
||||||
</v-card>
|
>
|
||||||
</v-dialog>
|
</div>
|
||||||
|
<div>
|
||||||
|
<DynamicComponent :value="info" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</label>
|
||||||
|
|
||||||
<v-dialog v-model="stateDialog" width="auto">
|
<v-dialog v-model="stateDialog" width="auto">
|
||||||
<v-card>
|
<v-card>
|
||||||
|
Loading…
Reference in New Issue
Block a user