feat(admin): manage captcha configuration centrally

- add a dedicated Filament settings tab for captcha drivers
- persist selections into config-compatible schema and migrate legacy keys
- extend captcha manager to consume database overrides transparently

Signed-off-by: Qi HU <github@spcsky.com>
This commit is contained in:
Qi HU
2025-10-13 12:15:33 +08:00
parent 60e1e45d73
commit ce913b7a54
5 changed files with 274 additions and 0 deletions
+42
View File
@@ -103,6 +103,48 @@ return [
'max_uploaded_duration' => '最大上傳量倍數有效時間範圍',
'max_uploaded_duration_help' => '單位:小時。種子發布後的這個時間範圍內,最大上傳量倍數生效,超過此範圍不生效。設置為 0 一直生效',
],
'captcha' => [
'tab_header' => '驗證碼',
'driver' => '驗證碼驅動',
'driver_help' => '選擇在登入等公開頁面顯示的驗證方案。',
'drivers' => [
'image' => '內建圖片驗證碼',
'cloudflare_turnstile' => 'Cloudflare Turnstile',
'google_recaptcha_v2' => 'Google reCAPTCHA v2',
],
'turnstile' => [
'section' => 'Cloudflare Turnstile 設定',
'site_key' => '站點金鑰',
'site_key_help' => '於 Cloudflare Turnstile 後台取得。',
'secret_key' => '私鑰',
'secret_key_help' => '請妥善保存,避免外洩。',
'theme' => '主題',
'theme_help' => '選擇「自動」時會依頁面自動調整。',
'theme_auto' => '自動',
'theme_light' => '淺色',
'theme_dark' => '深色',
'size' => '元件尺寸',
'size_help' => '彈性模式會依容器寬度伸縮。',
'size_normal' => '一般',
'size_compact' => '緊湊',
'size_flexible' => '彈性',
],
'recaptcha' => [
'section' => 'Google reCAPTCHA v2 設定',
'site_key' => '站點金鑰',
'site_key_help' => '於 Google reCAPTCHA 控制台取得。',
'secret_key' => '私鑰',
'secret_key_help' => '請妥善保存,避免外洩。',
'theme' => '主題',
'theme_help' => '深色主題適用於深色背景。',
'theme_light' => '淺色',
'theme_dark' => '深色',
'size' => '元件尺寸',
'size_help' => '緊湊模式適合較狹窄的版面。',
'size_normal' => '一般',
'size_compact' => '緊湊',
],
],
'meilisearch' => [
'tab_header' => 'Meilisearch',
'enabled' => '是否啟用 Meilisearch',