Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- Replaced legacy components with new `SettingsCard`, `SettingsField`, and `SettingsToggleRow` for a unified design. - Enhanced `AdminListControls` to support compact mode and improved pagination controls. - Updated various sections including `AiAssistantSection`, `AuthenticationSection`, and `DriveMountOAuthSection` to utilize new components, streamlining the settings interface. - Improved accessibility and user experience across admin settings with clearer labels and hints. - Deprecated old components while maintaining backward compatibility for existing admin sections.
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import type { OrgLLMSettings } from "@/lib/admin-settings/org-settings-types"
|
|
import { SettingsCard, SettingsToggleRow } from "@/components/settings/settings-kit"
|
|
|
|
export function AdminOrgLlmPolicyCard({
|
|
draft,
|
|
setDraft,
|
|
}: {
|
|
draft: OrgLLMSettings
|
|
setDraft: React.Dispatch<React.SetStateAction<OrgLLMSettings>>
|
|
}) {
|
|
return (
|
|
<SettingsCard
|
|
title="Politique LLM"
|
|
description="Contrôle l'accès aux fournisseurs IA pour les utilisateurs de l'organisation."
|
|
>
|
|
<SettingsToggleRow
|
|
title="Imposer les fournisseurs org."
|
|
description="Les utilisateurs ne peuvent pas utiliser d'autres clés API."
|
|
checked={draft.enforce_org_providers}
|
|
onCheckedChange={(enforce_org_providers) =>
|
|
setDraft((p) => ({ ...p, enforce_org_providers }))
|
|
}
|
|
/>
|
|
<SettingsToggleRow
|
|
title="Autoriser surcharge utilisateur"
|
|
checked={draft.allow_user_override}
|
|
onCheckedChange={(allow_user_override) =>
|
|
setDraft((p) => ({ ...p, allow_user_override }))
|
|
}
|
|
/>
|
|
</SettingsCard>
|
|
)
|
|
}
|