fix: Error When Creating Group Members/Plus Instance (#1234)

* utils

* fix: Error When Creating Group Members/Plus Instance (#1233)
This commit is contained in:
pa
2025-05-18 02:02:27 +09:00
committed by GitHub
parent efcfd34215
commit 32683d6443
2 changed files with 48 additions and 22 deletions

View File

@@ -130,7 +130,8 @@ import {
deleteVRChatCache,
extractFileId,
extractFileVersion,
getAvailablePlatforms
getAvailablePlatforms,
_utils
} from './composables/shared/utils';
// main app classes
@@ -449,6 +450,7 @@ console.log(`isLinux: ${LINUX}`);
app.methods = { ...app.methods, ...value._methods };
app.data = { ...app.data, ...value._data };
}
app.methods = { ...app.methods, ..._utils };
Object.assign($app, app);
// #endregion
@@ -9882,9 +9884,6 @@ console.log(`isLinux: ${LINUX}`);
params.queueEnabled = D.queueEnabled;
if (D.groupAccessType === 'members') {
params.roleIds = D.roleIds;
params.canRequestInvite = true;
} else if (D.groupAccessType === 'plus') {
params.canRequestInvite = true;
}
}
if (

View File

@@ -1,6 +1,16 @@
import Noty from 'noty';
import utils from '../../classes/utils';
import { compareUnityVersion } from '../avatar/utils';
import {
displayLocation,
isRealInstance,
parseLocation
} from '../instance/utils';
import {
getPrintFileName,
getPrintLocalDate,
isFriendOnline
} from '../user/utils';
function getAvailablePlatforms(unityPackages) {
var isPC = false;
@@ -223,25 +233,9 @@ function extractVariantVersion(url) {
}
}
export {
getAvailablePlatforms,
downloadAndSaveJson,
deleteVRChatCache,
checkVRChatCache,
copyToClipboard,
getFaviconUrl,
convertFileUrlToImageUrl,
replaceVrcPackageUrl,
getLaunchURL,
extractFileId,
extractFileVersion,
extractVariantVersion
};
// ---------------------- devtool method --------------------------
// ---------------------- devtools method --------------------------
// not window.$app
window.getBundleLocation = async function (input) {
async function getBundleLocation(input) {
const $app = window.$app;
var assetUrl = input;
var variant = '';
@@ -318,4 +312,37 @@ window.getBundleLocation = async function (input) {
var fullAssetLocation = `${assetLocation}\\__data`;
console.log(fullAssetLocation);
return fullAssetLocation;
}
const _utils = {
getAvailablePlatforms,
deleteVRChatCache,
checkVRChatCache,
getLaunchURL,
extractFileId,
extractFileVersion,
extractVariantVersion,
isRealInstance,
displayLocation,
parseLocation,
getPrintFileName,
getPrintLocalDate,
isFriendOnline
};
export {
getAvailablePlatforms,
downloadAndSaveJson,
deleteVRChatCache,
checkVRChatCache,
copyToClipboard,
getFaviconUrl,
convertFileUrlToImageUrl,
replaceVrcPackageUrl,
getLaunchURL,
extractFileId,
extractFileVersion,
extractVariantVersion,
getBundleLocation,
_utils
};