Security Improvements (P0.0-P0.4): - P0.0: Migrate to Gemini-only AI stack (simplified, single billing) - P0.1: Fix CORS to restrict allowed origins from env (was *) - P0.2: Remove hardcoded dev password, require env var - P0.3: Add rate limiting (slowapi) - 3-10 req/min on sensitive endpoints - P0.4: Add request size limits (100MB default via middleware) New Features: - Unified LLM service with Google Gemini priority - OXML geometry extractor for layout parsing - TSX validator for generated React components - Client ID support in presentation requests with access control - Configurable LLM/image timeouts via env vars Modern Design System (P0.9 - partial): - Enhanced CSS design tokens (primary, semantic colors, shadows) - Typography scale (h1-h4, body variants, caption) - Modern animations (fadeIn, slideIn, scaleIn) - Updated Button component with better variants and hover effects - Created unified Card and StatusBadge components - Applied design system to Dashboard and Settings pages Backend Improvements: - Master deck parser simplification - Slide-to-HTML endpoint cleanup (325 lines removed) - Better error handling in prompts endpoint Frontend Improvements: - Settings UI simplified to show only Google/Gemini - Dashboard uses CSS variables instead of hardcoded colors - Improved button transitions and hover states Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
34 lines
831 B
TypeScript
34 lines
831 B
TypeScript
import { Badge } from "@/components/ui/badge";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
type PresentationStatus = "draft" | "in_review" | "approved";
|
|
|
|
const STATUS_CONFIG = {
|
|
draft: {
|
|
label: "Draft",
|
|
color: "bg-gray-100 text-gray-800 border-gray-200",
|
|
},
|
|
in_review: {
|
|
label: "In Review",
|
|
color: "bg-yellow-100 text-yellow-800 border-yellow-200",
|
|
},
|
|
approved: {
|
|
label: "Approved",
|
|
color: "bg-green-100 text-green-800 border-green-200",
|
|
},
|
|
} as const;
|
|
|
|
interface StatusBadgeProps {
|
|
status: PresentationStatus;
|
|
className?: string;
|
|
}
|
|
|
|
export function StatusBadge({ status, className = "" }: StatusBadgeProps) {
|
|
const config = STATUS_CONFIG[status] || STATUS_CONFIG.draft;
|
|
|
|
return (
|
|
<Badge className={cn(config.color, "border font-medium", className)}>
|
|
{config.label}
|
|
</Badge>
|
|
);
|
|
}
|