feat(editor): expose the captchaEnabled toggle — v2.0.5

The schema declares captchaEnabled (x-editor checkbox) but the custom
MF editor replaces schema-driven rendering and never drew a control for
it, so the captcha gate could not be enabled through the visual editor
at all. Add the switch beside Show Timezone. pnpm build-script approval
for esbuild (package.json onlyBuiltDependencies) so the editor bundle
rebuilds non-interactively.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-07-08 00:15:30 +08:00
parent 3967fa955a
commit fe5d11754a
3 changed files with 20 additions and 1 deletions

View File

@ -2,7 +2,7 @@
name = "calcomblock"
display_name = "Cal.com Booking"
scope = "@ninja"
version = "2.0.4"
version = "2.0.5"
description = "Embeddable Cal.com booking calendar block with custom styling, timezone-aware slot windowing, honeypot + captcha + rate-limited public booking endpoints, and webhook receiver."
kind = "plugin"
categories = ["forms"]

View File

@ -318,6 +318,20 @@ function CalcomBlockEditor({ content, onChange }: BlockEditorProps) {
aria-label={t("calcom.editor.showTimezone.label", "Show Timezone Selector")}
/>
</div>
<div className="flex items-center justify-between rounded-lg border p-3">
<div className="space-y-0.5">
<Label>{t("calcom.editor.captchaEnabled.label", "Enable captcha")}</Label>
<p className="text-xs text-muted-foreground">
{t("calcom.editor.captchaEnabled.help", "Require visitors to solve a privacy-friendly proof-of-work captcha before booking (spam protection).")}
</p>
</div>
<Switch
checked={getBool("captchaEnabled", false)}
onCheckedChange={(v) => handleFieldChange("captchaEnabled", v)}
aria-label={t("calcom.editor.captchaEnabled.label", "Enable captcha")}
/>
</div>
</CardContent>
</Card>

View File

@ -18,5 +18,10 @@
"react-dom": "^18.3.1",
"typescript": "^5.9.3",
"vite": "^6.4.1"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
]
}
}