diff --git a/src/service/request.js b/src/service/request.js index 60dd6565..fb82621d 100644 --- a/src/service/request.js +++ b/src/service/request.js @@ -187,7 +187,7 @@ export function request(endpoint, options) { ElMessageBox.alert( t('api.error.message.vpn_in_use'), `403 ${t('api.error.message.login_error')}` - ); + ).catch(() => {}); authStore.handleLogoutEvent(); $throw(403, endpoint); } diff --git a/src/stores/game.js b/src/stores/game.js index f9bfb0e8..6d69a6dd 100644 --- a/src/stores/game.js +++ b/src/stores/game.js @@ -223,14 +223,14 @@ export const useGameStore = defineStore('Game', () => { ElMessageBox.alert( 'VRCX has noticed VRChat debug logging is disabled. VRCX requires debug logging in order 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' - ); + ).catch(() => {}); console.error('Failed to enable debug logging', result); return; } ElMessageBox.alert( 'VRCX has noticed VRChat debug logging is disabled and automatically re-enabled it. VRCX requires debug logging in order to function correctly.', 'Enabled debug logging' - ); + ).catch(() => {}); console.log('Enabled debug logging'); } catch (e) { console.error(e); diff --git a/src/stores/settings/advanced.js b/src/stores/settings/advanced.js index af774cbb..a0c14536 100644 --- a/src/stores/settings/advanced.js +++ b/src/stores/settings/advanced.js @@ -641,30 +641,32 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => { type: 'info', showInput: false } - ).then(async ({ action }) => { - if (action === 'confirm') { - const msgBox = ElMessage({ - message: 'Batch print cropping in progress...', - type: 'warning', - duration: 0 - }); - try { - await AppApi.CropAllPrints(ugcFolderPath.value); - ElMessage({ - message: 'Batch print cropping complete', - type: 'success' + ) + .then(async ({ action }) => { + if (action === 'confirm') { + const msgBox = ElMessage({ + message: 'Batch print cropping in progress...', + type: 'warning', + duration: 0 }); - } catch (err) { - console.error(err); - ElMessage({ - message: `Batch print cropping failed: ${err}`, - type: 'error' - }); - } finally { - msgBox.close(); + try { + await AppApi.CropAllPrints(ugcFolderPath.value); + ElMessage({ + message: 'Batch print cropping complete', + type: 'success' + }); + } catch (err) { + console.error(err); + ElMessage({ + message: `Batch print cropping failed: ${err}`, + type: 'error' + }); + } finally { + msgBox.close(); + } } - } - }); + }) + .catch(() => {}); } function askDeleteAllScreenshotMetadata() { @@ -682,11 +684,13 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => { type: 'warning', showInput: false } - ).then(({ action }) => { - if (action === 'confirm') { - deleteAllScreenshotMetadata(); - } - }); + ) + .then(({ action }) => { + if (action === 'confirm') { + deleteAllScreenshotMetadata(); + } + }) + .catch(() => {}); } function deleteAllScreenshotMetadata() { @@ -704,30 +708,32 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => { type: 'warning', showInput: false } - ).then(async ({ action }) => { - if (action === 'confirm') { - const msgBox = ElMessage({ - message: 'Batch metadata removal in progress...', - type: 'warning', - duration: 0 - }); - try { - await AppApi.DeleteAllScreenshotMetadata(); - ElMessage({ - message: 'Batch metadata removal complete', - type: 'success' + ) + .then(async ({ action }) => { + if (action === 'confirm') { + const msgBox = ElMessage({ + message: 'Batch metadata removal in progress...', + type: 'warning', + duration: 0 }); - } catch (err) { - console.error(err); - ElMessage({ - message: `Batch metadata removal failed: ${err}`, - type: 'error' - }); - } finally { - msgBox.close(); + try { + await AppApi.DeleteAllScreenshotMetadata(); + ElMessage({ + message: 'Batch metadata removal complete', + type: 'success' + }); + } catch (err) { + console.error(err); + ElMessage({ + message: `Batch metadata removal failed: ${err}`, + type: 'error' + }); + } finally { + msgBox.close(); + } } - } - }); + }) + .catch(() => {}); } function resetUGCFolder() { diff --git a/src/stores/vrcx.js b/src/stores/vrcx.js index 5a727756..43b9c360 100644 --- a/src/stores/vrcx.js +++ b/src/stores/vrcx.js @@ -701,7 +701,7 @@ export const useVrcxStore = defineStore('Vrcx', () => { ElMessageBox.alert( t('dialog.registry_backup.restore_prompt'), t('dialog.registry_backup.header') - ); + ).catch(() => {}); showRegistryBackupDialog(); await AppApi.FocusWindow(); await configRepository.setString(