mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Catch canceled prompts
This commit is contained in:
@@ -187,7 +187,7 @@ export function request(endpoint, options) {
|
|||||||
ElMessageBox.alert(
|
ElMessageBox.alert(
|
||||||
t('api.error.message.vpn_in_use'),
|
t('api.error.message.vpn_in_use'),
|
||||||
`403 ${t('api.error.message.login_error')}`
|
`403 ${t('api.error.message.login_error')}`
|
||||||
);
|
).catch(() => {});
|
||||||
authStore.handleLogoutEvent();
|
authStore.handleLogoutEvent();
|
||||||
$throw(403, endpoint);
|
$throw(403, endpoint);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,14 +223,14 @@ export const useGameStore = defineStore('Game', () => {
|
|||||||
ElMessageBox.alert(
|
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.',
|
'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'
|
'Enable debug logging'
|
||||||
);
|
).catch(() => {});
|
||||||
console.error('Failed to enable debug logging', result);
|
console.error('Failed to enable debug logging', result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ElMessageBox.alert(
|
ElMessageBox.alert(
|
||||||
'VRCX has noticed VRChat debug logging is disabled and automatically re-enabled it. VRCX requires debug logging in order to function correctly.',
|
'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'
|
'Enabled debug logging'
|
||||||
);
|
).catch(() => {});
|
||||||
console.log('Enabled debug logging');
|
console.log('Enabled debug logging');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
@@ -641,30 +641,32 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
|||||||
type: 'info',
|
type: 'info',
|
||||||
showInput: false
|
showInput: false
|
||||||
}
|
}
|
||||||
).then(async ({ action }) => {
|
)
|
||||||
if (action === 'confirm') {
|
.then(async ({ action }) => {
|
||||||
const msgBox = ElMessage({
|
if (action === 'confirm') {
|
||||||
message: 'Batch print cropping in progress...',
|
const msgBox = ElMessage({
|
||||||
type: 'warning',
|
message: 'Batch print cropping in progress...',
|
||||||
duration: 0
|
type: 'warning',
|
||||||
});
|
duration: 0
|
||||||
try {
|
|
||||||
await AppApi.CropAllPrints(ugcFolderPath.value);
|
|
||||||
ElMessage({
|
|
||||||
message: 'Batch print cropping complete',
|
|
||||||
type: 'success'
|
|
||||||
});
|
});
|
||||||
} catch (err) {
|
try {
|
||||||
console.error(err);
|
await AppApi.CropAllPrints(ugcFolderPath.value);
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: `Batch print cropping failed: ${err}`,
|
message: 'Batch print cropping complete',
|
||||||
type: 'error'
|
type: 'success'
|
||||||
});
|
});
|
||||||
} finally {
|
} catch (err) {
|
||||||
msgBox.close();
|
console.error(err);
|
||||||
|
ElMessage({
|
||||||
|
message: `Batch print cropping failed: ${err}`,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
msgBox.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
});
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function askDeleteAllScreenshotMetadata() {
|
function askDeleteAllScreenshotMetadata() {
|
||||||
@@ -682,11 +684,13 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
showInput: false
|
showInput: false
|
||||||
}
|
}
|
||||||
).then(({ action }) => {
|
)
|
||||||
if (action === 'confirm') {
|
.then(({ action }) => {
|
||||||
deleteAllScreenshotMetadata();
|
if (action === 'confirm') {
|
||||||
}
|
deleteAllScreenshotMetadata();
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteAllScreenshotMetadata() {
|
function deleteAllScreenshotMetadata() {
|
||||||
@@ -704,30 +708,32 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
showInput: false
|
showInput: false
|
||||||
}
|
}
|
||||||
).then(async ({ action }) => {
|
)
|
||||||
if (action === 'confirm') {
|
.then(async ({ action }) => {
|
||||||
const msgBox = ElMessage({
|
if (action === 'confirm') {
|
||||||
message: 'Batch metadata removal in progress...',
|
const msgBox = ElMessage({
|
||||||
type: 'warning',
|
message: 'Batch metadata removal in progress...',
|
||||||
duration: 0
|
type: 'warning',
|
||||||
});
|
duration: 0
|
||||||
try {
|
|
||||||
await AppApi.DeleteAllScreenshotMetadata();
|
|
||||||
ElMessage({
|
|
||||||
message: 'Batch metadata removal complete',
|
|
||||||
type: 'success'
|
|
||||||
});
|
});
|
||||||
} catch (err) {
|
try {
|
||||||
console.error(err);
|
await AppApi.DeleteAllScreenshotMetadata();
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: `Batch metadata removal failed: ${err}`,
|
message: 'Batch metadata removal complete',
|
||||||
type: 'error'
|
type: 'success'
|
||||||
});
|
});
|
||||||
} finally {
|
} catch (err) {
|
||||||
msgBox.close();
|
console.error(err);
|
||||||
|
ElMessage({
|
||||||
|
message: `Batch metadata removal failed: ${err}`,
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
msgBox.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
});
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetUGCFolder() {
|
function resetUGCFolder() {
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
|||||||
ElMessageBox.alert(
|
ElMessageBox.alert(
|
||||||
t('dialog.registry_backup.restore_prompt'),
|
t('dialog.registry_backup.restore_prompt'),
|
||||||
t('dialog.registry_backup.header')
|
t('dialog.registry_backup.header')
|
||||||
);
|
).catch(() => {});
|
||||||
showRegistryBackupDialog();
|
showRegistryBackupDialog();
|
||||||
await AppApi.FocusWindow();
|
await AppApi.FocusWindow();
|
||||||
await configRepository.setString(
|
await configRepository.setString(
|
||||||
|
|||||||
Reference in New Issue
Block a user