feat: brain-engine + brain-ui + docs — template full stack standalone
- 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
This commit is contained in:
21
brain-ui/src/components/TierGate.tsx
Normal file
21
brain-ui/src/components/TierGate.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
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}</>
|
||||
}
|
||||
Reference in New Issue
Block a user