From a6ec2b779e6d1ed8eee63e00a7f8b71a648e5223 Mon Sep 17 00:00:00 2001 From: Abhinav Raut Date: Sat, 27 Dec 2025 16:34:11 +0530 Subject: [PATCH] fix inbox form submissions --- frontend/src/assets/styles/main.scss | 2 +- .../features/admin/inbox/EmailInboxForm.vue | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/frontend/src/assets/styles/main.scss b/frontend/src/assets/styles/main.scss index 23810471..2b688204 100644 --- a/frontend/src/assets/styles/main.scss +++ b/frontend/src/assets/styles/main.scss @@ -162,7 +162,7 @@ --border: 240 5% 18%; --input: 240 5% 16%; - --ring: 235 86% 65%; + --ring: 240 4.9% 83.9%; --private: 30 35% 18%; --canvas: 240 7% 15%; } diff --git a/frontend/src/features/admin/inbox/EmailInboxForm.vue b/frontend/src/features/admin/inbox/EmailInboxForm.vue index 6a70deac..4baa8242 100644 --- a/frontend/src/features/admin/inbox/EmailInboxForm.vue +++ b/frontend/src/features/admin/inbox/EmailInboxForm.vue @@ -54,9 +54,9 @@ - +

{{ $t('admin.inbox.csatSurveys.description_2') }} - +

@@ -718,6 +718,7 @@ const form = useForm({ from: '', enabled: true, csat_enabled: false, + auth_type: AUTH_TYPE_PASSWORD, imap: { host: 'imap.gmail.com', port: 993, @@ -845,14 +846,6 @@ const copyToClipboard = async (text) => { } } -// Detect OAuth mode from form values -watch( - () => form.values?.config?.auth_type, - (authType) => { - isOAuthInbox.value = authType === AUTH_TYPE_OAUTH2 - }, - { immediate: true } -) watch( () => props.initialValues, @@ -860,7 +853,11 @@ watch( if (Object.keys(newValues).length === 0) { return } - if (Object.keys(newValues?.imap || {}).length > 0) { + if (newValues.config?.auth_type === AUTH_TYPE_OAUTH2) { + isOAuthInbox.value = true + setupMethod.value = 'oauth' + } else { + isOAuthInbox.value = false setupMethod.value = 'manual' } form.setValues(newValues)