-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -89,11 +107,6 @@ export default {
data() {
return {
menuActions: [
- // NOTE: if menuActions is empty, the related slot is not shown
- {
- name: 'dummyItem',
- title: 'Just a dummy item',
- },
/*
{
name: 'inviteUser',
@@ -197,10 +210,24 @@ export default {
computed: {
...mapGetters({
currentUser: 'auth/user',
+ getStoreRoomId: 'chat/roomID',
}),
computedChatStyle() {
return chatStyle.STYLE.light
},
+ computedRoomId() {
+ let roomId = null
+
+ if (!this.singleRoom) {
+ roomId = this.roomId
+
+ if (this.getStoreRoomId.roomId) {
+ roomId = this.getStoreRoomId.roomId
+ }
+ }
+
+ return roomId
+ },
textMessages() {
return {
ROOMS_EMPTY: this.$t('chat.roomsEmpty'),
@@ -221,6 +248,7 @@ export default {
methods: {
...mapMutations({
commitUnreadRoomCount: 'chat/UPDATE_ROOM_COUNT',
+ commitRoomIdFromSingleRoom: 'chat/UPDATE_ROOM_ID',
}),
async fetchRooms({ room } = {}) {
this.roomsLoaded = false
@@ -253,6 +281,13 @@ export default {
this.roomsLoaded = true
}
this.roomPage += 1
+
+ if (this.singleRoom && this.rooms.length > 0) {
+ this.commitRoomIdFromSingleRoom(this.rooms[0].roomId)
+ } else if (this.getStoreRoomId.roomId) {
+ // reset store room id
+ this.commitRoomIdFromSingleRoom(null)
+ }
} catch (error) {
this.rooms = []
this.$toast.error(error.message)
@@ -389,4 +424,8 @@ body {
transform: translate(-50%, -50%);
}
}
+
+.single-chat-bubble {
+ margin-right: 1em;
+}
diff --git a/webapp/store/chat.js b/webapp/store/chat.js
index ed6b5256c..1e0b496ac 100644
--- a/webapp/store/chat.js
+++ b/webapp/store/chat.js
@@ -14,6 +14,9 @@ export const mutations = {
UPDATE_ROOM_COUNT(state, count) {
state.unreadRoomCount = count
},
+ UPDATE_ROOM_ID(state, roomid) {
+ state.roomId = roomid || null
+ },
}
export const getters = {
From 45dba25a7ad28852dcdf5c8acd9ffc9c8852b371 Mon Sep 17 00:00:00 2001
From: Markus
Date: Wed, 19 Jul 2023 17:24:37 +0200
Subject: [PATCH 17/17] [fix] changed css rule for single chat icon
---
webapp/components/Chat/Chat.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue
index f947f4886..139e30290 100644
--- a/webapp/components/Chat/Chat.vue
+++ b/webapp/components/Chat/Chat.vue
@@ -425,7 +425,7 @@ body {
}
}
-.single-chat-bubble {
+.ds-flex-item.single-chat-bubble {
margin-right: 1em;
}