0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/apps/portal/src
Sam Lord 2740686d53
Refactored Captcha to simplify usage
ref BAE-397

Moved the hCaptcha component outside of the page level, since it was
complicating the logic within the pages with no good reason.

The hCaptcha component is now attached to the pop-up modal. Since it's
invisible, this doesn't impact layout anyway, but means that any action
can trigger Captcha to run, and use the result within that same action.

This simplifies the flow by having the action itself confirm that
Captcha is enabled, then grabbing the token by running either a
challenge (for self-hosters) or using their enterprise heuristics system
(for Ghost Pro).

This also fixes issues where sites with multiple tiers wouldn't work
with Captcha, since the page had changed and the hCaptcha component was
unloaded.
2025-02-17 08:17:58 +00:00
..
components Refactored Captcha to simplify usage 2025-02-17 08:17:58 +00:00
images Flipped thumbs-down icon horizontally in email and Portal (#19306) 2023-12-11 13:05:11 +00:00
tests Refactored Captcha to simplify usage 2025-02-17 08:17:58 +00:00
utils Refactored Captcha to simplify usage 2025-02-17 08:17:58 +00:00
actions.js Refactored Captcha to simplify usage 2025-02-17 08:17:58 +00:00
App.css
App.js Refactored Captcha to simplify usage 2025-02-17 08:17:58 +00:00
App.test.js Added loading state when ordering comments (#21788) 2024-12-04 10:16:58 +08:00
AppContext.js 🎨 Supported RTL languages in Portal 2024-10-25 16:19:19 +07:00
data-attributes.js Added Captcha to data attribute forms 2025-01-27 16:52:52 +00:00
index.css
index.js 🎨 Updated Portal to accept data-locale (#21420) 2024-11-02 14:19:46 +00:00
logo.svg
pages.js Added basic Recommendations modal (#17877) 2023-08-30 15:24:04 +00:00
setupTests.js