- brain-engine: server, embed, search, RAG, MCP, start.sh (standalone) - brain-ui: source React complète, build.sh, DocsView avec tier colors - docs: 14 pages guides humains (getting-started, architecture, sessions, workflows, agents, vues tier) - brain-compose.yml v0.9.0: tier featured ajouté, sessions/agents par tier, coach_level, API key schema - DISTRIBUTION_CHECKLIST v1.2: brain-engine + brain-ui + docs dans la checklist
22 lines
734 B
TypeScript
22 lines
734 B
TypeScript
import type { ReactNode } from 'react'
|
|
|
|
interface TierGateProps {
|
|
feature: string
|
|
hasFeature: (f: string) => boolean
|
|
fallback?: ReactNode
|
|
children: ReactNode
|
|
}
|
|
|
|
export default function TierGate({ feature, hasFeature, fallback, children }: TierGateProps) {
|
|
if (!hasFeature(feature)) {
|
|
return fallback ? <>{fallback}</> : (
|
|
<div className="flex flex-col items-center justify-center h-full" style={{ color: '#4b5563' }}>
|
|
<div className="text-3xl mb-3">🔒</div>
|
|
<div className="text-sm font-medium">Fonctionnalité non disponible</div>
|
|
<div className="text-xs mt-1 font-mono" style={{ color: '#374151' }}>{feature} — tier insuffisant</div>
|
|
</div>
|
|
)
|
|
}
|
|
return <>{children}</>
|
|
}
|