Merge remote-tracking branch 'origin/master' into 1798-feature-gradidoid-1-adapt-and-migrate-database-schema

This commit is contained in:
Claus-Peter Hübner 2022-08-26 02:29:38 +02:00
commit 5c9c63aa07
15 changed files with 40 additions and 266 deletions

View File

@ -89,7 +89,6 @@ export default {
this.$apollo
.query({
query: communityStatistics,
fetchPolicy: 'network-only',
})
.then((result) => {
this.statistics.totalUsers = result.data.communityStatistics.totalUsers

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -1,133 +0,0 @@
<template>
<div
class="mobil-start-box position-fixed h-100 d-inline d-sm-inline d-md-inline d-lg-none zindex1000"
>
<div class="position-absolute h1 text-white zindex1000 w-100 text-center mt-8">
{{ $t('auth.left.gratitude') }}
</div>
<div class="position-absolute h2 text-white zindex1000 w-100 text-center mt-9">
{{ $t('auth.left.oneGratitude') }}
</div>
<img
src="/img/template/Blaetter.png"
class="sheet-img position-absolute d-block d-lg-none zindex1000"
/>
<b-img
id="img0"
class="position-absolute zindex1000"
src="/img/template/logo-header.png"
alt="start background image"
></b-img>
<b-img
fluid
id="img1"
class="position-absolute h-100 w-100 overflow-hidden zindex100"
src="/img/template/gold_03.png"
alt="start background image"
></b-img>
<b-img
id="img2"
class="position-absolute zindex100"
src="/img/template/gradido_background_header.png"
alt="start background image"
></b-img>
<b-img
id="img3"
class="position-relative zindex10"
src="/img/template/Foto_01.jpg"
alt="start background image"
></b-img>
<div class="mobil-start-box-text position-fixed w-100 text-center zindex1000">
<b-button variant="gradido" to="/register" @click="$emit('set-mobile-start', false)">
{{ $t('signup') }}
</b-button>
<div class="mt-3 h3 text-white">
{{ $t('auth.left.hasAccount') }}
<b-link
to="/login"
class="text-gradido gradido-global-color-blue"
@click="$emit('set-mobile-start', false)"
>
{{ $t('auth.left.hereLogin') }}
</b-link>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'AuthMobileStart',
props: {
mobileStart: { type: Boolean, default: false },
},
}
</script>
<style>
.mobil-start-box-text {
bottom: 65px;
}
/* logo */
.mobil-start-box #img0 {
width: 200px;
}
/* background logo */
.mobil-start-box #img2 {
width: 230px;
}
/* background maske */
@media screen and (max-width: 1024px) {
.mobil-start-box #img3 {
width: 100%;
top: -100px;
}
}
@media screen and (max-width: 991px) {
.mobil-start-box #img3 {
width: 100%;
top: -148px;
}
}
@media screen and (max-height: 740px) {
.mobil-start-box #img3 {
width: 115%;
}
}
@media screen and (max-width: 650px) {
.mobil-start-box #img3 {
width: 115%;
top: 66px;
}
}
@media screen and (max-width: 450px) {
.mobil-start-box #img3 {
width: 160%;
left: -71px;
top: 35px;
min-width: 360px;
}
}
@media screen and (max-width: 310px) {
.mobil-start-box #img3 {
width: 145%;
left: -94px;
top: 24px;
min-width: 360px;
}
}
@media screen and (max-height: 700px) {
.mobil-start-box #img3 {
top: -104px;
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div class="auth-header position-sticky">
<b-navbar toggleable="lg" class="pr-4">
<b-navbar-brand>
<b-navbar :toggleable="false" class="pr-4">
<b-navbar-brand class="d-none d-lg-block">
<b-img
class="imgLogo position-absolute ml--3 mt-lg--2 mt-3 p-2 zindex1000"
:src="logo"
@ -16,13 +16,8 @@
></b-img>
</b-navbar-brand>
<b-img class="sheet-img position-absolute d-block d-lg-none zindex1000" :src="sheet"></b-img>
<b-navbar-toggle target="nav-collapse" class="zindex1000"></b-navbar-toggle>
<b-collapse id="nav-collapse" is-nav class="ml-5">
<b-navbar-nav class="ml-auto" right>
<b-nav-item :href="`https://gradido.net/${$i18n.locale}`" target="_blank">
{{ $t('auth.navbar.aboutGradido') }}
</b-nav-item>
<b-navbar-nav class="ml-auto d-none d-lg-flex" right>
<b-nav-item to="/register" class="authNavbar ml-lg-5">{{ $t('signup') }}</b-nav-item>
<span class="d-none d-lg-block mt-1">{{ $t('math.pipe') }}</span>
<b-nav-item to="/login" class="authNavbar">{{ $t('signin') }}</b-nav-item>
@ -49,18 +44,10 @@ export default {
color: #0e79bc !important;
}
.navbar-toggler {
font-size: 2.25rem;
}
.authNavbar > .router-link-exact-active {
color: #383838 !important;
}
button.navbar-toggler > span.navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(4, 112, 6, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.auth-header {
font-family: 'Open Sans', sans-serif !important;
}

View File

@ -1,6 +1,6 @@
<template>
<div class="navbar-small">
<b-navbar>
<b-navbar class="navi">
<b-navbar-nav>
<b-nav-item to="/register" class="authNavbar">{{ $t('signup') }}</b-nav-item>
<span class="mt-1">{{ $t('math.pipe') }}</span>
@ -15,3 +15,9 @@ export default {
name: 'AuthNavbarSmall',
}
</script>
<style scoped>
.navi {
margin-left: 0px;
padding-left: 0px;
}
</style>

View File

@ -1,14 +1,18 @@
<template>
<div class="language-switch">
<span
v-for="lang in locales"
:key="lang.code"
class="pointer"
:class="$store.state.language === lang.code ? 'c-grey' : 'c-blau'"
>
<span v-if="lang.code === $store.state.language" class="locales mr-1">{{ lang.name }}</span>
</span>
<b-icon v-b-toggle.collapse-1 icon="caret-down-fill" aria-hidden="true"></b-icon>
<div v-b-toggle.collapse-1>
<span
v-for="lang in locales"
:key="lang.code"
class="pointer"
:class="$store.state.language === lang.code ? 'c-grey' : 'c-blau'"
>
<span v-if="lang.code === $store.state.language" class="locales mr-1">
{{ lang.name }}
</span>
</span>
<b-icon icon="caret-down-fill" aria-hidden="true"></b-icon>
</div>
<b-collapse id="collapse-1" class="mt-4">
<span
v-for="(lang, index) in locales"

View File

@ -36,20 +36,6 @@ describe('AuthLayout', () => {
wrapper = Wrapper()
})
describe('Mobile Version Start', () => {
beforeEach(() => {
wrapper.findComponent({ name: 'AuthMobileStart' }).vm.$emit('set-mobile-start', true)
})
it('has Component AuthMobileStart', () => {
expect(wrapper.findComponent({ name: 'AuthMobileStart' }).exists()).toBe(true)
})
it('has Component AuthNavbarSmall', () => {
expect(wrapper.findComponent({ name: 'AuthNavbarSmall' }).exists()).toBe(true)
})
})
describe('Desktop Version Start', () => {
beforeEach(() => {
wrapper.vm.mobileStart = false

View File

@ -1,10 +1,5 @@
<template>
<div class="auth-template">
<auth-mobile-start
v-if="mobileStart"
class="d-inline d-lg-none zindex10000"
@set-mobile-start="setMobileStart"
/>
<div class="h-100 align-middle">
<auth-navbar class="zindex10" />
@ -20,11 +15,11 @@
</b-link>
</div>
</div>
<b-row class="justify-content-md-center">
<b-col sm="12" md="8" offset-lg="6" lg="6" class="zindex1000">
<div class="right-content-box ml-3 ml-sm-4 mr-3 mr-sm-4">
<b-row class="justify-content-md-center justify-content-lg-end">
<b-col sm="12" md="8" lg="6" class="zindex1000">
<div class="ml-3 ml-sm-4 mr-3 mr-sm-4">
<b-row class="d-none d-md-block d-lg-none">
<b-col class="mb--4 d-flex justify-content-end">
<b-col class="mb--4">
<auth-navbar-small />
</b-col>
</b-row>
@ -74,20 +69,18 @@
</b-col>
</b-row>
<b-card-body class="">
<router-view @set-mobile-start="setMobileStart"></router-view>
<router-view></router-view>
</b-card-body>
</b-card>
</div>
<auth-footer v-if="!$route.meta.hideFooter" class="pr-5 mb-5"></auth-footer>
</b-col>
</b-row>
<!-- <auth-layout-gdd />-->
</div>
</div>
</template>
<script>
import AuthMobileStart from '@/components/Auth/AuthMobileStart.vue'
import AuthNavbar from '@/components/Auth/AuthNavbar.vue'
import AuthNavbarSmall from '@/components/Auth/AuthNavbarSmall.vue'
import AuthCarousel from '@/components/Auth/AuthCarousel.vue'
@ -98,7 +91,6 @@ import CONFIG from '@/config'
export default {
name: 'AuthLayout',
components: {
AuthMobileStart,
AuthNavbar,
AuthNavbarSmall,
AuthCarousel,
@ -107,14 +99,10 @@ export default {
},
data() {
return {
mobileStart: true,
communityName: CONFIG.COMMUNITY_NAME,
}
},
methods: {
setMobileStart(boolean) {
this.mobileStart = boolean
},
setTextSize(size) {
this.$refs.pageFontSize.style.fontSize = size + 'rem'
},

View File

@ -9,15 +9,10 @@
"dignity": "Würde",
"donation": "Gabe",
"gratitude": "Dankbarkeit",
"hasAccount": "Du hast schon einen Account?",
"hereLogin": "Hier Anmelden",
"learnMore": "Erfahre mehr …",
"oneDignity": "Wir schenken einander und danken mit Gradido.",
"oneDonation": "Du bist ein Geschenk für die Gemeinschaft. 1000 Dank, weil du bei uns bist.",
"oneGratitude": "Für einander, für alle Menschen, für die Natur."
},
"navbar": {
"aboutGradido": "Über Gradido"
}
},
"back": "Zurück",
@ -309,12 +304,9 @@
}
},
"statistic": {
"activeUsers": "Aktive Mitglieder",
"deletedUsers": "Gelöschte Mitglieder",
"totalGradidoAvailable": "GDD insgesamt im Umlauf",
"totalGradidoCreated": "GDD insgesamt geschöpft",
"totalGradidoDecayed": "GDD insgesamt verfallen",
"totalGradidoUnbookedDecayed": "Gesamter ungebuchter GDD Verfall"
"totalGradidoDecayed": "GDD insgesamt verfallen"
},
"success": "Erfolg",
"time": {

View File

@ -9,15 +9,10 @@
"dignity": "Dignity",
"donation": "Donation",
"gratitude": "Gratitude",
"hasAccount": "You already have an account?",
"hereLogin": "Log in here",
"learnMore": "Learn more …",
"oneDignity": "We gift to each other and give thanks with Gradido.",
"oneDonation": "You are a gift for the community. 1000 thanks because you are with us.",
"oneGratitude": "For each other, for all people, for nature."
},
"navbar": {
"aboutGradido": "About Gradido"
}
},
"back": "Back",
@ -309,12 +304,9 @@
}
},
"statistic": {
"activeUsers": "Active members",
"deletedUsers": "Deleted members",
"totalGradidoAvailable": "Total GDD in circulation",
"totalGradidoCreated": "Total created GDD",
"totalGradidoDecayed": "Total GDD decay",
"totalGradidoUnbookedDecayed": "Total unbooked GDD decay"
"totalGradidoCreated": "Total GDD created",
"totalGradidoDecayed": "Total GDD decayed"
},
"success": "Success",
"time": {

View File

@ -9,15 +9,10 @@
"dignity": "Dignidad",
"donation": "Donación",
"gratitude": "Gratitud",
"hasAccount": "Ya estas registrado?",
"hereLogin": "Regístrate aquí",
"learnMore": "Infórmate aquí …",
"oneDignity": "Damos los unos a los otros y agradecemos con Gradido.",
"oneDonation": "Eres un regalo para la comunidad. 1000 gracias por estar con nosotros.",
"oneGratitude": "Por los demás, por toda la humanidad, por la naturaleza."
},
"navbar": {
"aboutGradido": "Sobre Gradido"
}
},
"back": "Volver",
@ -309,12 +304,9 @@
}
},
"statistic": {
"activeUsers": "miembros activos",
"deletedUsers": "miembros eliminados",
"totalGradidoAvailable": "GDD total en circulación",
"totalGradidoCreated": "GDD total creado",
"totalGradidoDecayed": "GDD total decaído",
"totalGradidoUnbookedDecayed": "GDD no contabilizado decaído"
"totalGradidoDecayed": "GDD total decaído"
},
"success": "Lo lograste",
"time": {

View File

@ -9,15 +9,10 @@
"dignity": "Dignité",
"donation": "Donation",
"gratitude": "Gratitude",
"hasAccount": "Avez-vous déjà un compte?",
"hereLogin": "Connectez-vous ici",
"learnMore": "Pour plus de détails …",
"oneDignity": "Nous nous donnons mutuellement et rendons grâce avec Gradido.",
"oneDonation": "Vous êtes précieux pour la communauté. 1000 mercis dêtre parmi nous.",
"oneGratitude": "Les uns pour les autres, pour tout le monde, pour la nature."
},
"navbar": {
"aboutGradido": "À propos de Gradido"
}
},
"back": "Retour",
@ -309,12 +304,9 @@
}
},
"statistic": {
"activeUsers": "Membres actifs",
"deletedUsers": "Membres supprimés",
"totalGradidoAvailable": "GDD total en circulation",
"totalGradidoCreated": "GDD total puisé",
"totalGradidoDecayed": "Total de GDD écoulé",
"totalGradidoUnbookedDecayed": "Total GDD non comptabilisé écoulé"
"totalGradidoDecayed": "Total de GDD écoulé"
},
"success": "Avec succès",
"time": {

View File

@ -9,15 +9,10 @@
"dignity": "Waardigheid",
"donation": "Gift",
"gratitude": "Dankbaarheid",
"hasAccount": "Je hebt al een rekening?",
"hereLogin": "Hier aanmelden",
"learnMore": "Meer ervaren …",
"oneDignity": "We geven aan elkaar en bedanken met Gradido.",
"oneDonation": "Jij bent een geschenk voor de gemeenschap. 1000 dank dat je bij ons bent.",
"oneGratitude": "Voor elkaar, voor alle mensen, voor de natuur."
},
"navbar": {
"aboutGradido": "Over Gradido"
}
},
"back": "Terug",
@ -309,12 +304,9 @@
}
},
"statistic": {
"activeUsers": "Actieve leden",
"deletedUsers": "Verwijderde leden",
"totalGradidoAvailable": "Totaal GDD in omloop",
"totalGradidoCreated": "Totaal GDD geschept",
"totalGradidoDecayed": "Totaal GDD vervallen",
"totalGradidoUnbookedDecayed": "Totaal niet geboekte GDD vervallen"
"totalGradidoDecayed": "Totaal GDD vervallen"
},
"success": "Succes",
"time": {

View File

@ -45,12 +45,12 @@ const apolloQueryMock = jest
data: {
communityStatistics: {
totalUsers: 3113,
activeUsers: 1057,
deletedUsers: 35,
// activeUsers: 1057,
// deletedUsers: 35,
totalGradidoCreated: '4083774.05000000000000000000',
totalGradidoDecayed: '-1062639.13634129622923372197',
totalGradidoAvailable: '2513565.869444365732411569',
totalGradidoUnbookedDecayed: '-500474.6738366222166261272',
// totalGradidoUnbookedDecayed: '-500474.6738366222166261272',
},
},
})
@ -86,7 +86,6 @@ describe('InfoStatistic', () => {
expect(apolloQueryMock).toBeCalledWith(
expect.objectContaining({
query: listContributionLinks,
fetchPolicy: 'network-only',
}),
)
})
@ -95,7 +94,6 @@ describe('InfoStatistic', () => {
expect(apolloQueryMock).toBeCalledWith(
expect.objectContaining({
query: searchAdminUsers,
fetchPolicy: 'network-only',
}),
)
})
@ -104,7 +102,6 @@ describe('InfoStatistic', () => {
expect(apolloQueryMock).toBeCalledWith(
expect.objectContaining({
query: communityStatistics,
fetchPolicy: 'network-only',
}),
)
})

View File

@ -51,14 +51,6 @@
{{ $t('community.members') }}
<span class="h4">{{ totalUsers }}</span>
</div>
<div>
{{ $t('statistic.activeUsers') }}
<span class="h4">{{ activeUsers }}</span>
</div>
<div>
{{ $t('statistic.deletedUsers') }}
<span class="h4">{{ deletedUsers }}</span>
</div>
<div>
{{ $t('statistic.totalGradidoCreated') }}
<span class="h4">{{ totalGradidoCreated | GDD }}</span>
@ -71,10 +63,6 @@
{{ $t('statistic.totalGradidoAvailable') }}
<span class="h4">{{ totalGradidoAvailable | GDD }}</span>
</div>
<div>
{{ $t('statistic.totalGradidoUnbookedDecayed') }}
<span class="h4">{{ totalGradidoUnbookedDecayed | GDD }}</span>
</div>
</div>
</b-container>
</div>
@ -95,12 +83,9 @@ export default {
supportMail: 'support@supportemail.de',
membersCount: '1203',
totalUsers: null,
activeUsers: null,
deletedUsers: null,
totalGradidoCreated: null,
totalGradidoDecayed: null,
totalGradidoAvailable: null,
totalGradidoUnbookedDecayed: null,
}
},
methods: {
@ -108,7 +93,6 @@ export default {
this.$apollo
.query({
query: listContributionLinks,
fetchPolicy: 'network-only',
})
.then((result) => {
this.count = result.data.listContributionLinks.count
@ -122,7 +106,6 @@ export default {
this.$apollo
.query({
query: searchAdminUsers,
fetchPolicy: 'network-only',
})
.then((result) => {
this.countAdminUser = result.data.searchAdminUsers.userCount
@ -136,17 +119,14 @@ export default {
this.$apollo
.query({
query: communityStatistics,
fetchPolicy: 'network-only',
})
.then((result) => {
this.totalUsers = result.data.communityStatistics.totalUsers
this.activeUsers = result.data.communityStatistics.activeUsers
this.deletedUsers = result.data.communityStatistics.deletedUsers
this.totalGradidoCreated = result.data.communityStatistics.totalGradidoCreated
this.totalGradidoCreated =
Number(result.data.communityStatistics.totalGradidoCreated) -
Number(result.data.communityStatistics.totalGradidoUnbookedDecayed)
this.totalGradidoDecayed = result.data.communityStatistics.totalGradidoDecayed
this.totalGradidoAvailable = result.data.communityStatistics.totalGradidoAvailable
this.totalGradidoUnbookedDecayed =
result.data.communityStatistics.totalGradidoUnbookedDecayed
})
.catch(() => {
this.toastError('communityStatistics has no result, use default data')