Group Dialog 6

This commit is contained in:
Natsumi
2022-12-08 15:49:28 +13:00
parent ac10caa0c2
commit bdb4077d06
2 changed files with 33 additions and 17 deletions

View File

@@ -22746,14 +22746,25 @@ speechSynthesis.getVoices();
API.$on('GROUP:PROPS', function (args) {
console.log('GROUP:PROPS', args);
var json = args.json;
json.$memberId = json.id;
json.id = json.groupId;
if ($app.groupDialog.visible && $app.groupDialog.id === json.groupId) {
$app.groupDialog.ref.myMember.visibility = json.visibility;
$app.groupDialog.ref.myMember.isSubscribedToAnnouncements =
json.isSubscribedToAnnouncements;
}
json.$memberId = json.id;
json.id = json.groupId;
delete json.visibility;
if (
$app.userDialog.visible &&
$app.userDialog.id === this.currentUser.id
) {
this.getRepresentedGroup({userId: this.currentUser.id}).then(
(args1) => {
$app.userDialog.representedGroup = args1.json;
return args1;
}
);
}
this.$emit('GROUP', {
json,
params: {
@@ -22993,6 +23004,9 @@ speechSynthesis.getVoices();
D.announcementDisplayName = '';
D.treeData = [];
D.announcement = {};
if (this.groupDialogLastMembers !== groupId) {
D.members = [];
}
API.getCachedGroup({
groupId
})
@@ -23017,18 +23031,7 @@ speechSynthesis.getVoices();
D.ownerDisplayName = args1.ref.displayName;
return args1;
});
if (this.$refs.groupDialogTabs.currentName === '0') {
this.groupDialogLastActiveTab = 'Info';
} else if (this.$refs.groupDialogTabs.currentName === '1') {
this.groupDialogLastActiveTab = 'Members';
if (this.groupDialogLastMembers !== groupId) {
this.groupDialogLastMembers = groupId;
this.getGroupDialogGroupMembers();
}
}
if (args.cache) {
this.getGroupDialogGroup(groupId);
}
this.getGroupDialogGroup(groupId);
}
});
};
@@ -23071,6 +23074,15 @@ speechSynthesis.getVoices();
}
});
}
if (this.$refs.groupDialogTabs.currentName === '0') {
this.groupDialogLastActiveTab = 'Info';
} else if (this.$refs.groupDialogTabs.currentName === '1') {
this.groupDialogLastActiveTab = 'Members';
if (this.groupDialogLastMembers !== groupId) {
this.groupDialogLastMembers = groupId;
this.getGroupDialogGroupMembers();
}
}
}
return args1;
});
@@ -23219,11 +23231,15 @@ speechSynthesis.getVoices();
this.groupDialog.members = [];
this.isGroupMembersDone = false;
this.loadMoreGroupMembersParams = {
n: 100,
n: 25,
offset: 0,
groupId: this.groupDialog.id
};
if (this.groupDialog.ref.membershipStatus !== 'member') {
if (this.isAllowedToViewGroupMembers()) {
// friend only group view perms only allow max n=25
this.loadMoreGroupMembersParams.n = 100;
}
if (!this.groupDialog.inGroup) {
return;
}
await API.getGroupMember({

View File

@@ -2292,7 +2292,7 @@ html
span.name Joined At
span.extra {{ groupDialog.ref.myMember.joinedAt | formatDate('long') }}
el-tab-pane(label="Members")
template(v-if="groupDialog.ref.membershipStatus === 'member'")
template(v-if="groupDialog.visible && groupDialog.ref.membershipStatus === 'member'")
span(v-if="isAllowedToViewGroupMembers()" style="font-weight:bold;font-size:16px") All Members
span(v-else style="font-weight:bold;font-size:16px") Friends Only
br