mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Fixed leaving from guild list item (#9599)
This commit is contained in:
@@ -17,7 +17,7 @@ router-link.card-link(:to="{ name: 'guild', params: { groupId: guild._id } }")
|
|||||||
p.summary(v-if='guild.summary') {{guild.summary.substr(0, MAX_SUMMARY_SIZE_FOR_GUILDS)}}
|
p.summary(v-if='guild.summary') {{guild.summary.substr(0, MAX_SUMMARY_SIZE_FOR_GUILDS)}}
|
||||||
p.summary(v-else) {{ guild.name }}
|
p.summary(v-else) {{ guild.name }}
|
||||||
.col-md-2.cta-container
|
.col-md-2.cta-container
|
||||||
button.btn.btn-danger(v-if='isMember && displayLeave' @click='leave()', v-once) {{ $t('leave') }}
|
button.btn.btn-danger(v-if='isMember && displayLeave' @click.prevent='leave()', v-once) {{ $t('leave') }}
|
||||||
button.btn.btn-success(v-if='!isMember' @click='join()', v-once) {{ $t('join') }}
|
button.btn.btn-success(v-if='!isMember' @click='join()', v-once) {{ $t('join') }}
|
||||||
div.item-with-icon.gem-bank(v-if='displayGemBank')
|
div.item-with-icon.gem-bank(v-if='displayGemBank')
|
||||||
.svg-icon.gem(v-html="icons.gem")
|
.svg-icon.gem(v-html="icons.gem")
|
||||||
@@ -175,7 +175,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async leave () {
|
async leave () {
|
||||||
// @TODO: ask about challenges when we add challenges
|
// @TODO: ask about challenges when we add challenges
|
||||||
await this.$store.dispatch('guilds:leave', {guildId: this.guild._id, type: 'myGuilds'});
|
await this.$store.dispatch('guilds:leave', {groupId: this.guild._id, type: 'myGuilds'});
|
||||||
},
|
},
|
||||||
async reject (invitationToReject) {
|
async reject (invitationToReject) {
|
||||||
// @TODO: This needs to be in the notifications where users will now accept invites
|
// @TODO: This needs to be in the notifications where users will now accept invites
|
||||||
|
|||||||
Reference in New Issue
Block a user