Spaces:
Build error
Build error
Download components/Settings.js from powerllm/anycoder-4c742612: direct link, hf CLI and curl.
- Browser
- Download file 4.32 kB
-
https://huggingface.co/spaces/powerllm/anycoder-4c742612/resolve/main/components/Settings.js
- Command line
-
hf download hf://spaces/powerllm/anycoder-4c742612/components/Settings.js
-
curl -L -o Settings.js https://huggingface.co/spaces/powerllm/anycoder-4c742612/resolve/main/components/Settings.js
4.32 kB
| import { Save, Database, Globe } from 'lucide-react'; | |
| export default function Settings() { | |
| return ( | |
| <div className="space-y-6 max-w-4xl"> | |
| <div> | |
| <h2 className="text-3xl font-bold text-white">System Configuration</h2> | |
| <p className="text-slate-400 mt-1">Manage API keys, modes, and data sources</p> | |
| </div> | |
| <div className="grid grid-cols-1 gap-6"> | |
| <div className="glass-panel p-6"> | |
| <div className="flex items-center space-x-3 mb-6 border-b border-slate-700 pb-4"> | |
| <Globe className="text-blue-400" size={24} /> | |
| <h3 className="text-xl font-bold text-white">Data Source Configuration</h3> | |
| </div> | |
| <div className="space-y-4"> | |
| <div> | |
| <label className="block text-sm font-medium text-slate-300 mb-2">Financial Modeling Prep API Key</label> | |
| <div className="flex space-x-2"> | |
| <input | |
| type="password" | |
| value="fmp_live_xxxxxxxxxxxxxx" | |
| readOnly | |
| className="flex-1 bg-slate-900 border border-slate-700 rounded-lg px-4 py-2 text-slate-300 focus:outline-none focus:border-blue-500 font-mono" | |
| /> | |
| <button className="bg-slate-700 hover:bg-slate-600 text-white px-4 py-2 rounded-lg transition-colors"> | |
| Update | |
| </button> | |
| </div> | |
| <p className="text-xs text-slate-500 mt-1">Required for Paid Mode. Free mode uses mock data generator.</p> | |
| </div> | |
| <div className="flex items-center justify-between pt-4"> | |
| <div> | |
| <div className="text-sm font-medium text-white">WebSocket Streaming</div> | |
| <div className="text-xs text-slate-500">Enable real-time price updates (Paid Mode Only)</div> | |
| </div> | |
| <div className="relative inline-block w-12 mr-2 align-middle select-none transition duration-200 ease-in"> | |
| <input type="checkbox" name="toggle" id="toggle" className="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer checked:right-0 right-6"/> | |
| <label htmlFor="toggle" className="toggle-label block overflow-hidden h-6 rounded-full bg-slate-700 cursor-pointer"></label> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div className="glass-panel p-6"> | |
| <div className="flex items-center space-x-3 mb-6 border-b border-slate-700 pb-4"> | |
| <Database className="text-emerald-400" size={24} /> | |
| <h3 className="text-xl font-bold text-white">Knowledge Base Management</h3> | |
| </div> | |
| <div className="space-y-4"> | |
| <div className="flex items-center justify-between"> | |
| <div> | |
| <div className="text-sm font-medium text-white">Auto-Load Rules</div> | |
| <div className="text-xs text-slate-500">Scan ict_knowledge_base/ folder on startup</div> | |
| </div> | |
| <div className="h-6 w-11 bg-emerald-600 rounded-full relative cursor-pointer"> | |
| <div className="absolute right-1 top-1 bg-white w-4 h-4 rounded-full"></div> | |
| </div> | |
| </div> | |
| <div className="bg-slate-900/50 p-4 rounded-lg border border-slate-700"> | |
| <div className="flex justify-between items-center mb-2"> | |
| <span className="text-sm text-slate-300">Storage Path</span> | |
| <span className="text-xs font-mono text-slate-500">/app/ict_knowledge_base</span> | |
| </div> | |
| <div className="flex justify-between items-center"> | |
| <span className="text-sm text-slate-300">Total Rules</span> | |
| <span className="text-sm font-bold text-white">42 JSON Files</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div className="flex justify-end"> | |
| <button className="flex items-center space-x-2 bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium transition-colors shadow-lg shadow-blue-900/20"> | |
| <Save size={20} /> | |
| <span>Save Configuration</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| ); | |
| } |