Merge branch 'master' into grass_instead_of_sass

This commit is contained in:
einhornimmond 2025-05-20 16:46:24 +02:00 committed by GitHub
commit 29078f5c06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 31 additions and 9 deletions

View File

@ -209,7 +209,7 @@ jobs:
##########################################################################
- name: Database | Build `up` image
run: |
docker build --target up -t "gradido/database:up" database/
docker build -f ./database/Dockerfile --target up -t "gradido/database:up" .
docker save "gradido/database:up" > /tmp/database_up.tar
- name: Upload Artifact
uses: actions/upload-artifact@v4

View File

@ -81,6 +81,8 @@ watch(
const normalizeAmount = (inputValue) => {
amountFocused.value = false
value.value = inputValue.replace(',', '.')
if (typeof inputValue === 'string' && inputValue.length > 1) {
value.value = inputValue.replace(',', '.')
}
}
</script>

View File

@ -1,6 +1,6 @@
<template>
<div class="redeem-logged-out">
<redeem-information v-bind="props.linkData" :is-contribution-link="props.isContributionLink" />
<redeem-information :link-data="linkData" :is-contribution-link="isContributionLink" />
<BCard>
<div class="mb-2">
@ -27,7 +27,7 @@
import { useAuthLinks } from '@/composables/useAuthLinks'
const { login, register } = useAuthLinks()
const props = defineProps({
defineProps({
linkData: { type: Object, required: true },
isContributionLink: { type: Boolean, default: false },
})

View File

@ -1,6 +1,6 @@
<template>
<div class="redeem-self-creator">
<redeem-information v-bind="linkData" :is-contribution-link="isContributionLink" />
<redeem-information :link-data="linkData" :is-contribution-link="isContributionLink" />
<BCard>
<div class="mb-3 text-center">

View File

@ -41,6 +41,7 @@ const features = {
GMS_ACTIVE: process.env.GMS_ACTIVE === 'true',
HUMHUB_ACTIVE: process.env.HUMHUB_ACTIVE === 'true',
AUTO_POLL_INTERVAL: Number.parseInt(process.env.AUTO_POLL_INTERVAL ?? 0),
CROSS_TX_REDEEM_LINK_ACTIVE: process.env.CROSS_TX_REDEEM_LINK_ACTIVE === 'true',
}
const environment = {

View File

@ -54,6 +54,11 @@ module.exports = Joi.object({
.description('URL for Register a new Account in frontend.')
.required(),
CROSS_TX_REDEEM_LINK_ACTIVE: Joi.boolean()
.description('Enable cross-community redeem links')
.default(false)
.optional(),
FRONTEND_HOSTING: Joi.string()
.valid('nodejs', 'nginx')
.description('set to `nodejs` if frontend is hosted by vite with a own nodejs instance')

View File

@ -2,6 +2,9 @@
<div class="show-transaction-link-informations">
<div v-if="isTransactionLinkLoaded" class="mt-4">
<transaction-link-item :type="itemTypeExt">
<template #LOGGED_OUT>
<redeem-logged-out :link-data="linkData" :is-contribution-link="isContributionLink" />
</template>
<template #REDEEM_SELECT_COMMUNITY>
<redeem-select-community
:link-data="linkData"
@ -40,6 +43,7 @@ import { useRoute, useRouter } from 'vue-router'
import { useStore } from 'vuex'
import { useQuery, useMutation } from '@vue/apollo-composable'
import TransactionLinkItem from '@/components/TransactionLinkItem'
import RedeemLoggedOut from '@/components/LinkInformations/RedeemLoggedOut'
import RedeemSelectCommunity from '@/components/LinkInformations/RedeemSelectCommunity'
import RedeemSelfCreator from '@/components/LinkInformations/RedeemSelfCreator'
import RedeemValid from '@/components/LinkInformations/RedeemValid'
@ -48,6 +52,7 @@ import { useAppToast } from '@/composables/useToast'
import { queryTransactionLink } from '@/graphql/queries'
import { disburseTransactionLink, redeemTransactionLink } from '@/graphql/mutations'
import { useI18n } from 'vue-i18n'
import CONFIG from '@/config'
const { toastError, toastSuccess } = useAppToast()
const router = useRouter()
@ -160,7 +165,11 @@ const itemType = computed(() => {
if (store.state.token && store.state.tokenTime) {
if (tokenExpiresInSeconds.value < 5) {
// console.log('TransactionLink.itemType... REDEEM_SELECT_COMMUNITY')
return 'REDEEM_SELECT_COMMUNITY'
if (CONFIG.CROSS_TX_REDEEM_LINK_ACTIVE) {
return 'REDEEM_SELECT_COMMUNITY'
} else {
return 'LOGGED_OUT'
}
}
}
// console.log(
@ -207,8 +216,12 @@ const itemType = computed(() => {
return 'VALID'
}
}
// console.log('TransactionLink.itemType...last return= REDEEM_SELECT_COMMUNITY')
return 'REDEEM_SELECT_COMMUNITY'
if (CONFIG.CROSS_TX_REDEEM_LINK_ACTIVE) {
// console.log('TransactionLink.itemType...last return= REDEEM_SELECT_COMMUNITY')
return 'REDEEM_SELECT_COMMUNITY'
} else {
return 'LOGGED_OUT'
}
})
const itemTypeExt = computed(() => {

View File

@ -6,7 +6,7 @@ export const isLanguageKey = (str) =>
export const translateYupErrorString = (error, t) => {
const type = typeof error
if (type === 'object') {
if (type === 'object' && error.key && typeof error.key === 'string') {
return t(error.key, error.values)
} else if (type === 'string' && error.length > 0 && isLanguageKey(error)) {
return t(error)

View File

@ -113,6 +113,7 @@ export default defineConfig(async ({ command }) => {
EnvironmentPlugin({
AUTO_POLL_INTERVAL: CONFIG.AUTO_POLL_INTERVAL,
BUILD_COMMIT: CONFIG.BUILD_COMMIT,
CROSS_TX_REDEEM_LINK_ACTIVE: CONFIG.CROSS_TX_REDEEM_LINK_ACTIVE,
GMS_ACTIVE: CONFIG.GMS_ACTIVE,
HUMHUB_ACTIVE: CONFIG.HUMHUB_ACTIVE,
DEFAULT_PUBLISHER_ID: null,