fix(webapp): join leave button for pending members

This commit is contained in:
Moriz Wahl 2023-03-17 13:25:59 +01:00
parent 6480e9ec51
commit e91ad99f56
2 changed files with 9 additions and 9 deletions

View File

@ -58,14 +58,6 @@ export default {
} }
return this.$t('group.joinLeaveButton.join') return this.$t('group.joinLeaveButton.join')
}, },
tooltip() {
return {
content: this.$t('group.joinLeaveButton.tooltip'),
placement: 'right',
show: this.isMember && !this.isNonePendingMember && this.hovered,
trigger: this.isMember && !this.isNonePendingMember ? 'hover' : 'manual',
}
},
}, },
watch: { watch: {
isMember() { isMember() {
@ -80,6 +72,14 @@ export default {
...mapMutations({ ...mapMutations({
commitModalData: 'modal/SET_OPEN', commitModalData: 'modal/SET_OPEN',
}), }),
tooltip() {
return {
content: this.$t('group.joinLeaveButton.tooltip'),
placement: 'right',
show: this.isMember && !this.isNonePendingMember && this.hovered,
trigger: this.isMember && !this.isNonePendingMember ? 'hover' : 'manual',
}
},
onHover() { onHover() {
if (!this.disabled && !this.localLoading) { if (!this.disabled && !this.localLoading) {
this.hovered = true this.hovered = true

View File

@ -565,7 +565,7 @@ export default {
// }, // },
prepareJoinLeave() { prepareJoinLeave() {
// "membersCountStartValue" is updated to avoid counting from 0 when join/leave // "membersCountStartValue" is updated to avoid counting from 0 when join/leave
this.membersCountStartValue = this.GroupMembers.length this.membersCountStartValue = (this.GroupMembers && this.GroupMembers.length) || 0
}, },
updateJoinLeave({ myRoleInGroup }) { updateJoinLeave({ myRoleInGroup }) {
this.Group[0].myRole = myRoleInGroup this.Group[0].myRole = myRoleInGroup