Group Dialog 4

This commit is contained in:
Natsumi
2022-12-07 12:28:37 +13:00
parent 1a44f59572
commit 7f6f608a66
4 changed files with 298 additions and 102 deletions

View File

@@ -2814,6 +2814,10 @@ speechSynthesis.getVoices();
API.$on('NOTIFICATION:RESPONSE', function (args) {
this.$emit('NOTIFICATION:HIDE', args);
$app.$message({
message: args.json,
type: 'success'
});
console.log('NOTIFICATION:RESPONSE', args);
});
@@ -8353,7 +8357,6 @@ speechSynthesis.getVoices();
this.photonLobbyMaster = 0;
this.photonLobbyCurrentUser = 0;
this.photonLobbyUserData = new Map();
this.photonLobbyInVrMode = new Map();
this.photonLobbyWatcherLoopStop();
this.photonLobbyAvatars = new Map();
this.photonLobbyJointime = new Map();
@@ -8811,7 +8814,12 @@ speechSynthesis.getVoices();
return;
case 'api-request':
var bias = Date.parse(gameLog.dt) + 60 * 1000;
if (!this.isGameRunning || bias < Date.now()) {
if (
!this.isGameRunning ||
this.lastLocation.location === '' ||
this.lastLocation.location === 'traveling' ||
bias < Date.now()
) {
return;
}
var userId = '';
@@ -8928,7 +8936,6 @@ speechSynthesis.getVoices();
$app.data.photonLobbyMaster = 0;
$app.data.photonLobbyCurrentUser = 0;
$app.data.photonLobbyUserData = new Map();
$app.data.photonLobbyInVrMode = new Map();
$app.data.photonLobbyCurrent = new Map();
$app.data.photonLobbyAvatars = new Map();
$app.data.photonLobbyWatcherLoop = false;
@@ -9048,7 +9055,6 @@ speechSynthesis.getVoices();
this.photonLobbyTimeout = [];
this.photonLobbyBots = [];
AppApi.ExecuteVrOverlayFunction('updateHudTimeout', '[]');
this.updatePhotonLobbyBotSize(0);
};
$app.methods.photonLobbyWatcher = function () {
@@ -9156,8 +9162,7 @@ speechSynthesis.getVoices();
joinTime + 11000 < dtNow &&
!hasInstantiated
) {
text =
'Potential photon bot has joined, failed to instantiate after 10 seconds';
text = 'User failed to instantiate after 10 seconds';
}
if (text && id !== this.photonLobbyCurrentUser) {
if (!this.photonLobbyBots.includes(id)) {
@@ -9182,16 +9187,9 @@ speechSynthesis.getVoices();
photonBots.unshift(id);
}
});
if (this.photonLobbyBots.length !== photonBots.length) {
this.updatePhotonLobbyBotSize(photonBots.length);
}
this.photonLobbyBots = photonBots;
};
$app.methods.updatePhotonLobbyBotSize = function (size) {
AppApi.ExecuteVrFeedFunction('updatePhotonLobbyBotSize', `${size}`);
};
$app.data.photonEventTableFilter = '';
$app.data.photonEventTableTypeFilter = [];
$app.data.photonEventTableTypeOverlayFilter = [];
@@ -9415,9 +9413,6 @@ speechSynthesis.getVoices();
);
this.parsePhotonAvatar(user.avatarDict);
this.parsePhotonAvatar(user.favatarDict);
if (typeof user.inVRMode !== 'undefined') {
this.photonLobbyInVrMode.set(id, user.inVRMode);
}
var hasInstantiated = false;
var lobbyJointime = this.photonLobbyJointime.get(id);
if (typeof lobbyJointime !== 'undefined') {
@@ -9436,53 +9431,61 @@ speechSynthesis.getVoices();
this.photonUserJoin(id, user.avatarDict, gameLogDate);
}
} else {
this.parsePhotonUser(
data.Parameters[253],
data.Parameters[251].user,
gameLogDate
);
console.log('oldSetUserProps', data);
var id = parseInt(data.Parameters[253], 10);
var user = data.Parameters[251];
this.parsePhotonUser(id, user.user, gameLogDate);
this.parsePhotonAvatarChange(
data.Parameters[253],
data.Parameters[251].user,
data.Parameters[251].avatarDict,
id,
user.user,
user.avatarDict,
gameLogDate
);
this.parsePhotonAvatar(data.Parameters[251].avatarDict);
this.parsePhotonAvatar(data.Parameters[251].favatarDict);
if (typeof data.Parameters[251].inVRMode !== 'undefined') {
this.photonLobbyInVrMode.set(
data.Parameters[253],
data.Parameters[251].inVRMode
);
this.parsePhotonAvatar(user.avatarDict);
this.parsePhotonAvatar(user.favatarDict);
var hasInstantiated = false;
var lobbyJointime = this.photonLobbyJointime.get(id);
if (typeof lobbyJointime !== 'undefined') {
hasInstantiated = lobbyJointime.hasInstantiated;
}
this.photonUserJoin(
data.Parameters[253],
data.Parameters[251].avatarDict,
gameLogDate
);
this.photonLobbyJointime.set(id, {
joinTime: Date.parse(gameLogDate),
hasInstantiated,
inVRMode: user.user.inVRMode,
avatarEyeHeight: user.user.avatarEyeHeight,
canModerateInstance: user.user.canModerateInstance,
groupOnNameplate: user.user.groupOnNameplate,
showGroupBadgeToOthers:
user.user.showGroupBadgeToOthers,
showSocialRank: user.user.showSocialRank
});
this.photonUserJoin(id, user.avatarDict, gameLogDate);
}
break;
case 42:
// SetUserProperties
this.parsePhotonUser(
data.Parameters[254],
data.Parameters[245].user,
gameLogDate
);
var id = parseInt(data.Parameters[254], 10);
var user = data.Parameters[245];
this.parsePhotonUser(id, user.user, gameLogDate);
this.parsePhotonAvatarChange(
data.Parameters[254],
data.Parameters[245].user,
data.Parameters[245].avatarDict,
id,
user.user,
user.avatarDict,
gameLogDate
);
this.parsePhotonAvatar(data.Parameters[245].avatarDict);
this.parsePhotonAvatar(data.Parameters[245].favatarDict);
if (typeof data.Parameters[245].inVRMode !== 'undefined') {
this.photonLobbyInVrMode.set(
data.Parameters[254],
data.Parameters[245].inVRMode
);
}
this.parsePhotonAvatar(user.avatarDict);
this.parsePhotonAvatar(user.favatarDict);
var lobbyJointime = this.photonLobbyJointime.get(id);
this.photonLobbyJointime.set(id, {
hasInstantiated: true,
...lobbyJointime,
inVRMode: user.inVRMode,
avatarEyeHeight: user.avatarEyeHeight,
canModerateInstance: user.canModerateInstance,
groupOnNameplate: user.groupOnNameplate,
showGroupBadgeToOthers: user.showGroupBadgeToOthers,
showSocialRank: user.showSocialRank
});
break;
case 255:
// Join
@@ -9501,12 +9504,6 @@ speechSynthesis.getVoices();
this.parsePhotonAvatar(data.Parameters[249].avatarDict);
this.parsePhotonAvatar(data.Parameters[249].favatarDict);
}
if (typeof data.Parameters[249].inVRMode !== 'undefined') {
this.photonLobbyInVrMode.set(
data.Parameters[254],
data.Parameters[249].inVRMode
);
}
this.parsePhotonLobbyIds(data.Parameters[252]);
var hasInstantiated = false;
if (this.photonLobbyCurrentUser === data.Parameters[254]) {
@@ -9549,7 +9546,6 @@ speechSynthesis.getVoices();
this.photonUserLeave(data.Parameters[254], gameLogDate);
this.photonLobbyCurrent.delete(data.Parameters[254]);
this.photonLobbyJointime.delete(data.Parameters[254]);
this.photonLobbyInVrMode.delete(data.Parameters[254]);
this.photonEvent7List.delete(data.Parameters[254]);
this.parsePhotonLobbyIds(data.Parameters[252]);
if (typeof data.Parameters[203] !== 'undefined') {
@@ -9958,25 +9954,15 @@ speechSynthesis.getVoices();
};
$app.methods.checkPhotonBotLeave = function (photonId, gameLogDate) {
var text = '';
var lobbyJointime = this.photonLobbyJointime.get(photonId);
if (this.photonLobbyBots.includes(photonId)) {
text = 'Photon bot has left';
if (typeof lobbyJointime !== 'undefined') {
var time = timeToText(Date.now() - lobbyJointime.joinTime);
text = `Photon bot has left ${time}`;
}
} else if (
if (
typeof lobbyJointime !== 'undefined' &&
!lobbyJointime.hasInstantiated
) {
var time = timeToText(Date.now() - lobbyJointime.joinTime);
text = `Bot/Player left without instantiating ${time}`;
}
if (text) {
this.addEntryPhotonEvent({
photonId,
text,
text: `User left without instantiating ${time}`,
type: 'PhotonBot',
color: 'yellow',
created_at: gameLogDate
@@ -13035,7 +13021,6 @@ speechSynthesis.getVoices();
};
$app.methods.vrInit = function () {
this.updatePhotonLobbyBotSize(this.photonLobbyBots.length);
this.updateVRConfigVars();
this.updateVRLastLocation();
this.updateVrNowPlaying();
@@ -14412,7 +14397,20 @@ speechSynthesis.getVoices();
) {
isMaster = true;
}
var inVrMode = $app.photonLobbyInVrMode.get(photonId);
var lobbyJointime = $app.photonLobbyJointime.get(photonId);
var inVRMode = false;
var groupOnNameplate = '';
if (typeof lobbyJointime !== 'undefined') {
inVRMode = lobbyJointime.inVRMode;
groupOnNameplate = lobbyJointime.groupOnNameplate;
}
// if (groupOnNameplate) {
// API.getCachedGroup({
// groupId: groupOnNameplate
// }).then((args) => {
// groupOnNameplate = args.ref.name;
// });
// }
var timeoutTime = 0;
if (typeof ref.id !== 'undefined') {
isFriend = $app.friends.has(ref.id);
@@ -14438,7 +14436,8 @@ speechSynthesis.getVoices();
timer: ref.$location_at,
photonId,
isMaster,
inVrMode,
inVRMode,
groupOnNameplate,
isFriend,
timeoutTime
});
@@ -20322,6 +20321,9 @@ speechSynthesis.getVoices();
if (user.profilePicOverride) {
return user.profilePicOverride;
}
if (user.thumbnailUrl) {
return user.thumbnailUrl;
}
return user.currentAvatarThumbnailImageUrl;
};
@@ -20414,7 +20416,8 @@ speechSynthesis.getVoices();
try {
var data = JSON.parse(json);
} catch {
console.error(`IPC invalid JSON, ${json}`);
console.log(`IPC invalid JSON, ${json}`);
return;
}
switch (data.type) {
case 'OnEvent':
@@ -20529,9 +20532,6 @@ speechSynthesis.getVoices();
);
this.parsePhotonAvatar(user.avatarDict);
this.parsePhotonAvatar(user.favatarDict);
if (typeof user.inVRMode !== 'undefined') {
this.photonLobbyInVrMode.set(id, user.inVRMode);
}
var hasInstantiated = false;
var lobbyJointime = this.photonLobbyJointime.get(id);
if (typeof lobbyJointime !== 'undefined') {
@@ -22785,6 +22785,62 @@ speechSynthesis.getVoices();
console.log('GROUP:ANNOUNCEMENT', args);
});
/*
params: {
groupId: string,
userId: string
}
*/
API.getGroupMember = function (params) {
return this.call(`groups/${params.groupId}/members/${params.userId}`, {
method: 'GET'
}).then((json) => {
var args = {
json,
params
};
this.$emit('GROUP:MEMBER', args);
return args;
});
};
/*
params: {
groupId: string,
n: number,
offset: number
}
*/
API.getGroupMembers = function (params) {
return this.call(`groups/${params.groupId}/members`, {
method: 'GET',
params
}).then((json) => {
var args = {
json,
params
};
this.$emit('GROUP:MEMBERS', args);
return args;
});
};
API.$on('GROUP:MEMBERS', function (args) {
console.log('GROUP:MEMBERS', args);
for (var json of args.json) {
this.$emit('GROUP:MEMBER', {
json,
params: {
groupId: args.params.groupId
}
});
}
});
API.$on('GROUP:MEMBER', function (args) {
args.ref = this.applyGroupMember(args.json);
});
/*
params: {
groupId: string
@@ -22869,11 +22925,25 @@ speechSynthesis.getVoices();
Object.assign(ref, json);
}
ref.rules = $app.replaceBioSymbols(ref.rules);
ref.name = $app.replaceBioSymbols(ref.name);
ref.description = $app.replaceBioSymbols(ref.description);
ref.$url = `https://vrc.group/${ref.shortCode}.${ref.discriminator}`;
this.applyGroupLanguage(ref);
return ref;
};
API.applyGroupMember = function (json) {
if (typeof json.user !== 'undefined') {
var ref = this.cachedUsers.get(json.user.id);
if (typeof ref !== 'undefined') {
json.user = ref;
}
} else if (json.userId === this.currentUser.id) {
json.user = this.currentUser;
}
return json;
};
API.applyGroupLanguage = function (ref) {
ref.$languages = [];
var {languages} = ref;
@@ -22901,13 +22971,18 @@ speechSynthesis.getVoices();
ownerDisplayName: '',
announcementDisplayName: '',
ref: {},
announcement: {}
announcement: {},
members: []
};
$app.methods.showGroupDialog = function (groupId) {
if (!groupId) {
return;
}
if (groupId.startsWith('group:')) {
// eslint-disable-next-line no-param-reassign
groupId = groupId.substr(6);
}
this.$nextTick(() => adjustDialogZ(this.$refs.groupDialog.$el));
var D = this.groupDialog;
D.visible = true;
@@ -22942,6 +23017,15 @@ 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);
}
@@ -22965,6 +23049,16 @@ speechSynthesis.getVoices();
}).then((args2) => {
if (groupId === args2.json.groupId) {
D.announcement = args2.json;
if (D.announcement.id) {
D.announcement.title =
this.replaceBioSymbols(
D.announcement.title
);
D.announcement.text =
this.replaceBioSymbols(
D.announcement.text
);
}
if (D.announcement && D.announcement.authorId) {
API.getCachedUser({
userId: D.announcement.authorId
@@ -23012,6 +23106,25 @@ speechSynthesis.getVoices();
}
};
$app.data.groupDialogLastActiveTab = '';
$app.data.groupDialogLastMembers = '';
$app.methods.groupDialogTabClick = function (obj) {
var groupId = this.groupDialog.id;
if (this.groupDialogLastActiveTab === obj.label) {
return;
}
if (obj.label === 'Members') {
if (this.groupDialogLastMembers !== groupId) {
this.groupDialogLastMembers = groupId;
this.getGroupDialogGroupMembers();
}
} else if (obj.label === 'JSON') {
this.refreshGroupDialogTreeData();
}
this.groupDialogLastActiveTab = obj.label;
};
$app.methods.refreshGroupDialogTreeData = function () {
var D = this.groupDialog;
D.treeData = buildTreeData(D.ref);
@@ -23096,6 +23209,77 @@ speechSynthesis.getVoices();
});
};
// group members
$app.data.isGroupMembersLoading = false;
$app.data.isGroupMembersDone = false;
$app.data.loadMoreGroupMembersParams = {};
$app.methods.getGroupDialogGroupMembers = async function () {
this.groupDialog.members = [];
this.isGroupMembersDone = false;
this.loadMoreGroupMembersParams = {
n: 100,
offset: 0,
groupId: this.groupDialog.id
};
await API.getGroupMember({
groupId: this.groupDialog.id,
userId: API.currentUser.id
}).then((args) => {
if (args.json) {
args.json.user = API.currentUser;
this.groupDialog.members.push(args.json);
}
return args;
});
await this.loadMoreGroupMembers();
};
$app.methods.loadMoreGroupMembers = async function () {
if (this.isGroupMembersDone || this.isGroupMembersLoading) {
return;
}
var params = this.loadMoreGroupMembersParams;
this.isGroupMembersLoading = true;
await API.getGroupMembers(params)
.finally(() => {
params.offset += params.n;
this.isGroupMembersLoading = false;
})
.then((args) => {
for (var i = 0; i < args.json.length; i++) {
var member = args.json[i];
if (member.userId === API.currentUser.id) {
// remove self from array
// when fetching only friends self is included
args.json.splice(i, 1);
break;
}
}
if (args.json.length < params.n) {
this.isGroupMembersDone = true;
}
this.groupDialog.members = [
...this.groupDialog.members,
...args.json
];
return args;
});
};
$app.methods.isAllowedToViewGroupMembers = function () {
var D = this.groupDialog;
if (
D.ref &&
D.ref.myMember &&
D.ref.myMember.permissions.includes('group-members-viewall')
) {
return true;
}
return false;
};
$app = new Vue($app);
window.$app = $app;
})();

View File

@@ -108,14 +108,6 @@ html
span(v-if="lastLocation.playerList.size > 0" style="margin-left:5px")
| {{ lastLocation.playerList.size }}
| #[template(v-if="lastLocation.friendList.size > 0") ({{ lastLocation.friendList.size }})]
template(v-if="photonLobbyBots.length > 0")
| &nbsp;
el-tooltip(placement="bottom")
template(#content)
span Photon Bots:
div(v-for="id in photonLobbyBots" :key="id" placement="top")
span.x-link(v-text="getDisplayNameFromPhotonId(id)" @click="showUserFromPhotonId(id)" style="margin-right:5px")
span(v-text="photonLobbyBots.length" style="color:red")
| &nbsp;#[timer(v-if="lastLocation.date" :epoch="lastLocation.date")]
div(style="margin-top:5px")
span(v-show="currentInstanceWorld.ref.name !== currentInstanceWorld.ref.description" v-text="currentInstanceWorld.ref.description" style="font-size:12px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2")
@@ -280,14 +272,14 @@ html
span 💚
el-tooltip(v-if="scope.row.timeoutTime" placement="left" content="Timeout")
span(style="color:red") 🔴{{ scope.row.timeoutTime }}s
el-table-column(label="Platform" prop="inVrMode" width="80")
el-table-column(label="Platform" prop="inVRMode" width="80")
template(v-once #default="scope")
template(v-if="scope.row.ref.last_platform")
span(v-if="scope.row.ref.last_platform === 'standalonewindows'" style="color:#409eff") PC
span(v-else-if="scope.row.ref.last_platform === 'android'" style="color:#67c23a") Q
span(v-else) {{ scope.row.ref.last_platform }}
template(v-if="scope.row.inVrMode !== undefined")
span(v-if="scope.row.inVrMode") VR
template(v-if="scope.row.inVRMode !== undefined")
span(v-if="scope.row.inVRMode") VR
span(v-else) D
el-table-column(label="Display Name" min-width="140" prop="ref.displayName")
template(v-once #default="scope")
@@ -299,6 +291,9 @@ html
i.x-user-status(:class="statusClass(scope.row.ref.status)")
span
span(v-text="scope.row.ref.statusDescription")
//- el-table-column(label="Group" min-width="180" prop="groupOnNameplate" sortable)
//- template(v-once #default="scope")
//- span(v-text="scope.row.groupOnNameplate")
el-table-column(label="Rank" width="110" prop="$trustSortNum" sortable="custom")
template(v-once #default="scope")
span.name(v-text="scope.row.ref.$trustLevel" :class="scope.row.ref.$trustClass")
@@ -752,7 +747,7 @@ html
template(#tool)
div(style="margin:0 0 10px;display:flex;align-items:center")
el-select(v-model="notificationTable.filters[0].value" @change="saveTableFilters" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'hiddenFriendRequest', 'message', 'group.invite']" :key="type" :label="type" :value="type")
el-option(v-once v-for="type in ['requestInvite', 'invite', 'requestInviteResponse', 'inviteResponse', 'friendRequest', 'hiddenFriendRequest', 'message', 'group.announcement', 'group.informative', 'group.invite', 'group.joinRequest', 'moderation.warning.group']" :key="type" :label="type" :value="type")
el-input(v-model="notificationTable.filters[1].value" placeholder="Search" style="flex:none;width:150px;margin:0 10px")
el-tooltip(placement="bottom" content="Refresh" :disabled="hideTooltips")
el-button(type="default" :loading="API.isNotificationsLoading" @click="API.refreshNotifications()" icon="el-icon-refresh" circle style="flex:none")
@@ -762,12 +757,14 @@ html
template(#content)
span {{ scope.row.created_at | formatDate('long') }}
span {{ scope.row.created_at | formatDate('short') }}
el-table-column(label="Type" prop="type" width="150")
el-table-column(label="Type" prop="type" width="160")
template(v-once #default="scope")
el-tooltip(placement="top" v-if="scope.row.type === 'invite'")
template(#content)
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)")
template(v-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(v-else v-text="scope.row.type")
el-table-column(label="User" prop="senderUsername" width="150")
template(v-once #default="scope")
@@ -778,6 +775,10 @@ html
el-popover(placement="right" width="500px" trigger="click")
img.x-link(slot="reference" v-lazy="scope.row.details.imageUrl" style="flex:none;width:90px;border-radius:4px")
img.x-link(v-lazy="scope.row.details.imageUrl" style="width:500px" @click="openExternalLink(scope.row.details.imageUrl)")
template(v-else-if="scope.row.imageUrl")
el-popover(placement="right" width="500px" trigger="click")
img.x-link(slot="reference" v-lazy="scope.row.imageUrl" style="flex:none;width:90px;border-radius:4px")
img.x-link(v-lazy="scope.row.imageUrl" style="width:500px" @click="openExternalLink(scope.row.imageUrl)")
el-table-column(label="Message" prop="message")
template(v-once #default="scope")
span(v-if="scope.row.message" v-text="scope.row.message")
@@ -2199,9 +2200,11 @@ html
span
el-button(type="default" icon="el-icon-star-off" circle @click="setGroupRepresentation(groupDialog.id)" style="margin-left:5px" :disabled="groupDialog.ref.privacy === 'private'")
el-tooltip(v-else-if="groupDialog.ref.membershipStatus === 'requested'" placement="top" content="Cancel join request" :disabled="hideTooltips")
el-button(type="default" icon="el-icon-close" circle @click="cancelGroupRequest(groupDialog.id)" style="margin-left:5px")
span
el-button(type="default" icon="el-icon-close" circle @click="cancelGroupRequest(groupDialog.id)" style="margin-left:5px")
el-tooltip(v-else-if="groupDialog.ref.membershipStatus === 'invited'" placement="top" content="Pending invite" :disabled="hideTooltips")
el-button(type="default" icon="el-icon-message" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px")
span
el-button(type="default" icon="el-icon-check" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px")
template(v-else)
el-tooltip(v-if="groupDialog.ref.joinState === 'request'" placement="top" content="Request to join" :disabled="hideTooltips")
el-button(type="default" icon="el-icon-message" circle @click="joinGroup(groupDialog.id)" style="margin-left:5px")
@@ -2226,7 +2229,7 @@ html
el-dropdown-item(icon="el-icon-view" command="Visibility Hidden") #[i.el-icon-check(v-if="groupDialog.ref.myMember.visibility === 'hidden'")] Visibility Hidden
el-dropdown-item(icon="el-icon-delete" command="Leave Group" style="color:#F56C6C" divided) Leave Group
el-tabs
el-tabs(ref="groupDialogTabs" @tab-click="groupDialogTabClick")
el-tab-pane(label="Info")
el-popover(placement="right" width="500px" trigger="click")
img.x-link(slot="reference" v-lazy="groupDialog.ref.bannerUrl" style="flex:none;width:100%;aspect-ratio:6/1;object-fit:cover;border-radius:4px")
@@ -2288,6 +2291,22 @@ html
.detail
span.name Joined At
span.extra {{ groupDialog.ref.myMember.joinedAt | formatDate('long') }}
el-tab-pane(label="Members")
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
el-button(type="default" @click="getGroupDialogGroupMembers()" size="mini" icon="el-icon-refresh" circle)
span(style="font-size:14px;margin-left:5px;margin-right:5px") {{ groupDialog.members.length }}/{{ groupDialog.ref.memberCount }}
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")
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")
.avatar
img(v-lazy="userImage(user.user)")
.detail
span.name(v-text="user.user.displayName" :style="{'color':user.user.$userColour}")
span.extra
.x-friend-item(v-if="!isGroupMembersDone" v-loading="isGroupMembersLoading" style="width:100%;height:45px;text-align:center" @click="loadMoreGroupMembers")
.detail(v-if="!isGroupMembersLoading")
span.name Load more...
el-tab-pane(label="JSON")
el-button(type="default" @click="refreshGroupDialogTreeData()" size="mini" icon="el-icon-refresh" circle)
el-tree(:data="groupDialog.treeData" style="margin-top:5px;font-size:12px")

View File

@@ -162,7 +162,6 @@ Vue.component('marquee-text', MarqueeText);
cpuUsage: 0,
pcUptime: '',
config: {},
photonLobbyBotSize: 0,
onlineFriendCount: 0,
nowPlaying: {
url: '',
@@ -304,10 +303,6 @@ Vue.component('marquee-text', MarqueeText);
this.setDatetimeFormat();
};
$app.methods.updatePhotonLobbyBotSize = function (size) {
this.photonLobbyBotSize = parseInt(size, 10);
};
$app.methods.updateOnlineFriendCount = function (count) {
this.onlineFriendCount = parseInt(count, 10);
};

View File

@@ -422,7 +422,6 @@ html
|&nbsp;/ {{ pcUptime }}
span(style="display:inline-block") {{ lastLocation.playerList.length }}
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}
template(v-else)
span(style="float:right") Timer: {{ lastLocationTimer }}
template(v-if="onlineForTimer")
@@ -431,7 +430,6 @@ html
|&nbsp;/ {{ pcUptime }}
span(style="display:inline-block") Players: {{ lastLocation.playerList.length }}
span(style="display:inline-block;font-weight:bold") {{ lastLocation.friendList.length !== 0 ? ` (${lastLocation.friendList.length})` : ''}}
span(v-if="photonLobbyBotSize > 0 && lastLocation.playerList.length > 0" style="display:inline-block;color:red;margin-left:5px") {{ photonLobbyBotSize }}
br
span(style="float:right") {{ currentTime }}
span(v-if="config && !config.hideCpuUsageFromFeed" style="display:inline-block;margin-right:5px") CPU: {{ cpuUsage }}%