Debug logging message, custom script

This commit is contained in:
Natsumi
2022-12-13 19:11:25 +13:00
parent f865d5086d
commit 2fd992edf7
4 changed files with 58 additions and 10 deletions

View File

@@ -4621,6 +4621,7 @@ speechSynthesis.getVoices();
this.updateLoop();
this.getGameLogTable();
this.refreshCustomCss();
this.refreshCustomScript();
this.$nextTick(function () {
this.$el.style.display = '';
if (!this.enablePrimaryPassword) {
@@ -4659,6 +4660,21 @@ speechSynthesis.getVoices();
});
};
$app.methods.refreshCustomScript = function () {
if (document.contains(document.getElementById('app-custom-script'))) {
document.getElementById('app-custom-script').remove();
}
AppApi.CustomScriptPath().then((customScript) => {
var head = document.head;
if (customScript) {
var $appCustomScript = document.createElement('script');
$appCustomScript.setAttribute('id', 'app-custom-script');
$appCustomScript.src = `file://${customScript}?_=${Date.now()}`;
head.appendChild($appCustomScript);
}
});
};
$app.methods.openExternalLink = function (link) {
this.$confirm(`${link}`, 'Open External Link', {
confirmButtonText: 'Confirm',
@@ -6334,7 +6350,7 @@ speechSynthesis.getVoices();
callback: (action, instance) => {
if (action === 'confirm') {
API.verifyTOTP({
code: instance.inputValue
code: instance.inputValue.trim()
})
.catch((err) => {
this.promptTOTP();
@@ -6366,7 +6382,7 @@ speechSynthesis.getVoices();
callback: (action, instance) => {
if (action === 'confirm') {
API.verifyOTP({
code: instance.inputValue
code: instance.inputValue.trim()
})
.catch((err) => {
this.promptOTP();
@@ -6398,7 +6414,7 @@ speechSynthesis.getVoices();
callback: (action, instance) => {
if (action === 'confirm') {
API.verifyEmailOTP({
code: instance.inputValue
code: instance.inputValue.trim()
})
.catch((err) => {
this.promptEmailOTP();
@@ -20336,7 +20352,11 @@ speechSynthesis.getVoices();
$app.methods.checkCanInvite = function (location) {
var L = API.parseLocation(location);
if (L.accessType === 'public' || L.userId === API.currentUser.id) {
if (
L.accessType === 'public' ||
L.accessType === 'group' ||
L.userId === API.currentUser.id
) {
return true;
}
if (L.accessType === 'invite') {
@@ -22889,7 +22909,7 @@ speechSynthesis.getVoices();
});
if ($app.groupDialog.visible && $app.groupDialog.id === groupId) {
$app.groupDialog.inGroup = json.membershipStatus === 'member';
this.getGroupDialogGroup(groupId);
$app.getGroupDialogGroup(groupId);
}
});
@@ -22915,7 +22935,7 @@ speechSynthesis.getVoices();
var groupId = args.params.groupId;
if ($app.groupDialog.visible && $app.groupDialog.id === groupId) {
$app.groupDialog.inGroup = false;
this.getGroupDialogGroup(groupId);
$app.getGroupDialogGroup(groupId);
}
if (
$app.userDialog.visible &&
@@ -23780,6 +23800,13 @@ speechSynthesis.getVoices();
}
};
$app.methods.showNullLogWarning = function () {
this.$alert(
'VRCX noticed your last log file is empty this is normally caused by disabling debug logging. VRCX requires debug logging to be enabled to function correctly. Please enable debug logging in VRChat quick menu settings > debug > enable debug logging, then rejoin the instance or restart VRChat.',
'Enable debug logging'
);
};
$app = new Vue($app);
window.$app = $app;
})();