mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
Show player count of current instance in user/world dialog
This commit is contained in:
+16
-1
@@ -3786,6 +3786,12 @@ speechSynthesis.getVoices();
|
|||||||
notyFeed.splice(5);
|
notyFeed.splice(5);
|
||||||
sharedRepository.setArray('wristFeed', wristFeed);
|
sharedRepository.setArray('wristFeed', wristFeed);
|
||||||
sharedRepository.setArray('notyFeed', notyFeed);
|
sharedRepository.setArray('notyFeed', notyFeed);
|
||||||
|
if (this.userDialog.visible) {
|
||||||
|
this.applyUserDialogLocation();
|
||||||
|
}
|
||||||
|
if (this.worldDialog.visible) {
|
||||||
|
this.applyWorldDialogInstances();
|
||||||
|
}
|
||||||
this.playNoty(notyFeed);
|
this.playNoty(notyFeed);
|
||||||
feeds.pendingUpdate = false;
|
feeds.pendingUpdate = false;
|
||||||
};
|
};
|
||||||
@@ -7522,7 +7528,15 @@ speechSynthesis.getVoices();
|
|||||||
users.sort(compareByDisplayName);
|
users.sort(compareByDisplayName);
|
||||||
D.users = users;
|
D.users = users;
|
||||||
D.instance = {};
|
D.instance = {};
|
||||||
if (L.worldId) {
|
if (!L.worldId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.lastLocation.location === L.tag) {
|
||||||
|
D.instance = {
|
||||||
|
id: L.tag,
|
||||||
|
occupants: this.lastLocation.playerList.length
|
||||||
|
};
|
||||||
|
} else {
|
||||||
var applyInstance = function (instances) {
|
var applyInstance = function (instances) {
|
||||||
for (var [id, occupants] of instances) {
|
for (var [id, occupants] of instances) {
|
||||||
if (id === L.instanceId) {
|
if (id === L.instanceId) {
|
||||||
@@ -8048,6 +8062,7 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
instances[instance.id] = instance;
|
instances[instance.id] = instance;
|
||||||
}
|
}
|
||||||
|
instances[instance.id].occupants = this.lastLocation.playerList.length;
|
||||||
var ref = API.cachedUsers.get(API.currentUser.id);
|
var ref = API.cachedUsers.get(API.currentUser.id);
|
||||||
if (typeof ref === 'undefined') {
|
if (typeof ref === 'undefined') {
|
||||||
ref = API.currentUser;
|
ref = API.currentUser;
|
||||||
|
|||||||
+1
-1
@@ -987,7 +987,7 @@ html
|
|||||||
div(v-if="userDialog.ref.location" style="display:flex;flex-direction:column;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #eee")
|
div(v-if="userDialog.ref.location" style="display:flex;flex-direction:column;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #eee")
|
||||||
div(style="flex:none")
|
div(style="flex:none")
|
||||||
location(:location="userDialog.ref.location")
|
location(:location="userDialog.ref.location")
|
||||||
template(#default v-if="userDialog.instance.occupants") ({{ userDialog.instance.occupants }})
|
template(#default v-if="userDialog.instance.occupants") ({{ userDialog.instance.occupants }})
|
||||||
launch(:location="userDialog.ref.location" style="margin-left:5px")
|
launch(:location="userDialog.ref.location" style="margin-left:5px")
|
||||||
invite-yourself(:location="userDialog.ref.location" style="margin-left:5px")
|
invite-yourself(:location="userDialog.ref.location" style="margin-left:5px")
|
||||||
.x-friend-list(style="flex:1;margin-top:10px")
|
.x-friend-list(style="flex:1;margin-top:10px")
|
||||||
|
|||||||
Reference in New Issue
Block a user