Sept 7 fixes (#9022)

* Fixed login incentives header

* Added achievement hover

* Removed grassy background from editing modal

* Fixed loading of other user equipment

* Prevented non admins from using habitica official

* Fixed challenge loading and leader changing on group reload

* Added community guidlines link

* Added challenge cloning

* Fixed heroes editing
This commit is contained in:
Keith Holliday
2017-09-07 13:26:53 -06:00
committed by GitHub
parent d9817be8f3
commit 3e1c128600
15 changed files with 183 additions and 76 deletions

View File

@@ -95,11 +95,6 @@ export default {
computed: {
...mapState({user: 'user.data'}),
},
async mounted () {
this.groupIdForChallenges = this.groupId;
if (this.groupId === 'party' && this.user.party._id) this.groupIdForChallenges = this.user.party._id;
this.challenges = await this.$store.dispatch('challenges:getGroupChallenges', {groupId: this.groupIdForChallenges});
},
data () {
return {
challenges: [],
@@ -111,6 +106,13 @@ export default {
groupIdForChallenges: '',
};
},
watch: {
async groupId () {
this.groupIdForChallenges = this.groupId;
if (this.groupId === 'party' && this.user.party._id) this.groupIdForChallenges = this.user.party._id;
this.challenges = await this.$store.dispatch('challenges:getGroupChallenges', {groupId: this.groupIdForChallenges});
},
},
methods: {
createChallenge () {
this.$root.$emit('show::modal', 'challenge-modal');