mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 14:26:06 +02:00
Fix bulk unfriend and entering YouTube API key
This commit is contained in:
@@ -288,6 +288,7 @@ export function $throw(code, error, endpoint) {
|
|||||||
let ignoreError = false;
|
let ignoreError = false;
|
||||||
if (
|
if (
|
||||||
(code === 404 || code === -1) &&
|
(code === 404 || code === -1) &&
|
||||||
|
typeof endpoint === 'string' &&
|
||||||
endpoint.split('/').length === 2 &&
|
endpoint.split('/').length === 2 &&
|
||||||
(endpoint.startsWith('users/') ||
|
(endpoint.startsWith('users/') ||
|
||||||
endpoint.startsWith('worlds/') ||
|
endpoint.startsWith('worlds/') ||
|
||||||
@@ -299,11 +300,11 @@ export function $throw(code, error, endpoint) {
|
|||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
(code === 403 || code === 404 || code === -1) &&
|
(code === 403 || code === 404 || code === -1) &&
|
||||||
endpoint.startsWith('instances/')
|
endpoint?.startsWith('instances/')
|
||||||
) {
|
) {
|
||||||
ignoreError = true;
|
ignoreError = true;
|
||||||
}
|
}
|
||||||
if (endpoint.startsWith('analysis/')) {
|
if (endpoint?.startsWith('analysis/')) {
|
||||||
ignoreError = true;
|
ignoreError = true;
|
||||||
}
|
}
|
||||||
if (text.length && !ignoreError) {
|
if (text.length && !ignoreError) {
|
||||||
|
|||||||
@@ -1399,11 +1399,13 @@ export const useGameLogStore = defineStore('GameLog', () => {
|
|||||||
confirmButtonText: 'Confirm',
|
confirmButtonText: 'Confirm',
|
||||||
cancelButtonText: 'Cancel',
|
cancelButtonText: 'Cancel',
|
||||||
type: 'info'
|
type: 'info'
|
||||||
}).then(({ action }) => {
|
})
|
||||||
if (action === 'confirm') {
|
.then(({ action }) => {
|
||||||
advancedSettingsStore.setGameLogDisabled();
|
if (action === 'confirm') {
|
||||||
}
|
advancedSettingsStore.setGameLogDisabled();
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
advancedSettingsStore.setGameLogDisabled();
|
advancedSettingsStore.setGameLogDisabled();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
|||||||
* @param {string} videoId
|
* @param {string} videoId
|
||||||
*/
|
*/
|
||||||
async function lookupYouTubeVideo(videoId) {
|
async function lookupYouTubeVideo(videoId) {
|
||||||
if (!youTubeApi.value) {
|
if (!youTubeApiKey.value) {
|
||||||
console.warn('no Youtube API key configured');
|
console.warn('no Youtube API key configured');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -392,7 +392,7 @@
|
|||||||
inputValue: pending.join('\r\n')
|
inputValue: pending.join('\r\n')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then((action) => {
|
.then(({ action }) => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
bulkUnfriendSelection();
|
bulkUnfriendSelection();
|
||||||
}
|
}
|
||||||
@@ -402,8 +402,10 @@
|
|||||||
|
|
||||||
function bulkUnfriendSelection() {
|
function bulkUnfriendSelection() {
|
||||||
friendsListTable.data.forEach((item) => {
|
friendsListTable.data.forEach((item) => {
|
||||||
if (item.$selected)
|
if (item.$selected) {
|
||||||
|
console.log(`Unfriending ${item.displayName} (${item.id})`);
|
||||||
friendRequest.deleteFriend({ userId: item.id }).then((args) => handleFriendDelete(args));
|
friendRequest.deleteFriend({ userId: item.id }).then((args) => handleFriendDelete(args));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user