Catch canceled prompts

This commit is contained in:
Natsumi
2025-10-23 18:27:21 +11:00
parent 99bc15e2ba
commit 8024cfc1dd
4 changed files with 59 additions and 53 deletions

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -641,7 +641,8 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
type: 'info',
showInput: false
}
).then(async ({ action }) => {
)
.then(async ({ action }) => {
if (action === 'confirm') {
const msgBox = ElMessage({
message: 'Batch print cropping in progress...',
@@ -664,7 +665,8 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
msgBox.close();
}
}
});
})
.catch(() => {});
}
function askDeleteAllScreenshotMetadata() {
@@ -682,11 +684,13 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
type: 'warning',
showInput: false
}
).then(({ action }) => {
)
.then(({ action }) => {
if (action === 'confirm') {
deleteAllScreenshotMetadata();
}
});
})
.catch(() => {});
}
function deleteAllScreenshotMetadata() {
@@ -704,7 +708,8 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
type: 'warning',
showInput: false
}
).then(async ({ action }) => {
)
.then(async ({ action }) => {
if (action === 'confirm') {
const msgBox = ElMessage({
message: 'Batch metadata removal in progress...',
@@ -727,7 +732,8 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
msgBox.close();
}
}
});
})
.catch(() => {});
}
function resetUGCFolder() {

View File

@@ -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(