mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-23 06:58:10 +02:00
feat: add settings page with database configuration, API status monitoring, and theme toggling
This commit is contained in:
1 parent
ebd819bfa4
commit
b4ea795770
1 file changed
+18
-12
@@ -342,21 +342,27 @@ export default function SettingsPage() {
|
|||||||
label={`Modèle IA${models.length > 0 ? ` (${models.length} disponibles)` : ""}`}
|
label={`Modèle IA${models.length > 0 ? ` (${models.length} disponibles)` : ""}`}
|
||||||
hint={modelsStatus === "error" ? "⚠ Erreur — vérifiez votre clé puis rechargez" : modelsStatus === "idle" ? "Entrez votre clé et cliquez « Charger les modèles »" : undefined}
|
hint={modelsStatus === "error" ? "⚠ Erreur — vérifiez votre clé puis rechargez" : modelsStatus === "idle" ? "Entrez votre clé et cliquez « Charger les modèles »" : undefined}
|
||||||
>
|
>
|
||||||
<select
|
{models.length > 0 ? (
|
||||||
value={selectedModel}
|
<select
|
||||||
onChange={(e) => setSelectedModel(e.target.value)}
|
value={selectedModel}
|
||||||
disabled={models.length === 0}
|
onChange={(e) => setSelectedModel(e.target.value)}
|
||||||
className="apple-input"
|
className="apple-input"
|
||||||
>
|
>
|
||||||
{models.length === 0
|
{models.map((m) => (
|
||||||
? <option>— Modèles non chargés —</option>
|
|
||||||
: models.map((m) => (
|
|
||||||
<option key={m.id} value={m.id}>
|
<option key={m.id} value={m.id}>
|
||||||
{m.free ? "🆓 " : ""}{m.name}
|
{m.free ? "🆓 " : ""}{m.name}
|
||||||
</option>
|
</option>
|
||||||
))
|
))}
|
||||||
}
|
</select>
|
||||||
</select>
|
) : (
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
value={selectedModel}
|
||||||
|
onChange={(e) => setSelectedModel(e.target.value)}
|
||||||
|
placeholder="ex: google/gemini-2.0-flash-001"
|
||||||
|
className="apple-input"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user