From d73fd0cbb75d7080f3c55612e727e62e78b6ef8e Mon Sep 17 00:00:00 2001 From: Markus Date: Thu, 13 Jul 2023 22:35:48 +0200 Subject: [PATCH 1/2] [bug] chat language is now reactive --- webapp/components/Chat/Chat.vue | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 8aeb4e7de..855f1e14b 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -114,20 +114,6 @@ export default { text: 'This is the action', }, ], - textMessages: { - ROOMS_EMPTY: this.$t('chat.roomsEmpty'), - ROOM_EMPTY: this.$t('chat.roomEmpty'), - NEW_MESSAGES: this.$t('chat.newMessages'), - MESSAGE_DELETED: this.$t('chat.messageDeleted'), - MESSAGES_EMPTY: this.$t('chat.messagesEmpty'), - CONVERSATION_STARTED: this.$t('chat.conversationStarted'), - TYPE_MESSAGE: this.$t('chat.typeMessage'), - SEARCH: this.$t('chat.search'), - IS_ONLINE: this.$t('chat.isOnline'), - LAST_SEEN: this.$t('chat.lastSeen'), - IS_TYPING: this.$t('chat.isTyping'), - CANCEL_SELECT_MESSAGE: this.$t('chat.cancelSelectMessage'), - }, roomActions: [ /* { @@ -177,6 +163,22 @@ export default { // return this.theme === 'light' ? chatStyle.STYLE.light : chatStyle.STYLE.dark return chatStyle.STYLE.light }, + textMessages() { + return{ + ROOMS_EMPTY: this.$t('chat.roomsEmpty'), + ROOM_EMPTY: this.$t('chat.roomEmpty'), + NEW_MESSAGES: this.$t('chat.newMessages'), + MESSAGE_DELETED: this.$t('chat.messageDeleted'), + MESSAGES_EMPTY: this.$t('chat.messagesEmpty'), + CONVERSATION_STARTED: this.$t('chat.conversationStarted'), + TYPE_MESSAGE: this.$t('chat.typeMessage'), + SEARCH: this.$t('chat.search'), + IS_ONLINE: this.$t('chat.isOnline'), + LAST_SEEN: this.$t('chat.lastSeen'), + IS_TYPING: this.$t('chat.isTyping'), + CANCEL_SELECT_MESSAGE: this.$t('chat.cancelSelectMessage'), + } + } }, methods: { fetchMessages({ room, options = {} }) { From d496aef0a42abb9fdd17a7c8ac95c2653c0172b8 Mon Sep 17 00:00:00 2001 From: Markus Date: Thu, 13 Jul 2023 22:56:38 +0200 Subject: [PATCH 2/2] fixed linting --- webapp/components/Chat/Chat.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 855f1e14b..eb7d7124a 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -164,7 +164,7 @@ export default { return chatStyle.STYLE.light }, textMessages() { - return{ + return { ROOMS_EMPTY: this.$t('chat.roomsEmpty'), ROOM_EMPTY: this.$t('chat.roomEmpty'), NEW_MESSAGES: this.$t('chat.newMessages'), @@ -178,7 +178,7 @@ export default { IS_TYPING: this.$t('chat.isTyping'), CANCEL_SELECT_MESSAGE: this.$t('chat.cancelSelectMessage'), } - } + }, }, methods: { fetchMessages({ room, options = {} }) {