Group Dialog 5

This commit is contained in:
Natsumi
2022-12-07 20:03:58 +13:00
parent 7f6f608a66
commit b5271ecf90
2 changed files with 36 additions and 31 deletions

View File

@@ -14398,7 +14398,7 @@ speechSynthesis.getVoices();
isMaster = true; isMaster = true;
} }
var lobbyJointime = $app.photonLobbyJointime.get(photonId); var lobbyJointime = $app.photonLobbyJointime.get(photonId);
var inVRMode = false; var inVRMode = null;
var groupOnNameplate = ''; var groupOnNameplate = '';
if (typeof lobbyJointime !== 'undefined') { if (typeof lobbyJointime !== 'undefined') {
inVRMode = lobbyJointime.inVRMode; inVRMode = lobbyJointime.inVRMode;
@@ -23223,6 +23223,9 @@ speechSynthesis.getVoices();
offset: 0, offset: 0,
groupId: this.groupDialog.id groupId: this.groupDialog.id
}; };
if (this.groupDialog.ref.membershipStatus !== 'member') {
return;
}
await API.getGroupMember({ await API.getGroupMember({
groupId: this.groupDialog.id, groupId: this.groupDialog.id,
userId: API.currentUser.id userId: API.currentUser.id
@@ -23273,6 +23276,7 @@ speechSynthesis.getVoices();
if ( if (
D.ref && D.ref &&
D.ref.myMember && D.ref.myMember &&
D.ref.myMember.permissions &&
D.ref.myMember.permissions.includes('group-members-viewall') D.ref.myMember.permissions.includes('group-members-viewall')
) { ) {
return true; return true;

View File

@@ -759,11 +759,11 @@ html
span {{ scope.row.created_at | formatDate('short') }} span {{ scope.row.created_at | formatDate('short') }}
el-table-column(label="Type" prop="type" width="160") el-table-column(label="Type" prop="type" width="160")
template(v-once #default="scope") template(v-once #default="scope")
el-tooltip(placement="top" v-if="scope.row.type === 'invite'") el-tooltip(v-if="scope.row.type === 'invite'" placement="top")
template(#content) template(#content)
location(v-if="scope.row.details" :location="scope.row.details.worldId" :hint="scope.row.details.worldName" :link="false") location(v-if="scope.row.details" :location="scope.row.details.worldId" :hint="scope.row.details.worldName" :link="false")
span.x-link(v-text="scope.row.type" @click="showWorldDialog(scope.row.details.worldId)") span.x-link(v-text="scope.row.type" @click="showWorldDialog(scope.row.details.worldId)")
template(v-if="scope.row.type && (scope.row.type.startsWith('group.') || scope.row.type === 'moderation.warning.group')") template(v-else-if="scope.row.type && (scope.row.type.startsWith('group.') || scope.row.type === 'moderation.warning.group')")
span.x-link(v-text="scope.row.type" @click="showGroupDialog(scope.row.link)") span.x-link(v-text="scope.row.type" @click="showGroupDialog(scope.row.link)")
span(v-else v-text="scope.row.type") span(v-else v-text="scope.row.type")
el-table-column(label="User" prop="senderUsername" width="150") el-table-column(label="User" prop="senderUsername" width="150")
@@ -2292,28 +2292,29 @@ html
span.name Joined At span.name Joined At
span.extra {{ groupDialog.ref.myMember.joinedAt | formatDate('long') }} span.extra {{ groupDialog.ref.myMember.joinedAt | formatDate('long') }}
el-tab-pane(label="Members") el-tab-pane(label="Members")
span(v-if="isAllowedToViewGroupMembers()" style="font-weight:bold;font-size:16px") All Members template(v-if="groupDialog.ref.membershipStatus === 'member'")
span(v-else style="font-weight:bold;font-size:16px") Friends Only span(v-if="isAllowedToViewGroupMembers()" style="font-weight:bold;font-size:16px") All Members
br span(v-else style="font-weight:bold;font-size:16px") Friends Only
el-button(type="default" @click="getGroupDialogGroupMembers()" size="mini" icon="el-icon-refresh" circle) br
span(style="font-size:14px;margin-left:5px;margin-right:5px") {{ groupDialog.members.length }}/{{ groupDialog.ref.memberCount }} el-button(type="default" @click="getGroupDialogGroupMembers()" size="mini" icon="el-icon-refresh" circle)
ul.infinite-list.x-friend-list(v-if="groupDialog.members.length > 0" v-infinite-scroll="loadMoreGroupMembers" style="margin-top:10px;overflow:auto;max-height:250px") span(style="font-size:14px;margin-left:5px;margin-right:5px") {{ groupDialog.members.length }}/{{ groupDialog.ref.memberCount }}
li.infinite-list-item.x-friend-item(v-for="user in groupDialog.members" :key="user.id" @click="showUserDialog(user.userId)" class="x-friend-item-border") ul.infinite-list.x-friend-list(v-if="groupDialog.members.length > 0" v-infinite-scroll="loadMoreGroupMembers" style="margin-top:10px;overflow:auto;max-height:250px")
.avatar li.infinite-list-item.x-friend-item(v-for="user in groupDialog.members" :key="user.id" @click="showUserDialog(user.userId)" class="x-friend-item-border")
img(v-lazy="userImage(user.user)") .avatar
.detail img(v-lazy="userImage(user.user)")
span.name(v-text="user.user.displayName" :style="{'color':user.user.$userColour}") .detail
span.extra span.name(v-text="user.user.displayName" :style="{'color':user.user.$userColour}")
.x-friend-item(v-if="!isGroupMembersDone" v-loading="isGroupMembersLoading" style="width:100%;height:45px;text-align:center" @click="loadMoreGroupMembers") span.extra
.detail(v-if="!isGroupMembersLoading") .x-friend-item(v-if="!isGroupMembersDone" v-loading="isGroupMembersLoading" style="width:100%;height:45px;text-align:center" @click="loadMoreGroupMembers")
span.name Load more... .detail(v-if="!isGroupMembersLoading")
el-tab-pane(label="JSON") span.name Load more...
el-button(type="default" @click="refreshGroupDialogTreeData()" size="mini" icon="el-icon-refresh" circle) el-tab-pane(label="JSON")
el-tree(:data="groupDialog.treeData" style="margin-top:5px;font-size:12px") el-button(type="default" @click="refreshGroupDialogTreeData()" size="mini" icon="el-icon-refresh" circle)
template(#default="scope") el-tree(:data="groupDialog.treeData" style="margin-top:5px;font-size:12px")
span template(#default="scope")
span(v-text="scope.data.key" style="font-weight:bold;margin-right:5px") span
span(v-if="!scope.data.children" v-text="scope.data.value") span(v-text="scope.data.key" style="font-weight:bold;margin-right:5px")
span(v-if="!scope.data.children" v-text="scope.data.value")
//- dialog: favorite //- dialog: favorite
el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="favoriteDialog" :visible.sync="favoriteDialog.visible" title="Choose Group" width="300px") el-dialog.x-dialog(:before-close="beforeDialogClose" @mousedown.native="dialogMouseDown" @mouseup.native="dialogMouseUp" ref="favoriteDialog" :visible.sync="favoriteDialog.visible" title="Choose Group" width="300px")
@@ -3228,10 +3229,10 @@ html
el-button(type="default" size="small" @click="setProfilePicOverride('')" icon="el-icon-close" :disabled="!API.currentUser.profilePicOverride") Clear el-button(type="default" size="small" @click="setProfilePicOverride('')" icon="el-icon-close" :disabled="!API.currentUser.profilePicOverride") Clear
br br
.x-friend-item(v-for="image in galleryTable" :key="image.id" style="display:inline-block;margin-top:10px;width:unset;cursor:default") .x-friend-item(v-for="image in galleryTable" :key="image.id" style="display:inline-block;margin-top:10px;width:unset;cursor:default")
.vrcplus-icon(v-if="image.versions[1].file.url" @click="setProfilePicOverride(image.id)" :class="{ 'current-vrcplus-icon': compareCurrentProfilePic(image.id) }") .vrcplus-icon(v-if="image.versions[image.versions.length - 1].file.url" @click="setProfilePicOverride(image.id)" :class="{ 'current-vrcplus-icon': compareCurrentProfilePic(image.id) }")
img.avatar(v-lazy="image.versions[1].file.url") img.avatar(v-lazy="image.versions[image.versions.length - 1].file.url")
div(style="float:right;margin-top:5px") div(style="float:right;margin-top:5px")
el-button(type="default" @click="openExternalLink(image.versions[1].file.url)" size="mini" icon="el-icon-paperclip" circle) el-button(type="default" @click="openExternalLink(image.versions[image.versions.length - 1].file.url)" size="mini" icon="el-icon-paperclip" circle)
el-button(type="default" @click="deleteGalleryImage(image.id)" size="mini" icon="el-icon-delete" circle style="margin-left:5px") el-button(type="default" @click="deleteGalleryImage(image.id)" size="mini" icon="el-icon-delete" circle style="margin-left:5px")
el-tab-pane(v-if="galleryDialogVisible" v-loading="galleryDialogIconsLoading") el-tab-pane(v-if="galleryDialogVisible" v-loading="galleryDialogIconsLoading")
span(slot="label") Icons span(slot="label") Icons
@@ -3243,10 +3244,10 @@ html
el-button(type="default" size="small" @click="setVRCPlusIcon('')" icon="el-icon-close" :disabled="!API.currentUser.userIcon") Clear el-button(type="default" size="small" @click="setVRCPlusIcon('')" icon="el-icon-close" :disabled="!API.currentUser.userIcon") Clear
br br
.x-friend-item(v-for="image in VRCPlusIconsTable" :key="image.id" style="display:inline-block;margin-top:10px;width:unset;cursor:default") .x-friend-item(v-for="image in VRCPlusIconsTable" :key="image.id" style="display:inline-block;margin-top:10px;width:unset;cursor:default")
.vrcplus-icon(v-if="image.versions[1].file.url" @click="setVRCPlusIcon(image.id)" :class="{ 'current-vrcplus-icon': compareCurrentVRCPlusIcon(image.id) }") .vrcplus-icon(v-if="image.versions[image.versions.length - 1].file.url" @click="setVRCPlusIcon(image.id)" :class="{ 'current-vrcplus-icon': compareCurrentVRCPlusIcon(image.id) }")
img.avatar(v-lazy="image.versions[1].file.url") img.avatar(v-lazy="image.versions[image.versions.length - 1].file.url")
div(style="float:right;margin-top:5px") div(style="float:right;margin-top:5px")
el-button(type="default" @click="openExternalLink(image.versions[1].file.url)" size="mini" icon="el-icon-paperclip" circle) el-button(type="default" @click="openExternalLink(image.versions[image.versions.length - 1].file.url)" size="mini" icon="el-icon-paperclip" circle)
el-button(type="default" @click="deleteVRCPlusIcon(image.id)" size="mini" icon="el-icon-delete" circle style="margin-left:5px") el-button(type="default" @click="deleteVRCPlusIcon(image.id)" size="mini" icon="el-icon-delete" circle style="margin-left:5px")
//- dialog Table: Previous Instances User //- dialog Table: Previous Instances User