mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
Fix 2FA dialog not opening & notifications table
This commit is contained in:
@@ -488,6 +488,17 @@ speechSynthesis.getVoices();
|
|||||||
this.$emit('AUTOLOGIN');
|
this.$emit('AUTOLOGIN');
|
||||||
throw new Error('401: Missing Credentials');
|
throw new Error('401: Missing Credentials');
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
status === 401 &&
|
||||||
|
data.error.message === '"Unauthorized"' &&
|
||||||
|
endpoint !== 'auth/user'
|
||||||
|
) {
|
||||||
|
// trigger 2FA dialog
|
||||||
|
if (!$app.twoFactorAuthDialogVisible) {
|
||||||
|
$app.API.getCurrentUser();
|
||||||
|
}
|
||||||
|
throw new Error('401: Unauthorized');
|
||||||
|
}
|
||||||
if (status === 403 && endpoint.substring(0, 6) === 'config') {
|
if (status === 403 && endpoint.substring(0, 6) === 'config') {
|
||||||
$app.$alert(
|
$app.$alert(
|
||||||
'VRChat currently blocks most VPNs. Please disable any connected VPNs and try again.',
|
'VRChat currently blocks most VPNs. Please disable any connected VPNs and try again.',
|
||||||
|
|||||||
@@ -800,7 +800,7 @@ class Database {
|
|||||||
row.$isExpired = true;
|
row.$isExpired = true;
|
||||||
}
|
}
|
||||||
notifications.unshift(row);
|
notifications.unshift(row);
|
||||||
}, `SELECT * FROM ${Database.userPrefix}_notifications ORDER BY id DESC LIMIT ${Database.maxTableSize}`);
|
}, `SELECT * FROM ${Database.userPrefix}_notifications ORDER BY created_at DESC LIMIT ${Database.maxTableSize}`);
|
||||||
return notifications;
|
return notifications;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user