show decay info for decay from last transaction

This commit is contained in:
ogerly 2022-02-10 20:58:16 +01:00
parent 3f7fcc0d19
commit 07c43b800f
2 changed files with 24 additions and 8 deletions

View File

@ -4,7 +4,7 @@
{{ decay ? ' - ' + $n(decay.balance, 'decimal') + ' ' + decayStartBlockTextShort : '' }}
</span>
<div v-if="decaytyp === 'new'">
<div v-if="decaytyp === 'new' || decaytyp === 'decayLastTransaction'">
<div class="d-flex" v-if="!decay.decayStartBlock">
<div style="width: 100%" class="text-center pb-3">
<b-icon icon="droplet-half" height="12" class="mb-2" />
@ -12,7 +12,7 @@
</div>
</div>
<b-row>
<b-row v-if="decaytyp === 'new' || decaytyp === 'decayLastTransaction'">
<b-col cols="6" class="text-right">
<div v-if="!decay.decayStartBlock">{{ $t('decay.last_transaction') }}</div>
</b-col>
@ -32,7 +32,7 @@
</div>
</b-col>
</b-row>
<b-row>
<b-row v-if="decaytyp === 'new' || decaytyp === 'decayLastTransaction'">
<b-col cols="6" class="text-right">
<div v-if="!decay.decayStartBlock">{{ $t('decay.past_time') }}</div>
</b-col>
@ -54,7 +54,7 @@
</b-row>
<!-- Decay-->
<b-row>
<b-row v-if="decaytyp === 'new' || decaytyp === 'decayLastTransaction'">
<b-col cols="6" class="text-right">
<div>{{ $t('decay.decay') }}</div>
</b-col>
@ -63,13 +63,13 @@
</b-col>
</b-row>
<hr class="mt-2 mb-2" />
<b-row>
<b-row v-if="decaytyp === 'new'">
<b-col class="text-center pt-3 pb-2">
<b>{{ $t('decay.calculation_total') }}</b>
</b-col>
</b-row>
<!-- Type-->
<b-row>
<b-row v-if="decaytyp === 'new'">
<b-col cols="6" class="text-right">
<div v-if="type === 'send'">{{ $t('decay.sent') }}</div>
<div v-if="type === 'receive'">{{ $t('decay.received') }}</div>
@ -80,7 +80,7 @@
</b-col>
</b-row>
<!-- Decay-->
<b-row>
<b-row v-if="decaytyp === 'new'">
<b-col cols="6" class="text-right">
<div>{{ $t('decay.decay') }}</div>
</b-col>
@ -89,7 +89,7 @@
</b-col>
</b-row>
<!-- Total-->
<b-row>
<b-row v-if="decaytyp === 'new'">
<b-col cols="6" class="text-right">
<div>{{ $t('decay.total') }}</div>
</b-col>

View File

@ -21,6 +21,9 @@
name,
memo,
firstTransaction,
decayDuration,
decayEnd,
decayStart,
} in transactions"
:key="transactionId"
:style="type === 'decay' ? 'background-color:#f1e0ae3d' : ''"
@ -142,6 +145,19 @@
>
<b>{{ $t('decay.befor_startblock_transaction') }}</b>
</div>
<div v-if="type === 'decay'" class="mt-3 mb-3">
<decay-information
decaytyp="decayLastTransaction"
:balance="balance"
:decay="{
balance: balance,
decayStart: parseInt(decayStart),
decayEnd: parseInt(decayEnd),
decayDuration: parseInt(decayDuration),
}"
:type="type"
/>
</div>
</div>
</b-collapse>