diff --git a/src/stores/auth.js b/src/stores/auth.js index 4d63d81f..7bb40e43 100644 --- a/src/stores/auth.js +++ b/src/stores/auth.js @@ -604,7 +604,8 @@ export const useAuthStore = defineStore('Auth', () => { }) .finally(() => { loginForm.value.loading = false; - }); + }) + .catch(() => {}); return args; } authLogin({ @@ -645,21 +646,23 @@ export const useAuthStore = defineStore('Auth', () => { done(); } } - ).then(({ value, action }) => { - if (action === 'confirm') { - authRequest - .verifyTOTP({ - code: value.trim() - }) - .catch((err) => { - console.error(err); - clearCookiesTryLogin(); - }) - .then(() => { - userStore.getCurrentUser(); - }); - } - }); + ) + .then(({ value, action }) => { + if (action === 'confirm') { + authRequest + .verifyTOTP({ + code: value.trim() + }) + .catch((err) => { + console.error(err); + clearCookiesTryLogin(); + }) + .then(() => { + userStore.getCurrentUser(); + }); + } + }) + .catch(() => {}); } function promptOTP() { @@ -685,21 +688,23 @@ export const useAuthStore = defineStore('Auth', () => { done(); } } - ).then(({ value, action }) => { - if (action === 'confirm') { - authRequest - .verifyOTP({ - code: value.trim() - }) - .catch((err) => { - console.error(err); - clearCookiesTryLogin(); - }) - .then(() => { - userStore.getCurrentUser(); - }); - } - }); + ) + .then(({ value, action }) => { + if (action === 'confirm') { + authRequest + .verifyOTP({ + code: value.trim() + }) + .catch((err) => { + console.error(err); + clearCookiesTryLogin(); + }) + .then(() => { + userStore.getCurrentUser(); + }); + } + }) + .catch(() => {}); } function promptEmailOTP() { @@ -727,21 +732,23 @@ export const useAuthStore = defineStore('Auth', () => { done(); } } - ).then(({ value, action }) => { - if (action === 'confirm') { - authRequest - .verifyEmailOTP({ - code: value.trim() - }) - .catch((err) => { - console.error(err); - promptEmailOTP(); - }) - .then(() => { - userStore.getCurrentUser(); - }); - } - }); + ) + .then(({ value, action }) => { + if (action === 'confirm') { + authRequest + .verifyEmailOTP({ + code: value.trim() + }) + .catch((err) => { + console.error(err); + promptEmailOTP(); + }) + .then(() => { + userStore.getCurrentUser(); + }); + } + }) + .catch(() => {}); } /** diff --git a/src/stores/photon.js b/src/stores/photon.js index 558e9242..ecc60a1a 100644 --- a/src/stores/photon.js +++ b/src/stores/photon.js @@ -417,14 +417,16 @@ export const usePhotonStore = defineStore('Photon', () => { 'prompt.overlay_message_timeout.input_error' ) } - ).then(({ value, action }) => { - if (action === 'confirm' && value && !isNaN(Number(value))) { - state.photonOverlayMessageTimeout = Math.trunc( - Number(value) * 1000 - ); - vrStore.updateVRConfigVars(); - } - }); + ) + .then(({ value, action }) => { + if (action === 'confirm' && value && !isNaN(Number(value))) { + state.photonOverlayMessageTimeout = Math.trunc( + Number(value) * 1000 + ); + vrStore.updateVRConfigVars(); + } + }) + .catch(() => {}); } function promptPhotonLobbyTimeoutThreshold() { @@ -441,13 +443,15 @@ export const usePhotonStore = defineStore('Photon', () => { inputPattern: /\d+$/, inputErrorMessage: t('prompt.photon_lobby_timeout.input_error') } - ).then(({ value, action }) => { - if (action === 'confirm' && value && !isNaN(Number(value))) { - state.photonLobbyTimeoutThreshold = Math.trunc( - Number(value) * 1000 - ); - } - }); + ) + .then(({ value, action }) => { + if (action === 'confirm' && value && !isNaN(Number(value))) { + state.photonLobbyTimeoutThreshold = Math.trunc( + Number(value) * 1000 + ); + } + }) + .catch(() => {}); } function startLobbyWatcherLoop() { diff --git a/src/stores/search.js b/src/stores/search.js index bd1e12d5..591b5648 100644 --- a/src/stores/search.js +++ b/src/stores/search.js @@ -339,17 +339,21 @@ export const useSearchStore = defineStore('Search', () => { inputPattern: /\S+/, inputErrorMessage: t('prompt.direct_access_omni.input_error') } - ).then(({ value, action }) => { - if (action === 'confirm' && value) { - const input = value.trim(); - if (!directAccessParse(input)) { - ElMessage({ - message: t('prompt.direct_access_omni.message.error'), - type: 'error' - }); + ) + .then(({ value, action }) => { + if (action === 'confirm' && value) { + const input = value.trim(); + if (!directAccessParse(input)) { + ElMessage({ + message: t( + 'prompt.direct_access_omni.message.error' + ), + type: 'error' + }); + } } - } - }); + }) + .catch(() => {}); } function showGroupDialogShortCode(shortCode) { diff --git a/src/views/Settings/dialogs/RegistryBackupDialog.vue b/src/views/Settings/dialogs/RegistryBackupDialog.vue index 89037e7b..c8144aff 100644 --- a/src/views/Settings/dialogs/RegistryBackupDialog.vue +++ b/src/views/Settings/dialogs/RegistryBackupDialog.vue @@ -186,17 +186,18 @@ await updateRegistryBackupDialog(); } - async function promptVrcRegistryBackupName() { - try { - const { value } = await ElMessageBox.prompt('Enter a name for the backup', 'Backup Name', { - confirmButtonText: 'Confirm', - cancelButtonText: 'Cancel', - inputPattern: /\S+/, - inputErrorMessage: 'Name is required', - inputValue: 'Backup' - }); - await handleBackupVrcRegistry(value); - } catch (error) {} + function promptVrcRegistryBackupName() { + ElMessageBox.prompt('Enter a name for the backup', 'Backup Name', { + confirmButtonText: 'Confirm', + cancelButtonText: 'Cancel', + inputPattern: /\S+/, + inputErrorMessage: 'Name is required', + inputValue: 'Backup' + }) + .then(({ value }) => { + handleBackupVrcRegistry(value); + }) + .catch(() => {}); } async function openJsonFileSelectorDialogElectron() { diff --git a/src/views/Tools/dialogs/GalleryDialog.vue b/src/views/Tools/dialogs/GalleryDialog.vue index bab0c106..c400d9cc 100644 --- a/src/views/Tools/dialogs/GalleryDialog.vue +++ b/src/views/Tools/dialogs/GalleryDialog.vue @@ -1131,8 +1131,6 @@ }); } }) - .catch(() => { - // on cancel - }); + .catch(() => {}); }