From d7b201c7f79326c168ed92580fb12d1f6c75339c Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Tue, 3 Jan 2023 18:30:56 +0400 Subject: [PATCH] Enable captcha and refactor popup --- package.json | 1 + src/components/Captcha/captcha.js | 2 +- src/components/DownloadPopup.astro | 2 +- src/components/Popup/Popup.astro | 8 +- src/components/Popup/popup.js | 120 ++++++++++++++-------------- src/components/RoadmapHeader.astro | 4 +- src/components/SubscribePopup.astro | 2 +- src/pages/signup.astro | 2 +- 8 files changed, 73 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index 4779bd72e..d413d9bc7 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "private": true, "scripts": { "dev": "astro dev", + "dev:verbose": "astro dev --verbose", "start": "astro dev", "build": "astro build", "preview": "astro preview", diff --git a/src/components/Captcha/captcha.js b/src/components/Captcha/captcha.js index a68f80b86..01189491e 100644 --- a/src/components/Captcha/captcha.js +++ b/src/components/Captcha/captcha.js @@ -25,7 +25,7 @@ class Captcha { target.querySelector('.recaptcha-response').value = captchaResponse; } - target.closest('.modal').classList.add('hidden'); + target.closest('.popup').classList.add('hidden'); return true; } diff --git a/src/components/DownloadPopup.astro b/src/components/DownloadPopup.astro index c9f18bf8a..c06362b68 100644 --- a/src/components/DownloadPopup.astro +++ b/src/components/DownloadPopup.astro @@ -25,7 +25,7 @@ import Captcha from './Captcha/Captcha.astro'; placeholder='Enter your Email' /> - + diff --git a/src/components/Popup/Popup.astro b/src/components/Popup/Popup.astro index f262aa2ae..2797c2037 100644 --- a/src/components/Popup/Popup.astro +++ b/src/components/Popup/Popup.astro @@ -15,17 +15,17 @@ const { id, title, subtitle } = Astro.props;