diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/assets/javascripts/captcha | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/captcha')
3 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/captcha/apollo_captcha_link.js b/app/assets/javascripts/captcha/apollo_captcha_link.js index d63ffaf5f1a..2d154139c7b 100644 --- a/app/assets/javascripts/captcha/apollo_captcha_link.js +++ b/app/assets/javascripts/captcha/apollo_captcha_link.js @@ -12,7 +12,7 @@ export const apolloCaptchaLink = new ApolloLink((operation, forward) => const spamLogId = captchaError.extensions.spam_log_id; return new Observable((observer) => { - import('~/captcha/wait_for_captcha_to_be_solved') + import('jh_else_ce/captcha/wait_for_captcha_to_be_solved') .then(({ waitForCaptchaToBeSolved }) => waitForCaptchaToBeSolved(captchaSiteKey)) .then((captchaResponse) => { // If the captcha was solved correctly, we re-do our action while setting diff --git a/app/assets/javascripts/captcha/captcha_modal.vue b/app/assets/javascripts/captcha/captcha_modal.vue index a98a52a3130..b8b90b04beb 100644 --- a/app/assets/javascripts/captcha/captcha_modal.vue +++ b/app/assets/javascripts/captcha/captcha_modal.vue @@ -1,7 +1,7 @@ <script> -// NOTE 1: This is similar to recaptcha_modal.vue, but it directly uses the reCAPTCHA Javascript API -// (https://developers.google.com/recaptcha/docs/display#js_api) and gl-modal, rather than relying -// on the form-based ReCAPTCHA HTML being pre-rendered by the backend and using deprecated-modal. +// NOTE 1: This modal directly uses the reCAPTCHA Javascript API +// (https://developers.google.com/recaptcha/docs/display#js_api) and gl-modal, +// rather than relying form-based reCAPTCHA HTML being pre-rendered by the backend. // NOTE 2: Even though this modal currently only supports reCAPTCHA, we use 'captcha' instead // of 'recaptcha' throughout the code, so that we can easily add support for future alternative diff --git a/app/assets/javascripts/captcha/captcha_modal_axios_interceptor.js b/app/assets/javascripts/captcha/captcha_modal_axios_interceptor.js index fdab188f6be..19fde2500f1 100644 --- a/app/assets/javascripts/captcha/captcha_modal_axios_interceptor.js +++ b/app/assets/javascripts/captcha/captcha_modal_axios_interceptor.js @@ -9,7 +9,9 @@ function needsCaptchaResponse(err) { const showCaptchaModalAndResubmit = async (axios, data, errConfig) => { // NOTE: We asynchronously import and unbox the module. Since this is included globally, we don't // do a regular import because that would increase the size of the webpack bundle. - const { waitForCaptchaToBeSolved } = await import('~/captcha/wait_for_captcha_to_be_solved'); + const { waitForCaptchaToBeSolved } = await import( + 'jh_else_ce/captcha/wait_for_captcha_to_be_solved' + ); // show the CAPTCHA modal and wait for it to be solved or closed const captchaResponse = await waitForCaptchaToBeSolved(data.captcha_site_key); |