diff --git a/package.json b/package.json index 581f460..ff80008 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "omnichannel-widget", - "version": "24.02.0", + "version": "24.02.1", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/app/components/wt-omni-widget.vue b/src/app/components/wt-omni-widget.vue index 51e3678..9c09207 100644 --- a/src/app/components/wt-omni-widget.vue +++ b/src/app/components/wt-omni-widget.vue @@ -92,10 +92,13 @@ export default { subscribeToNetworkConnectionStatus: 'SUBSCRIBE_TO_NETWORK_CONNECTION_STATUS', }), applyGlobalConfig() { - if(this.isPreviewMode === 'chat') this.activeChannel = WidgetChannel.CHAT; // Open chat preview if configuration contains chat preview property + if (this.isPreviewMode === 'chat') this.activeChannel = WidgetChannel.CHAT; // Open chat preview if configuration contains chat preview property if (this.config.view.lang) this.$i18n.locale = this.config.view.lang; document.documentElement.style.setProperty('--wt-omni-widget__accent-color', this.config.view.accentColor); document.documentElement.style.setProperty('--wt-omni-widget__buttons-menu-opacity', this.config.view.btnOpacity); + if (!this.config.captcha?.showFlag) { + document.styleSheets[0].insertRule('.grecaptcha-badge { visibility: hidden; }', 0); + } this.setupOpenTimeout(); }, diff --git a/src/app/css/_main.scss b/src/app/css/_main.scss index 565ecd2..6a4877d 100644 --- a/src/app/css/_main.scss +++ b/src/app/css/_main.scss @@ -4,11 +4,6 @@ @import 'variables/scroll'; @import 'styleguide/placeholder/placeholder'; -// https://developers.google.com/recaptcha/docs/faq#id-like-to-hide-the-recaptcha-badge.-what-is-allowed -.grecaptcha-badge { - //visibility: hidden; -} - .wt-omni-widget--reset-styles, .wt-omni-widget--reset-styles * { /* diff --git a/src/main.js b/src/main.js index 95f40f7..e7270d9 100644 --- a/src/main.js +++ b/src/main.js @@ -26,5 +26,6 @@ export default new WtOmniWidget('#wt-omni-widget', { captcha: { sitekey: '6LdTJJUpAAAAAFlzlOqs3mtaPhEnr0MOgBlc3W4N', verifyUrl: 'https://dev.webitel.com/chat/dania-webchat/captcha', + showFlag: true, }, });