This commit is contained in:
liangping 2023-06-13 20:20:07 +08:00
parent 63f86a5b6a
commit 6437369d84

View File

@ -63,13 +63,16 @@ onBeforeRouteUpdate(async (to, from, next) => {
<template>
<div>
<div v-if="isFutureBlock" class="text-center pt-28">
<div v-if="remainingBlocks > 0">
<Countdown :time="estimateTime" css="text-5xl font-sans md:mx-5" />
<div class="my-5">Estimated Time: <span class="text-xl font-bold">{{ format.toLocaleDate(estimateDate) }}</span></div>
<div class="my-5">Estimated Time: <span class="text-xl font-bold">{{ format.toLocaleDate(estimateDate) }}</span>
</div>
<div class="pt-10 flex justify-center">
<table class="table table-compact rounded-lg">
<tbody>
<tr class="hover cursor-pointer" @click="edit = !edit">
<td>Countdown For Block:</td><td class="text-right"><span class=" ml-40">{{ target }}</span></td>
<td>Countdown For Block:</td>
<td class="text-right"><span class=" ml-40">{{ target }}</span></td>
</tr>
<tr v-if="edit">
<td colspan="2" class="text-center">
@ -83,17 +86,22 @@ onBeforeRouteUpdate(async (to, from, next) => {
</td>
</tr>
<tr>
<td>Current Height:</td><td class="text-right">#{{ store.latest?.block?.header.height }}</td>
<td>Current Height:</td>
<td class="text-right">#{{ store.latest?.block?.header.height }}</td>
</tr>
<tr>
<td>Remaining Blocks:</td><td class="text-right">{{ remainingBlocks }}</td>
<td>Remaining Blocks:</td>
<td class="text-right">{{ remainingBlocks }}</td>
</tr>
<tr>
<td>Average Block Time:</td><td class="text-right">{{ (store.blocktime/1000).toFixed(1) }}s</td>
<td>Average Block Time:</td>
<td class="text-right">{{ (store.blocktime / 1000).toFixed(1) }}s</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div v-else>
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
@ -130,5 +138,4 @@ onBeforeRouteUpdate(async (to, from, next) => {
<DynamicComponent :value="current.block?.last_commit" />
</div>
</div>
</div>
</template>
</div></template>