all headings centre col 12, all b-row in offset 1 and col 11

This commit is contained in:
Wolgang Huß 2022-04-20 09:31:17 +02:00 committed by ogerly
parent 897c39c85c
commit d6f25b6f98
7 changed files with 133 additions and 60 deletions

View File

@ -1,15 +1,15 @@
<template> <template>
<div class="decayinformation-decay"> <div class="decayinformation-decay">
<b-row> <b-row>
<b-col cols="1"></b-col> <b-col>
<b-col cols="11"> <div class="text-center pb-3">
<div class="d-flex">
<div class="text-center pb-3 gradido-max-width">
<b-icon icon="droplet-half" class="mr-2" /> <b-icon icon="droplet-half" class="mr-2" />
<b>{{ $t('decay.calculation_decay') }}</b> <b>{{ $t('decay.calculation_decay') }}</b>
</div> </div>
</div> </b-col>
</b-row>
<b-row>
<b-col offset="1" cols="11">
<b-row> <b-row>
<b-col cols="5" class="text-right"> <b-col cols="5" class="text-right">
<div>{{ $t('decay.decay') }}</div> <div>{{ $t('decay.decay') }}</div>

View File

@ -1,11 +1,22 @@
<template> <template>
<div class="decayinformation-startblock"> <div class="decayinformation-startblock">
<b-row> <b-row>
<b-col cols="12" class="text-center"> <b-col cols="12">
<div> <div class="text-center pb-3">
<div class="display-4">{{ $t('decay.Starting_block_decay') }}</div> <b-icon icon="droplet-half" class="mr-2" />
<b>{{ $t('decay.Starting_block_decay') }}</b>
</div>
</b-col>
</b-row>
<b-row>
<b-col offset="1" cols="11">
<b-row>
<b-col cols="5">
<div class="text-right">
<div>{{ $t('decay.decay_introduced') }}</div> <div>{{ $t('decay.decay_introduced') }}</div>
</div> </div>
</b-col>
<b-col cols="5">
<div> <div>
<span v-if="decay.start"> <span v-if="decay.start">
{{ $d(new Date(decay.start), 'long') }} {{ $d(new Date(decay.start), 'long') }}
@ -13,41 +24,55 @@
</div> </div>
</b-col> </b-col>
</b-row> </b-row>
<duration-row :decayStart="decay.start" :decayEnd="decay.end" />
<!-- Decay--> <!-- Decay-->
<b-row> <b-row>
<b-col cols="6" class="text-right">{{ $t('decay.decay') }}</b-col> <b-col cols="5" class="text-right">{{ $t('decay.decay') }}</b-col>
<b-col cols="6">{{ decay.decay | GDD }}</b-col> <b-col cols="7">{{ decay.decay | GDD }}</b-col>
</b-row> </b-row>
<hr class="mt-2 mb-2" /> </b-col>
</b-row>
<hr class="mt-3 mb-3" />
<b-row> <b-row>
<b-col class="text-center pt-3 pb-2"> <b-col class="text-center pb-3">
<b>{{ $t('decay.calculation_total') }}</b> <b>{{ $t('decay.calculation_total') }}</b>
</b-col> </b-col>
</b-row> </b-row>
<!-- Type--> <!-- Type-->
<b-row>
<b-col offset="1" cols="11">
<b-row> <b-row>
<!-- eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys--> <!-- eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys-->
<b-col cols="6" class="text-right">{{ $t(`decay.types.${typeId.toLowerCase()}`) }}</b-col> <b-col cols="5" class="text-right">{{ $t(`decay.types.${typeId.toLowerCase()}`) }}</b-col>
<b-col cols="6">{{ amount | GDD }}</b-col> <b-col cols="7">{{ amount | GDD }}</b-col>
</b-row> </b-row>
<!-- Decay--> <!-- Decay-->
<b-row> <b-row>
<b-col cols="6" class="text-right">{{ $t('decay.decay') }}</b-col> <b-col cols="5" class="text-right">{{ $t('decay.decay') }}</b-col>
<b-col cols="6">{{ decay.decay | GDD }}</b-col> <b-col cols="7">{{ decay.decay | GDD }}</b-col>
</b-row> </b-row>
<!-- Total--> <!-- Total-->
<b-row> <b-row>
<b-col cols="6" class="text-right">{{ $t('decay.total') }}</b-col> <b-col cols="5" class="text-right">{{ $t('decay.total') }}</b-col>
<b-col cols="6"> <b-col cols="7">
<b>{{ (Number(amount) + Number(decay.decay)) | GDD }}</b> <b>{{ (Number(amount) + Number(decay.decay)) | GDD }}</b>
</b-col> </b-col>
</b-row> </b-row>
</b-col>
</b-row>
</div> </div>
</template> </template>
<script> <script>
import DurationRow from '@/components/TransactionRows/DurationRow.vue'
export default { export default {
name: 'DecayInformation-StartBlock', name: 'DecayInformation-StartBlock',
components: {
DurationRow,
},
props: { props: {
balanceDate: { type: String }, balanceDate: { type: String },
amount: { amount: {

View File

@ -1,15 +1,17 @@
<template> <template>
<div class="decayinformation-long"> <div class="decayinformation-long">
<b-row> <b-row>
<b-col cols="1"></b-col> <b-col>
<b-col cols="11"> <div>
<div class="d-flex"> <div class="text-center pb-3">
<div class="text-center pb-3 gradido-max-width">
<b-icon icon="droplet-half" class="mr-2" /> <b-icon icon="droplet-half" class="mr-2" />
<b>{{ $t('decay.calculation_decay') }}</b> <b>{{ $t('decay.calculation_decay') }}</b>
</div> </div>
</div> </div>
</b-col>
</b-row>
<b-row>
<b-col offset="1" cols="11">
<b-row> <b-row>
<b-col cols="5" class="text-right"> <b-col cols="5" class="text-right">
<div>{{ $t('decay.last_transaction') }}</div> <div>{{ $t('decay.last_transaction') }}</div>
@ -22,14 +24,7 @@
</div> </div>
</b-col> </b-col>
</b-row> </b-row>
<b-row> <duration-row :decayStart="decay.start" :decayEnd="decay.end" />
<b-col cols="5" class="text-right">
<div>{{ $t('decay.past_time') }}</div>
</b-col>
<b-col cols="7">
<span v-if="duration">{{ durationText }}</span>
</b-col>
</b-row>
<!-- Decay--> <!-- Decay-->
<b-row> <b-row>
@ -38,13 +33,17 @@
</b-col> </b-col>
<b-col cols="7">{{ decay.decay | GDD }}</b-col> <b-col cols="7">{{ decay.decay | GDD }}</b-col>
</b-row> </b-row>
<hr class="mt-2 mb-2" /> </b-col>
</b-row>
<hr class="mt-3 mb-3" />
<b-row> <b-row>
<b-col class="text-center pt-3 pb-2"> <b-col class="text-center pb-3">
<b>{{ $t('decay.calculation_total') }}</b> <b>{{ $t('decay.calculation_total') }}</b>
</b-col> </b-col>
</b-row> </b-row>
<!-- Type--> <!-- Type-->
<b-row>
<b-col offset="1" cols="11">
<b-row> <b-row>
<!-- eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys--> <!-- eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys-->
<b-col cols="5" class="text-right">{{ $t(`decay.types.${typeId.toLowerCase()}`) }}</b-col> <b-col cols="5" class="text-right">{{ $t(`decay.types.${typeId.toLowerCase()}`) }}</b-col>
@ -69,8 +68,13 @@
</div> </div>
</template> </template>
<script> <script>
import DurationRow from '@/components/TransactionRows/DurationRow.vue'
export default { export default {
name: 'DecayInformation-Long', name: 'DecayInformation-Long',
components: {
DurationRow,
},
props: { props: {
amount: { type: String, default: '0' }, amount: { type: String, default: '0' },
typeId: { type: String, default: '' }, typeId: { type: String, default: '' },

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="gdt-transaction-collapse p-2 pt-4 pb-4 mb-4 gradido-no-border gradido-background-f1"> <div class="gdt-transaction-collapse p-2 pt-4 pb-4 mb-4 gradido-no-border bg-secondary">
<b-row class="gdt-list-collapse-header-text text-center pb-3"> <b-row class="gdt-list-collapse-header-text text-center pb-3">
<b-col class="collapse-headline"> <b-col class="collapse-headline">
<b>{{ getLinesByType.headline }}</b> <b>{{ getLinesByType.headline }}</b>

View File

@ -0,0 +1,44 @@
<template>
<div class="duration-row">
<b-row>
<b-col cols="5" class="text-right">
<div>{{ $t('decay.past_time') }}</div>
</b-col>
<b-col cols="7">
<span v-if="duration">{{ durationText }}</span>
</b-col>
</b-row>
</div>
</template>
<script>
export default {
name: 'DurationRow',
props: {
decayStart: {
type: String,
required: true,
},
decayEnd: {
type: String,
required: true,
},
},
computed: {
duration() {
return this.$moment.duration(new Date(this.decayEnd) - new Date(this.decayStart))._data
},
durationText() {
const order = ['years', 'months', 'days', 'hours', 'minutes', 'seconds']
const result = []
order.forEach((timeSpan) => {
if (this.duration[timeSpan] > 0) {
// eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys
const locale = this.$t(`time.${timeSpan}`)
result.push(`${this.duration[timeSpan]} ${locale}`)
}
})
return result.join(', ')
},
},
}
</script>

View File

@ -20,7 +20,7 @@
</b-row> </b-row>
</div> </div>
<b-collapse class="pb-4 pt-5" v-model="visible"> <b-collapse :class="visible ? 'bg-secondary' : ''" class="pb-4 pt-5" v-model="visible">
<decay-information-decay <decay-information-decay
:balance="balance" :balance="balance"
:decay="decay.decay" :decay="decay.decay"

View File

@ -5,7 +5,7 @@
const pkg = require('../../package') const pkg = require('../../package')
const constants = { const constants = {
DECAY_START_TIME: new Date('2021-05-13 17:46:31'), // GMT+0 DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
CONFIG_VERSION: { CONFIG_VERSION: {
DEFAULT: 'DEFAULT', DEFAULT: 'DEFAULT',
EXPECTED: 'v1.2022-03-18', EXPECTED: 'v1.2022-03-18',