Changes for eveai_chat_client:

- Modal display of privacy statement & Terms & Conditions
- Consent-flag ==> check of privacy and Terms & Conditions
- customisation option added to show or hide DynamicForm titles
This commit is contained in:
Josako
2025-07-28 21:47:56 +02:00
parent ef138462d9
commit 5e81595622
28 changed files with 1609 additions and 2271 deletions

View File

@@ -34,17 +34,17 @@ const props = defineProps({
}
});
// Use component translations from provider
const originalTexts = computed(() => ({
// Use component translations from provider - fix: use reactive object instead of computed
const originalTexts = {
explanation: props.originalText || ''
}));
};
const { translations, isLoading, error, currentLanguage } = useComponentTranslations(
const { texts: translations, isLoading, error, currentLanguage } = useComponentTranslations(
'sidebar_explanation',
originalTexts.value
originalTexts
);
const translatedText = computed(() => translations.value.explanation || props.originalText);
const translatedText = computed(() => translations.value?.explanation || props.originalText);
// Render markdown content
const renderedExplanation = computed(() => {
@@ -61,12 +61,11 @@ const renderedExplanation = computed(() => {
});
// Watch for text changes to update the provider
watch(() => props.originalText, () => {
// Update original texts when prop changes
originalTexts.value = {
explanation: props.originalText || ''
};
});
watch(() => props.originalText, (newText) => {
// Re-register component with new text if needed
// The LanguageProvider will handle the update automatically
console.log('SideBarExplanation: Original text changed to:', newText);
}, { immediate: true });
</script>
<style scoped>