mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-20 13:38:10 +02:00
Add new routes and components for AI, Calendar, Media, Pages Management, Analytics, History, and Settings. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/vhNnBGJ
140 lines
5.2 KiB
TypeScript
140 lines
5.2 KiB
TypeScript
import { useState } from "react";
|
|
import { Settings as SettingsIcon, Bell, Key, Shield } from "lucide-react";
|
|
import Sidebar from "@/components/sidebar";
|
|
import TopBar from "@/components/topbar";
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
import { Label } from "@/components/ui/label";
|
|
import { Switch } from "@/components/ui/switch";
|
|
import { Input } from "@/components/ui/input";
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
export default function Settings() {
|
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
const [notifications, setNotifications] = useState(true);
|
|
const [autoPublish, setAutoPublish] = useState(true);
|
|
|
|
return (
|
|
<div className="flex h-screen overflow-hidden bg-background">
|
|
{sidebarOpen && (
|
|
<div
|
|
className="fixed inset-0 bg-black/50 z-40 lg:hidden"
|
|
onClick={() => setSidebarOpen(false)}
|
|
/>
|
|
)}
|
|
|
|
<div className={`
|
|
fixed lg:static inset-y-0 left-0 z-50 transform transition-transform duration-300 ease-in-out
|
|
${sidebarOpen ? 'translate-x-0' : '-translate-x-full lg:translate-x-0'}
|
|
`}>
|
|
<Sidebar />
|
|
</div>
|
|
|
|
<main className="flex-1 overflow-y-auto">
|
|
<TopBar onMenuClick={() => setSidebarOpen(!sidebarOpen)} />
|
|
|
|
<div className="p-6 max-w-4xl mx-auto">
|
|
<div className="mb-6">
|
|
<h1 className="text-3xl font-bold text-foreground">Paramètres</h1>
|
|
<p className="text-muted-foreground mt-2">
|
|
Configurez votre application
|
|
</p>
|
|
</div>
|
|
|
|
<div className="space-y-6">
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle className="flex items-center gap-2">
|
|
<Bell className="w-5 h-5" />
|
|
Notifications
|
|
</CardTitle>
|
|
<CardDescription>
|
|
Gérez vos préférences de notification
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent className="space-y-4">
|
|
<div className="flex items-center justify-between">
|
|
<div className="space-y-0.5">
|
|
<Label htmlFor="notifications">Notifications activées</Label>
|
|
<p className="text-sm text-muted-foreground">
|
|
Recevez des notifications pour les publications
|
|
</p>
|
|
</div>
|
|
<Switch
|
|
id="notifications"
|
|
checked={notifications}
|
|
onCheckedChange={setNotifications}
|
|
data-testid="switch-notifications"
|
|
/>
|
|
</div>
|
|
<div className="flex items-center justify-between">
|
|
<div className="space-y-0.5">
|
|
<Label htmlFor="autoPublish">Publication automatique</Label>
|
|
<p className="text-sm text-muted-foreground">
|
|
Publier automatiquement à l'heure programmée
|
|
</p>
|
|
</div>
|
|
<Switch
|
|
id="autoPublish"
|
|
checked={autoPublish}
|
|
onCheckedChange={setAutoPublish}
|
|
data-testid="switch-auto-publish"
|
|
/>
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle className="flex items-center gap-2">
|
|
<Key className="w-5 h-5" />
|
|
Clés API
|
|
</CardTitle>
|
|
<CardDescription>
|
|
Configurez vos clés API pour les intégrations
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent className="space-y-4">
|
|
<div className="space-y-2">
|
|
<Label htmlFor="openrouterKey">Clé API OpenRouter</Label>
|
|
<Input
|
|
id="openrouterKey"
|
|
type="password"
|
|
placeholder="sk-or-v1-..."
|
|
data-testid="input-openrouter-key"
|
|
/>
|
|
<p className="text-xs text-muted-foreground">
|
|
Utilisée pour la génération de texte IA
|
|
</p>
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle className="flex items-center gap-2">
|
|
<Shield className="w-5 h-5" />
|
|
Sécurité
|
|
</CardTitle>
|
|
<CardDescription>
|
|
Paramètres de sécurité et confidentialité
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<p className="text-sm text-muted-foreground">
|
|
Les paramètres de sécurité avancés seront disponibles prochainement.
|
|
</p>
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<div className="flex justify-end">
|
|
<Button data-testid="button-save-settings">
|
|
Enregistrer les modifications
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
);
|
|
}
|