Fix turnstile

This commit is contained in:
2026-10-15 15:53:32 +02:00
parent 7dc93ac5ed
commit 70b676660d
80 changed files with 1136 additions and 902 deletions
+11 -14
View File
@@ -3,12 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
* Dashboard alert (admin.components.beforeDashboard): lists integrations that
* are currently failing, with a link to Site Integrations. Renders nothing when
* everything is fine — and never throws (DB not ready → nothing).
*/ export async function IntegrationAlerts({ adminRoute = '/admin', checks = {
turnstileStatus: 'Turnstile'
}, payload }) {
if (!payload) {
return null;
}
*/ export async function IntegrationAlerts({ payload, checks = {
turnstileStatus: 'Turnstile',
emailStatus: 'Email'
}, adminRoute = '/admin' }) {
if (!payload) return null;
let doc;
try {
doc = await payload.findGlobal({
@@ -22,21 +21,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
label,
status: doc?.[field]
})).filter((x)=>x.status?.state === 'degraded');
if (!failing.length) {
return null;
}
if (!failing.length) return null;
return /*#__PURE__*/ _jsxs("div", {
role: "alert",
style: {
background: 'var(--theme-error-50, rgba(229, 72, 77, 0.08))',
border: '1px solid var(--theme-error-400, #e5484d)',
borderRadius: 4,
marginBottom: '1.5rem',
padding: '1rem 1.25rem'
padding: '1rem 1.25rem',
borderRadius: 4,
border: '1px solid var(--theme-error-400, #e5484d)',
background: 'var(--theme-error-50, rgba(229, 72, 77, 0.08))'
},
children: [
/*#__PURE__*/ _jsx("strong", {
children: "Integration problem — the site still works, but a safeguard is off."
children: "Integration problem — the site still works, but something needs attention."
}),
/*#__PURE__*/ _jsx("ul", {
style: {