client lint first pass

This commit is contained in:
Matteo Pagliazzi
2019-10-11 20:35:49 +02:00
parent 07cffe9e16
commit a625e83b53
104 changed files with 1053 additions and 893 deletions

View File

@@ -129,7 +129,8 @@ export default {
return true;
},
hasParty () {
return this.user.party && this.user.party._id && this.partyMembers && this.partyMembers.length > 1;
return this.user.party && this.user.party._id
&& this.partyMembers && this.partyMembers.length > 1;
},
membersToShow () {
return Math.floor(this.currentWidth / 140) + 1;
@@ -138,6 +139,22 @@ export default {
return orderBy(this.partyMembers, [this.user.party.order], [this.user.party.orderAscending]);
},
},
created () {
if (this.user.party && this.user.party._id) {
this.$store.state.memberModalOptions.groupId = this.user.party._id;
this.getPartyMembers();
}
},
mounted () {
this.$root.$on('inviteModal::inviteToGroup', group => {
this.inviteModalGroup = group;
this.inviteModalGroupType = group.type === 'guild' ? 'Guild' : 'Party';
this.$root.$emit('bv::show::modal', 'invite-modal');
});
},
destroyed () {
this.$root.off('inviteModal::inviteToGroup');
},
methods: {
...mapActions({
getPartyMembers: 'party:getMembers',
@@ -171,21 +188,5 @@ export default {
}
},
},
created () {
if (this.user.party && this.user.party._id) {
this.$store.state.memberModalOptions.groupId = this.user.party._id;
this.getPartyMembers();
}
},
mounted () {
this.$root.$on('inviteModal::inviteToGroup', group => {
this.inviteModalGroup = group;
this.inviteModalGroupType = group.type === 'guild' ? 'Guild' : 'Party';
this.$root.$emit('bv::show::modal', 'invite-modal');
});
},
destroyed () {
this.$root.off('inviteModal::inviteToGroup');
},
};
</script>