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:
parent
3967fa955a
commit
fe5d11754a
@ -2,7 +2,7 @@
|
|||||||
name = "calcomblock"
|
name = "calcomblock"
|
||||||
display_name = "Cal.com Booking"
|
display_name = "Cal.com Booking"
|
||||||
scope = "@ninja"
|
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."
|
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"
|
kind = "plugin"
|
||||||
categories = ["forms"]
|
categories = ["forms"]
|
||||||
|
|||||||
@ -318,6 +318,20 @@ function CalcomBlockEditor({ content, onChange }: BlockEditorProps) {
|
|||||||
aria-label={t("calcom.editor.showTimezone.label", "Show Timezone Selector")}
|
aria-label={t("calcom.editor.showTimezone.label", "Show Timezone Selector")}
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
|||||||
@ -18,5 +18,10 @@
|
|||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^6.4.1"
|
"vite": "^6.4.1"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"onlyBuiltDependencies": [
|
||||||
|
"esbuild"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user