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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user