change startblock infobox text

This commit is contained in:
ogerly 2021-08-12 12:20:49 +02:00
parent 151acea108
commit e7967fe146
3 changed files with 29 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<template>
<div>
<span v-if="decaytyp === 'short'">
<small>{{ decay ? ' -' + decay.balance + ' ' + decayStartBlockTextShort : '' }}</small>
{{ decay ? ' -' + decay.balance + ' ' + decayStartBlockTextShort : '' }}
</span>
<div v-if="decaytyp === 'new'">
@ -27,7 +27,7 @@
</div>
</div>
<div>
<span>
<span v-if="!decay.decay_start_block">
{{ $d($moment.unix(decay.decay_start), 'long') }}
{{ $i18n.locale === 'de' ? 'Uhr' : '' }}
</span>

View File

@ -23,7 +23,7 @@
"decay_since_last_transaction":"Vergänglichkeit seit der letzten Transaktion",
"calculation_decay":"Berechnung der Vergänglichkeit",
"Starting_block_decay":"Startblock Vergänglichkeit",
"decay_introduced":"Die Vergänglichkeit wurde Eingeführt am",
"decay_introduced":"Die Vergänglichkeit wurde Eingeführt am ",
"last_transaction":"Letzte Transaktion",
"past_time":"Vergangene Zeit",
"since_introduction":"seit Einführung der Vergänglichkeit",

View File

@ -21,6 +21,14 @@
:key="id"
>
<div class="list-group-item gdt-transaction-list-item" v-b-toggle="'a' + date + ''">
<!-- Icon -->
<div class="text-right" style="position: absolute">
<b-icon
:icon="getIcon(gdt_entry_type_id).icon"
:class="getIcon(gdt_entry_type_id).class"
/>
</div>
<!-- Collaps Button -->
<div class="text-right" style="width: 96%; position: absolute">
<b-button class="btn-sm">
@ -147,6 +155,12 @@
import communityAPI from '../../../apis/communityAPI'
import PaginationButtons from '../../../components/PaginationButtons'
const iconsByType = {
7: { icon: 'gift', classes: 'gradido-global-color-accent' },
4: { icon: 'person-check', classes: 'gradido-global-color-accent' },
1: { icon: 'heart', classes: 'gradido-global-color-accent' },
}
export default {
name: 'gdt-transaction-list',
components: {
@ -185,6 +199,18 @@ export default {
this.$toasted.error(result.result.message)
}
},
getIcon(givenType) {
const type = iconsByType[givenType]
if (type)
return {
icon: type.icon,
class: type.classes + ' m-mb-1 font2em',
}
this.throwError('no icon to given type')
},
throwError(msg) {
throw new Error(msg)
},
showNext() {
this.currentPage++
this.updateGdt()