mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
More fixes (#9006)
* Reset user when clicking profile nav * Added editprofile * Add scroll to conversations and scroll to bottom on messages * Fixed profile click * Added notification mixin * Fixed challenge edit assignment * Guild list item now returns summary * Fixed tier icons * Fixed quest invitaion check * Fixed extra loading of party members in modals * Removed background from avatar in tutorial * Changed port back * Fixed task adding
This commit is contained in:
@@ -118,11 +118,6 @@ export default {
|
||||
bDropdownItem,
|
||||
MemberDetails,
|
||||
},
|
||||
mounted () {
|
||||
this.$root.$on('shown::modal', () => {
|
||||
this.getMembers();
|
||||
});
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
sortOption: '',
|
||||
@@ -157,6 +152,7 @@ export default {
|
||||
computed: {
|
||||
...mapState({user: 'user.data'}),
|
||||
isLeader () {
|
||||
if (!this.group.leader) return false;
|
||||
return this.user._id === this.group.leader || this.user._id === this.group.leader._id;
|
||||
},
|
||||
groupIsSubscribed () {
|
||||
@@ -165,6 +161,9 @@ export default {
|
||||
group () {
|
||||
return this.$store.state.memberModalOptions.group;
|
||||
},
|
||||
groupId () {
|
||||
return this.$store.state.memberModalOptions.groupId || this.group._id;
|
||||
},
|
||||
sortedMembers () {
|
||||
let sortedMembers = this.members;
|
||||
if (!this.sortOption) return sortedMembers;
|
||||
@@ -185,9 +184,18 @@ export default {
|
||||
return this.members;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
groupId () {
|
||||
// @TOOD: We might not need this since groupId is computed now
|
||||
this.getMembers();
|
||||
},
|
||||
group () {
|
||||
this.getMembers();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async getMembers () {
|
||||
let groupId = this.$store.state.memberModalOptions.groupId || this.group._id;
|
||||
let groupId = this.groupId;
|
||||
if (groupId && groupId !== 'challenge') {
|
||||
let members = await this.$store.dispatch('members:getGroupMembers', {
|
||||
groupId,
|
||||
|
||||
Reference in New Issue
Block a user