mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Catch closing dialogs
This commit is contained in:
@@ -604,7 +604,8 @@ export const useAuthStore = defineStore('Auth', () => {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loginForm.value.loading = false;
|
loginForm.value.loading = false;
|
||||||
});
|
})
|
||||||
|
.catch(() => {});
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
authLogin({
|
authLogin({
|
||||||
@@ -645,21 +646,23 @@ export const useAuthStore = defineStore('Auth', () => {
|
|||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
).then(({ value, action }) => {
|
)
|
||||||
if (action === 'confirm') {
|
.then(({ value, action }) => {
|
||||||
authRequest
|
if (action === 'confirm') {
|
||||||
.verifyTOTP({
|
authRequest
|
||||||
code: value.trim()
|
.verifyTOTP({
|
||||||
})
|
code: value.trim()
|
||||||
.catch((err) => {
|
})
|
||||||
console.error(err);
|
.catch((err) => {
|
||||||
clearCookiesTryLogin();
|
console.error(err);
|
||||||
})
|
clearCookiesTryLogin();
|
||||||
.then(() => {
|
})
|
||||||
userStore.getCurrentUser();
|
.then(() => {
|
||||||
});
|
userStore.getCurrentUser();
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function promptOTP() {
|
function promptOTP() {
|
||||||
@@ -685,21 +688,23 @@ export const useAuthStore = defineStore('Auth', () => {
|
|||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
).then(({ value, action }) => {
|
)
|
||||||
if (action === 'confirm') {
|
.then(({ value, action }) => {
|
||||||
authRequest
|
if (action === 'confirm') {
|
||||||
.verifyOTP({
|
authRequest
|
||||||
code: value.trim()
|
.verifyOTP({
|
||||||
})
|
code: value.trim()
|
||||||
.catch((err) => {
|
})
|
||||||
console.error(err);
|
.catch((err) => {
|
||||||
clearCookiesTryLogin();
|
console.error(err);
|
||||||
})
|
clearCookiesTryLogin();
|
||||||
.then(() => {
|
})
|
||||||
userStore.getCurrentUser();
|
.then(() => {
|
||||||
});
|
userStore.getCurrentUser();
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function promptEmailOTP() {
|
function promptEmailOTP() {
|
||||||
@@ -727,21 +732,23 @@ export const useAuthStore = defineStore('Auth', () => {
|
|||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
).then(({ value, action }) => {
|
)
|
||||||
if (action === 'confirm') {
|
.then(({ value, action }) => {
|
||||||
authRequest
|
if (action === 'confirm') {
|
||||||
.verifyEmailOTP({
|
authRequest
|
||||||
code: value.trim()
|
.verifyEmailOTP({
|
||||||
})
|
code: value.trim()
|
||||||
.catch((err) => {
|
})
|
||||||
console.error(err);
|
.catch((err) => {
|
||||||
promptEmailOTP();
|
console.error(err);
|
||||||
})
|
promptEmailOTP();
|
||||||
.then(() => {
|
})
|
||||||
userStore.getCurrentUser();
|
.then(() => {
|
||||||
});
|
userStore.getCurrentUser();
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -417,14 +417,16 @@ export const usePhotonStore = defineStore('Photon', () => {
|
|||||||
'prompt.overlay_message_timeout.input_error'
|
'prompt.overlay_message_timeout.input_error'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
).then(({ value, action }) => {
|
)
|
||||||
if (action === 'confirm' && value && !isNaN(Number(value))) {
|
.then(({ value, action }) => {
|
||||||
state.photonOverlayMessageTimeout = Math.trunc(
|
if (action === 'confirm' && value && !isNaN(Number(value))) {
|
||||||
Number(value) * 1000
|
state.photonOverlayMessageTimeout = Math.trunc(
|
||||||
);
|
Number(value) * 1000
|
||||||
vrStore.updateVRConfigVars();
|
);
|
||||||
}
|
vrStore.updateVRConfigVars();
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function promptPhotonLobbyTimeoutThreshold() {
|
function promptPhotonLobbyTimeoutThreshold() {
|
||||||
@@ -441,13 +443,15 @@ export const usePhotonStore = defineStore('Photon', () => {
|
|||||||
inputPattern: /\d+$/,
|
inputPattern: /\d+$/,
|
||||||
inputErrorMessage: t('prompt.photon_lobby_timeout.input_error')
|
inputErrorMessage: t('prompt.photon_lobby_timeout.input_error')
|
||||||
}
|
}
|
||||||
).then(({ value, action }) => {
|
)
|
||||||
if (action === 'confirm' && value && !isNaN(Number(value))) {
|
.then(({ value, action }) => {
|
||||||
state.photonLobbyTimeoutThreshold = Math.trunc(
|
if (action === 'confirm' && value && !isNaN(Number(value))) {
|
||||||
Number(value) * 1000
|
state.photonLobbyTimeoutThreshold = Math.trunc(
|
||||||
);
|
Number(value) * 1000
|
||||||
}
|
);
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function startLobbyWatcherLoop() {
|
function startLobbyWatcherLoop() {
|
||||||
|
|||||||
@@ -339,17 +339,21 @@ export const useSearchStore = defineStore('Search', () => {
|
|||||||
inputPattern: /\S+/,
|
inputPattern: /\S+/,
|
||||||
inputErrorMessage: t('prompt.direct_access_omni.input_error')
|
inputErrorMessage: t('prompt.direct_access_omni.input_error')
|
||||||
}
|
}
|
||||||
).then(({ value, action }) => {
|
)
|
||||||
if (action === 'confirm' && value) {
|
.then(({ value, action }) => {
|
||||||
const input = value.trim();
|
if (action === 'confirm' && value) {
|
||||||
if (!directAccessParse(input)) {
|
const input = value.trim();
|
||||||
ElMessage({
|
if (!directAccessParse(input)) {
|
||||||
message: t('prompt.direct_access_omni.message.error'),
|
ElMessage({
|
||||||
type: 'error'
|
message: t(
|
||||||
});
|
'prompt.direct_access_omni.message.error'
|
||||||
|
),
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
});
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showGroupDialogShortCode(shortCode) {
|
function showGroupDialogShortCode(shortCode) {
|
||||||
|
|||||||
@@ -186,17 +186,18 @@
|
|||||||
await updateRegistryBackupDialog();
|
await updateRegistryBackupDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function promptVrcRegistryBackupName() {
|
function promptVrcRegistryBackupName() {
|
||||||
try {
|
ElMessageBox.prompt('Enter a name for the backup', 'Backup Name', {
|
||||||
const { value } = await ElMessageBox.prompt('Enter a name for the backup', 'Backup Name', {
|
confirmButtonText: 'Confirm',
|
||||||
confirmButtonText: 'Confirm',
|
cancelButtonText: 'Cancel',
|
||||||
cancelButtonText: 'Cancel',
|
inputPattern: /\S+/,
|
||||||
inputPattern: /\S+/,
|
inputErrorMessage: 'Name is required',
|
||||||
inputErrorMessage: 'Name is required',
|
inputValue: 'Backup'
|
||||||
inputValue: 'Backup'
|
})
|
||||||
});
|
.then(({ value }) => {
|
||||||
await handleBackupVrcRegistry(value);
|
handleBackupVrcRegistry(value);
|
||||||
} catch (error) {}
|
})
|
||||||
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openJsonFileSelectorDialogElectron() {
|
async function openJsonFileSelectorDialogElectron() {
|
||||||
|
|||||||
@@ -1131,8 +1131,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {});
|
||||||
// on cancel
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user