From 29b35d0be3f497ca2453d216de120ca96704798f Mon Sep 17 00:00:00 2001 From: Sebin Song Date: Wed, 21 Feb 2024 05:42:25 +1300 Subject: [PATCH] #1851 - Fix the broken VoterAvatars.vue component (#1852) * add a fix for Prompt.vue not being closed properly * fix the broken VoterAvatars.vue --- frontend/model/contracts/manifests.json | 6 +++--- frontend/views/components/modal/Prompt.vue | 4 ++-- frontend/views/containers/chatroom/SendArea.vue | 5 ++++- .../chatroom/poll-message-content/PollVoteResult.vue | 2 +- .../chatroom/poll-message-content/VoterAvatars.vue | 11 ++++++----- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/frontend/model/contracts/manifests.json b/frontend/model/contracts/manifests.json index e8ee471d0..48d119f70 100644 --- a/frontend/model/contracts/manifests.json +++ b/frontend/model/contracts/manifests.json @@ -1,7 +1,7 @@ { "manifests": { - "gi.contracts/chatroom": "z9brRu3VMifmYkk97FijV5myjFAC5xPTYr2itAA5R8B5ygam3WZe", - "gi.contracts/group": "z9brRu3VG462ZBcaa6yEmybw3aZztTfbanPuc6Dk5c7pNL8nBmYH", - "gi.contracts/identity": "z9brRu3VVFhuow21YeqtEreuVwurDzwV65QSuD39QqRE5MZoqADs" + "gi.contracts/chatroom": "z9brRu3VXcbQ8j8sZKgGtmBWrmhRPWYyYPCAjrwUFvteX93Hn8MV", + "gi.contracts/group": "z9brRu3VFeizdYVsxnbF4NfhqNedjVbrhNgd3Mzu9frebx1erEXB", + "gi.contracts/identity": "z9brRu3VU9rsSSW22TcEUGV3yKi9zXCfDcMGfGefgie2yUDszkpb" } } diff --git a/frontend/views/components/modal/Prompt.vue b/frontend/views/components/modal/Prompt.vue index 964c760fe..bddb322a7 100644 --- a/frontend/views/components/modal/Prompt.vue +++ b/frontend/views/components/modal/Prompt.vue @@ -45,11 +45,11 @@ export default ({ methods: { closeModal () { sbp('okTurtles.events/emit', MODAL_RESPONSE, false) - this.$refs.modal.close() + this.$refs.modal.unload() }, submit () { sbp('okTurtles.events/emit', MODAL_RESPONSE, true) - this.$refs.modal.close() + this.$refs.modal.unload() } } }: Object) diff --git a/frontend/views/containers/chatroom/SendArea.vue b/frontend/views/containers/chatroom/SendArea.vue index 274d2d3dc..b1d1bedbb 100644 --- a/frontend/views/containers/chatroom/SendArea.vue +++ b/frontend/views/containers/chatroom/SendArea.vue @@ -387,7 +387,10 @@ export default ({ const userArr = this.ephemeral.typingUsers if (userArr.length) { - const getDisplayName = (memberID) => (this.globalProfile(memberID).displayName || this.globalProfile(memberID).username || memberID) + const getDisplayName = (memberID) => { + const profile = this.globalProfile(memberID) + return profile?.displayName || profile?.username || memberID + } const isMultiple = userArr.length > 1 const usernameCombined = userArr.map(u => getDisplayName(u)).join(', ') diff --git a/frontend/views/containers/chatroom/poll-message-content/PollVoteResult.vue b/frontend/views/containers/chatroom/poll-message-content/PollVoteResult.vue index d588d0795..9a20df7ed 100644 --- a/frontend/views/containers/chatroom/poll-message-content/PollVoteResult.vue +++ b/frontend/views/containers/chatroom/poll-message-content/PollVoteResult.vue @@ -32,7 +32,7 @@ .c-voters .c-voter-avatars-item(v-for='entry in list.voters' :key='entry.id') - voter-avatars(:voters='entry.members' :optionName='entry.optionName') + voter-avatars(:voters='entry.users' :optionName='entry.optionName')