Groups plus

This commit is contained in:
Natsumi
2023-06-01 08:50:06 +12:00
parent 47ddea756f
commit c409a8189c
4 changed files with 60 additions and 6 deletions

View File

@@ -881,8 +881,11 @@ speechSynthesis.getVoices();
var L = API.parseLocation(instanceId);
var groupAccessType = '';
if (L.groupAccessType) {
if (L.groupAccessType === 'public')
if (L.groupAccessType === 'public') {
groupAccessType = 'Public';
} else if (L.groupAccessType === 'plus') {
groupAccessType = 'Plus';
}
}
if (L.isOffline) {
this.text = 'Offline';
@@ -1019,6 +1022,8 @@ speechSynthesis.getVoices();
if (this.locationobject.groupAccessType) {
if (this.locationobject.groupAccessType === 'public') {
this.groupAccessType = 'Public';
} else if (this.locationobject.groupAccessType === 'plus') {
this.groupAccessType = 'Plus';
}
}
@@ -4671,7 +4676,27 @@ speechSynthesis.getVoices();
$app.onGroupLeft(groupId);
break;
case 'group-role-updated':
var groupId = content.role.groupId;
console.log('group-role-updated', content);
// content {
// role: {
// createdAt: string,
// description: string,
// groupId: string,
// id: string,
// isManagementRole: boolean,
// isSelfAssignable: boolean,
// name: string,
// order: number,
// permissions: string[],
// requiresPurchase: boolean,
// requiresTwoFactor: boolean
break;
case 'group-member-updated':
var groupId = content.groupId;
console.log('group-member-updated', content);
// content {
// groupId: string,
// id: string,
@@ -11799,6 +11824,8 @@ speechSynthesis.getVoices();
if (L.groupAccessType) {
if (L.groupAccessType === 'public') {
groupAccessType = 'Public';
} else if (L.groupAccessType === 'plus') {
groupAccessType = 'Plus';
}
}
switch (L.accessType) {
@@ -15751,6 +15778,7 @@ speechSynthesis.getVoices();
ref: {},
isPC: false,
isQuest: false,
isIos: false,
inCache: false,
cacheSize: '',
fileCreatedAt: '',
@@ -15768,6 +15796,7 @@ speechSynthesis.getVoices();
ref: {},
isPC: false,
isQuest: false,
isIos: false,
inCache: false,
cacheSize: '',
fileCreatedAt: '',
@@ -15779,6 +15808,7 @@ speechSynthesis.getVoices();
ref: {},
isPC: false,
isQuest: false,
isIos: false,
inCache: false,
cacheSize: '',
fileCreatedAt: '',
@@ -15790,11 +15820,12 @@ speechSynthesis.getVoices();
worldId: L.worldId
}).then((args) => {
this.currentInstanceWorld.ref = args.ref;
var { isPC, isQuest } = this.getAvailablePlatforms(
var { isPC, isQuest, isIos } = this.getAvailablePlatforms(
args.ref.unityPackages
);
this.currentInstanceWorld.isPC = isPC;
this.currentInstanceWorld.isQuest = isQuest;
this.currentInstanceWorld.isIos = isIos;
this.checkVRChatCache(args.ref).then((cacheInfo) => {
if (cacheInfo[0] > 0) {
this.currentInstanceWorld.inCache = true;
@@ -15816,11 +15847,12 @@ speechSynthesis.getVoices();
worldId: this.currentInstanceLocation.worldId
}).then((args) => {
this.currentInstanceWorld.ref = args.ref;
var { isPC, isQuest } = this.getAvailablePlatforms(
var { isPC, isQuest, isIos } = this.getAvailablePlatforms(
args.ref.unityPackages
);
this.currentInstanceWorld.isPC = isPC;
this.currentInstanceWorld.isQuest = isQuest;
this.currentInstanceWorld.isIos = isIos;
this.checkVRChatCache(args.ref).then((cacheInfo) => {
if (cacheInfo[0] > 0) {
this.currentInstanceWorld.inCache = true;
@@ -15836,16 +15868,19 @@ speechSynthesis.getVoices();
$app.methods.getAvailablePlatforms = function (unityPackages) {
var isPC = false;
var isQuest = false;
var isIos = false;
if (typeof unityPackages === 'object') {
for (var unityPackage of unityPackages) {
if (unityPackage.platform === 'standalonewindows') {
isPC = true;
} else if (unityPackage.platform === 'android') {
isQuest = true;
} else if (unityPackage.platform === 'ios') {
isIos = true;
}
}
}
return { isPC, isQuest };
return { isPC, isQuest, isIos };
};
$app.methods.selectCurrentInstanceRow = function (val) {
@@ -16409,7 +16444,8 @@ speechSynthesis.getVoices();
visitCount: 0,
timeSpent: 0,
isPC: false,
isQuest: false
isQuest: false,
isIos: false
};
API.$on('LOGOUT', function () {
@@ -16534,6 +16570,7 @@ speechSynthesis.getVoices();
D.timeSpent = 0;
D.isPC = false;
D.isQuest = false;
D.isIos = false;
var LL = API.parseLocation(this.lastLocation.location);
var currentWorldMatch = false;
if (LL.worldId === D.id) {
@@ -16576,11 +16613,12 @@ speechSynthesis.getVoices();
D.id
);
}
var { isPC, isQuest } = this.getAvailablePlatforms(
var { isPC, isQuest, isIos } = this.getAvailablePlatforms(
args.ref.unityPackages
);
D.isPC = isPC;
D.isQuest = isQuest;
D.isIos = isIos;
this.updateVRChatWorldCache();
if (args.cache) {
API.getWorld(args.params)
@@ -25201,6 +25239,7 @@ speechSynthesis.getVoices();
D.ownerDisplayName = args1.ref.displayName;
return args1;
});
this.applyGroupDialogInstances();
this.getGroupDialogGroup(groupId);
}
});