Added habitica event for profile display (#9576)

This commit is contained in:
Keith Holliday
2017-11-27 10:29:20 -06:00
committed by GitHub
parent ea5ba965e7
commit 3e6b3ce3ff
8 changed files with 46 additions and 21 deletions

View File

@@ -34,7 +34,7 @@ menu-dropdown.item-notifications(:right="true")
button.btn.btn-primary(@click.stop='accept(guild, index, "guild")') Accept
button.btn.btn-primary(@click.stop='reject(guild, index, "guild")') Reject
a.dropdown-item(v-if='user.flags.classSelected && !user.preferences.disableClasses && user.stats.points',
@click='go("/user/profile")')
@click='showProfile()')
span.glyphicon.glyphicon-plus-sign
span {{ $t('haveUnallocated', {points: user.stats.points}) }}
a.dropdown-item(v-for='message in userNewMessages')
@@ -279,6 +279,12 @@ export default {
let quest = await this.$store.dispatch('quests:sendAction', {groupId: partyId, action: 'quests/reject'});
this.user.party.quest = quest;
},
showProfile () {
this.$root.$emit('habitica:show-profile', {
user: this.user,
startingPage: 'stats',
});
},
},
};
</script>