diff --git a/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityCommentTranslatedBody.vue b/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityCommentTranslatedBody.vue index b35a5b87..b53152c6 100644 --- a/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityCommentTranslatedBody.vue +++ b/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityCommentTranslatedBody.vue @@ -15,29 +15,21 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> @@ -61,9 +53,6 @@ export default { data: () => ({ translatedBody: null, translationHidden: true, - alert: false, - type: '', - message: '' }), computed: { isTranslatedBodyNotEmpty() { @@ -87,10 +76,7 @@ export default { }); document.addEventListener('activity-translation-error', (event) => { if (event.detail.id === this.activity.id) { - this.displayMessage({ - type: 'error', - message: this.$t('automaticTranslation.errorTranslation') - }); + this.$root.$emit('alert-message', this.$t('automaticTranslation.errorTranslation'), 'error'); } }); this.retrieveCommentProperties(); @@ -111,13 +97,6 @@ export default { this.translationHidden=false; this.$el.parentNode.parentNode.firstChild.classList.add('hide'); }, - displayMessage(message) { - this.message=message.message; - this.type=message.type; - this.alert = true; - window.setTimeout(() => this.alert = false, 5000); - } - }, }; diff --git a/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityTranslatedBody.vue b/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityTranslatedBody.vue index 91fe8b77..d349798e 100644 --- a/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityTranslatedBody.vue +++ b/webapps/src/main/webapp/javascript/automatic-translation/components/ActivityTranslatedBody.vue @@ -15,33 +15,25 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . -->