i18n: update add en src/modules/[chain]/block/
Author: Salman Wahib <hello@sxlmnwb.xyz> Co-authored-by: liangping <18786721@qq.com>
This commit is contained in:
parent
4257406286
commit
5b4d4718c2
@ -66,36 +66,36 @@ onBeforeRouteUpdate(async (to, from, next) => {
|
||||
<div v-if="remainingBlocks > 0">
|
||||
<div class="text-primary font-bold text-lg my-10">#{{ target }}</div>
|
||||
<Countdown :time="estimateTime" css="md:!text-5xl font-sans md:mx-5" />
|
||||
<div class="my-5">Estimated Time: <span class="text-xl font-bold">{{ format.toLocaleDate(estimateDate) }}</span>
|
||||
<div class="my-5">{{ $t('block.estimated_time') }}: <span class="text-xl font-bold">{{ format.toLocaleDate(estimateDate) }}</span>
|
||||
</div>
|
||||
<div class="pt-10 flex justify-center">
|
||||
<table class="table w-max rounded-lg bg-base-100">
|
||||
<tbody>
|
||||
<tr class="hover cursor-pointer" @click="edit = !edit">
|
||||
<td>Countdown For Block:</td>
|
||||
<td>{{ $t('block.countdown_for_block') }}:</td>
|
||||
<td class="text-right"><span class="md:!ml-40">{{ target }}</span></td>
|
||||
</tr>
|
||||
<tr v-if="edit">
|
||||
<td colspan="2" class="text-center">
|
||||
<h3 class="text-lg font-bold">Input A New Target Block Number</h3>
|
||||
<h3 class="text-lg font-bold">{{ $t('block.countdown_for_block_input') }}</h3>
|
||||
<p class="py-4">
|
||||
<div class="join">
|
||||
<input class="input input-bordered join-item" v-model="newHeight" type="number" />
|
||||
<button class="btn btn-primary join-item" @click="updateTarget()">Update</button>
|
||||
<button class="btn btn-primary join-item" @click="updateTarget()">{{ $t('block.btn_update') }}</button>
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Current Height:</td>
|
||||
<td>{{ $t('block.current_height') }}:</td>
|
||||
<td class="text-right">#{{ store.latest?.block?.header.height }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Remaining Blocks:</td>
|
||||
<td>{{ $t('block.remaining_blocks') }}:</td>
|
||||
<td class="text-right">{{ remainingBlocks }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Average Block Time:</td>
|
||||
<td>{{ $t('block.average_block_time') }}:</td>
|
||||
<td class="text-right">{{ (store.blocktime / 1000).toFixed(1) }}s</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -125,17 +125,17 @@ onBeforeRouteUpdate(async (to, from, next) => {
|
||||
</div>
|
||||
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
|
||||
<h2 class="card-title flex flex-row justify-between">Block Header</h2>
|
||||
<h2 class="card-title flex flex-row justify-between">{{ $t('block.block_header') }}</h2>
|
||||
<DynamicComponent :value="current.block?.header" />
|
||||
</div>
|
||||
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
|
||||
<h2 class="card-title flex flex-row justify-between">Transactions</h2>
|
||||
<h2 class="card-title flex flex-row justify-between">{{ $t('account.transactions') }}</h2>
|
||||
<TxsElement :value="current.block?.data?.txs" />
|
||||
</div>
|
||||
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
|
||||
<h2 class="card-title flex flex-row justify-between">Last Commit</h2>
|
||||
<h2 class="card-title flex flex-row justify-between">{{ $t('block.last_commit') }}</h2>
|
||||
<DynamicComponent :value="current.block?.last_commit" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,12 +19,12 @@ const list = computed(() => {
|
||||
<div>
|
||||
<div class="tabs tabs-boxed bg-transparent mb-4">
|
||||
<a class="tab text-gray-400 uppercase" :class="{ 'tab-active': tab === 'blocks' }"
|
||||
@click="tab = 'blocks'">Recent</a>
|
||||
@click="tab = 'blocks'">{{ $t('block.recent') }}</a>
|
||||
<RouterLink class="tab text-gray-400 uppercase"
|
||||
:to="`/${chain}/block/${Number(base.latest?.block?.header.height||0) + 10000}`"
|
||||
>Future</RouterLink>
|
||||
>{{ $t('block.future') }}</RouterLink>
|
||||
<a class="tab text-gray-400 uppercase" :class="{ 'tab-active': tab === 'transactions' }"
|
||||
@click="tab = 'transactions'">Transactions</a>
|
||||
@click="tab = 'transactions'">{{ $t('account.transactions') }}</a>
|
||||
</div>
|
||||
|
||||
<div v-show="tab === 'blocks'" class="grid xl:!grid-cols-6 md:!grid-cols-4 grid-cols-1 gap-3">
|
||||
@ -53,10 +53,10 @@ const list = computed(() => {
|
||||
<table class="table w-full table-compact">
|
||||
<thead class="bg-base-200">
|
||||
<tr>
|
||||
<th style="position: relative; z-index: 2;">Height</th>
|
||||
<th style="position: relative; z-index: 2;">Hash</th>
|
||||
<th>Messages</th>
|
||||
<th>Fees</th>
|
||||
<th style="position: relative; z-index: 2;">{{ $t('account.height') }}</th>
|
||||
<th style="position: relative; z-index: 2;">{{ $t('account.hash') }}</th>
|
||||
<th>{{ $t('account.messages') }}</th>
|
||||
<th>{{ $t('block.fees') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -83,7 +83,7 @@ const list = computed(() => {
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
<span>Only show txs in recent blocks</span>
|
||||
<span>{{ $t('block.only_tx') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,5 +64,20 @@
|
||||
"messages": "Messages",
|
||||
"time": "Time",
|
||||
"error": "Account does not exists on chain"
|
||||
},
|
||||
"block": {
|
||||
"estimated_time": "Estimated Time",
|
||||
"countdown_for_block": "Countdown For Block",
|
||||
"countdown_for_block_input": "Input A New Target Block Number",
|
||||
"btn_update": "Update",
|
||||
"current_height": "Current Height",
|
||||
"remaining_blocks": "Remaining Blocks",
|
||||
"average_block_time": "Average Block Time",
|
||||
"block_header": "Block Header",
|
||||
"last_commit": "Last Commit",
|
||||
"recent": "Recent",
|
||||
"future": "Future",
|
||||
"fees": "Fees",
|
||||
"only_tx": "Only show txs in recent blocks"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user