Skip to content

Commit

Permalink
merge the latest main in
Browse files Browse the repository at this point in the history
  • Loading branch information
SebinSong committed Feb 20, 2024
2 parents c0b8f07 + 29b35d0 commit 5a8aaf7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions frontend/views/components/modal/Prompt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion frontend/views/containers/chatroom/SendArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(', ')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
modal-close.c-tooltip-close-btn(@close='closeTooltip')

ul.c-voters-list
li.c-voter-item(v-for='(votername, index) in voters' :key='votername + index')
avatar-user.c-voter-item-avatar(:contractID='votername' size='xs')
span.c-voter-item-name {{ getDisplayName(votername) }}
li.c-voter-item(v-for='(voterContractID, index) in voters' :key='voterContractID + index')
avatar-user.c-voter-item-avatar(:contractID='voterContractID' size='xs')
span.c-voter-item-name {{ getDisplayName(voterContractID) }}
</template>

<script>
Expand Down Expand Up @@ -77,8 +77,9 @@ export default ({
closeTooltip () {
this.ephemeral.isTooltipActive = false
},
getDisplayName (username) {
return this.globalProfile(username).displayName || username
getDisplayName (contractID) {
const profile = this.globalProfile(contractID)
return profile.displayName || profile.username
}
}
}: Object)
Expand Down

0 comments on commit 5a8aaf7

Please sign in to comment.