From 47c3077c05987ee6169fa49a30ae612183d9629c Mon Sep 17 00:00:00 2001 From: Daniil Lohvinov Date: Tue, 12 Mar 2024 23:33:15 +0200 Subject: [PATCH] fix: captcha [WTEL-4251] --- src/app/css/_main.scss | 2 +- src/install.js | 12 ++++++++---- src/main.js | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/css/_main.scss b/src/app/css/_main.scss index 18caf08..565ecd2 100644 --- a/src/app/css/_main.scss +++ b/src/app/css/_main.scss @@ -6,7 +6,7 @@ // https://developers.google.com/recaptcha/docs/faq#id-like-to-hide-the-recaptcha-badge.-what-is-allowed .grecaptcha-badge { - visibility: hidden; + //visibility: hidden; } .wt-omni-widget--reset-styles, diff --git a/src/install.js b/src/install.js index b2b8842..92e6815 100644 --- a/src/install.js +++ b/src/install.js @@ -66,10 +66,14 @@ export default class WtOmniWidget { config, }) { await this.setConfig(config); - await initializeReCAPTCHA({ - sitekey: config.reCAPTCHA.sitekey, - verifyUrl: config.reCAPTCHA.verifyUrl, - }); + + if (config.captcha) { + await initializeReCAPTCHA({ + sitekey: config.captcha.sitekey, + verifyUrl: config.captcha.verifyUrl, + }); + } + Instance.$mount(selector); } diff --git a/src/main.js b/src/main.js index 1500db9..95f40f7 100644 --- a/src/main.js +++ b/src/main.js @@ -23,7 +23,7 @@ export default new WtOmniWidget('#wt-omni-widget', { url: 'wss://dev.webitel.com/sip', id: 'dania-webchat', }, - reCAPTCHA: { + captcha: { sitekey: '6LdTJJUpAAAAAFlzlOqs3mtaPhEnr0MOgBlc3W4N', verifyUrl: 'https://dev.webitel.com/chat/dania-webchat/captcha', },