|
| 1 | +import { motion } from 'framer-motion'; |
| 2 | +import { Settings, Globe, Key, Bell, Shield } from 'lucide-react'; |
| 3 | +import { useAuth } from '../hooks/useAuth'; |
| 4 | + |
| 5 | +export const SettingsPage: React.FC = () => { |
| 6 | + const { user, logout } = useAuth(); |
| 7 | + |
| 8 | + return ( |
| 9 | + <motion.div |
| 10 | + className="p-6 max-w-3xl mx-auto" |
| 11 | + initial={{ opacity: 0, y: 8 }} |
| 12 | + animate={{ opacity: 1, y: 0 }} |
| 13 | + transition={{ duration: 0.2 }} |
| 14 | + > |
| 15 | + <div className="mb-8"> |
| 16 | + <p className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E] mb-1">Configuration</p> |
| 17 | + <h1 className="text-2xl font-display text-[#1A1814]">Settings</h1> |
| 18 | + </div> |
| 19 | + |
| 20 | + <div className="space-y-4"> |
| 21 | + {/* Account */} |
| 22 | + <div className="bg-white border border-[#E8E5DE] rounded-lg p-5 shadow-[0_1px_2px_rgba(26,24,20,0.04)]"> |
| 23 | + <div className="flex items-center gap-2 mb-4"> |
| 24 | + <Shield className="w-4 h-4 text-[#B08D3E]" /> |
| 25 | + <span className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E]">Account</span> |
| 26 | + </div> |
| 27 | + <div className="space-y-3"> |
| 28 | + <div> |
| 29 | + <label className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E] mb-1 block">Email</label> |
| 30 | + <p className="text-sm text-[#1A1814]">{user?.email || 'Not set'}</p> |
| 31 | + </div> |
| 32 | + {user?.tenant_id && ( |
| 33 | + <div> |
| 34 | + <label className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E] mb-1 block">Company ID</label> |
| 35 | + <p className="text-sm font-mono text-[#6B6760]">{user.tenant_id}</p> |
| 36 | + </div> |
| 37 | + )} |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + |
| 41 | + {/* API Connection */} |
| 42 | + <div className="bg-white border border-[#E8E5DE] rounded-lg p-5 shadow-[0_1px_2px_rgba(26,24,20,0.04)]"> |
| 43 | + <div className="flex items-center gap-2 mb-4"> |
| 44 | + <Globe className="w-4 h-4 text-[#B08D3E]" /> |
| 45 | + <span className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E]">API Connection</span> |
| 46 | + </div> |
| 47 | + <div className="space-y-3"> |
| 48 | + <div> |
| 49 | + <label className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E] mb-1 block">Observatory API</label> |
| 50 | + <p className="text-sm font-mono text-[#6B6760]">{window.location.origin}/v1</p> |
| 51 | + </div> |
| 52 | + <div> |
| 53 | + <label className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E] mb-1 block">Control Plane</label> |
| 54 | + <p className="text-sm font-mono text-[#6B6760]">https://control.kanoniv.com</p> |
| 55 | + </div> |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + |
| 59 | + {/* Notifications */} |
| 60 | + <div className="bg-white border border-[#E8E5DE] rounded-lg p-5 shadow-[0_1px_2px_rgba(26,24,20,0.04)]"> |
| 61 | + <div className="flex items-center gap-2 mb-4"> |
| 62 | + <Bell className="w-4 h-4 text-[#B08D3E]" /> |
| 63 | + <span className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E]">Notifications</span> |
| 64 | + </div> |
| 65 | + <p className="text-xs text-[#9C978E]">Email notifications for escalations and daily spend reports coming soon.</p> |
| 66 | + </div> |
| 67 | + |
| 68 | + {/* API Keys */} |
| 69 | + <div className="bg-white border border-[#E8E5DE] rounded-lg p-5 shadow-[0_1px_2px_rgba(26,24,20,0.04)]"> |
| 70 | + <div className="flex items-center gap-2 mb-4"> |
| 71 | + <Key className="w-4 h-4 text-[#B08D3E]" /> |
| 72 | + <span className="text-[10px] font-bold uppercase tracking-[0.1em] text-[#9C978E]">API Keys</span> |
| 73 | + </div> |
| 74 | + <p className="text-xs text-[#9C978E]">Delegation tokens are generated per-agent from the Agents page. API key management coming soon.</p> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + </motion.div> |
| 78 | + ); |
| 79 | +}; |
0 commit comments