end cleanup

This commit is contained in:
LathanDevers
2026-08-02 21:22:32 +02:00
parent 25c75ba078
commit 80dc61b938
10 changed files with 169 additions and 134 deletions
+4 -5
View File
@@ -1,5 +1,6 @@
import React, { useState } from 'react';
import { Button } from '@/components/ui/Button';
import { Input } from '../ui/Input';
interface LocalLoginFormProps {
onSubmit: (email: string, pass: string) => void;
@@ -20,10 +21,9 @@ export const LocalLoginForm: React.FC<LocalLoginFormProps> = ({ onSubmit, isLoad
<div>
<label htmlFor="email" className="block text-sm font-medium text-slate-700">Identifiant institutionnel</label>
<div className="mt-1">
<input
<Input
id="email" type="email" required placeholder="direction@client.com"
value={email} onChange={(e) => setEmail(e.target.value)}
className="block w-full rounded-md border border-slate-300 px-3 py-2 shadow-sm focus:border-blue-900 focus:ring-blue-900 sm:text-sm"
/>
</div>
</div>
@@ -31,10 +31,9 @@ export const LocalLoginForm: React.FC<LocalLoginFormProps> = ({ onSubmit, isLoad
<div>
<label htmlFor="password" className="block text-sm font-medium text-slate-700">Mot de passe</label>
<div className="mt-1">
<input
<Input
id="password" type="password" required placeholder="••••••••••••"
value={password} onChange={(e) => setPassword(e.target.value)}
className="block w-full rounded-md border border-slate-300 px-3 py-2 shadow-sm focus:border-blue-900 focus:ring-blue-900 sm:text-sm"
value={password} onChange={(e) => setPassword(e.target.value)}
/>
</div>
</div>
+23
View File
@@ -0,0 +1,23 @@
import React from 'react';
import { cn } from '@/utils/utils';
interface BadgeProps {
className?: string;
name: string
}
export const StatusBadge: React.FC<BadgeProps> = ({ className, name }) => {
return (
<div
className={cn(
"px-2.5 py-1 rounded-full text-xs font-semibold inline-flex items-center border transition-colors min-w-fit max-h-fit",
className
)}
>
{name}
</div>
);
};
export default StatusBadge;
+2 -2
View File
@@ -43,7 +43,7 @@ export const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<
ref={ref}
className={cn(
// Séparation discrète (bordure fine plutôt qu'ombre inset, pour rester léger)
"px-6 py-5 flex flex-col space-y-1.5 border-b border-black/5 dark:border-white/5",
"px-6 py-5 flex flex-col space-y-1.5 border-b border-black/5 dark:border-white/5 transition-all duration-300 ease-in-out",
className
)}
{...props}
@@ -56,7 +56,7 @@ export const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes
({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("p-6 flex-1", className)}
className={cn("p-6 flex-1 transition-all duration-300 ease-in-out", className)}
{...props}
/>
)
+20
View File
@@ -0,0 +1,20 @@
export function LogoGise(){
return(
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<div className="flex justify-center">
<div className="h-12 w-12 bg-blue-900 rounded-lg flex items-center justify-center shadow-sm border border-blue-800">
<svg className="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
</svg>
</div>
</div>
<h2 className="mt-6 text-center text-3xl font-bold tracking-tight text-slate-900">
AEGIS <span className="font-light text-slate-500">by GISE</span>
</h2>
<p className="mt-2 text-center text-sm text-slate-500 uppercase tracking-widest font-semibold">
Accès restreint
</p>
</div>
);
};
export default LogoGise;
-2
View File
@@ -1,5 +1,3 @@
// Fichier : src/components/ui/StatusBadge.tsx
import React from 'react';
import { cn } from '@/utils/utils';
import type { AegisStatus } from '@/types/Status';
+43
View File
@@ -0,0 +1,43 @@
import { Card, CardContent, CardHeader } from '@/components/ui/Card';
import { Lock } from "lucide-react";
export function AccessWidget() {
return (
<Card>
<CardHeader className="p-6 border-slate-100">
<h2 className="text-lg font-semibold text-slate-900 border-slate-100 flex items-center"><Lock className="w-5 h-5 mr-2 text-slate-400"></Lock>Sécurité de l'accès</h2>
</CardHeader>
<CardContent className="space-y-6">
{/* MFA Status */}
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium text-slate-900">Authentification à double facteur (MFA)</p>
<p className="text-xs text-slate-500 mt-1">Exigée par les politiques de sécurité GISE</p>
</div>
<span className="inline-flex items-center px-2.5 py-1 rounded-full text-xs font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200">
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 mr-1.5"></span>
Actif
</span>
</div>
<div className="pt-4 border-t border-slate-100">
<button className="text-sm font-medium text-blue-900 hover:text-blue-800 bg-blue-50 hover:bg-blue-100 px-4 py-2 rounded-lg transition-colors duration-200 border border-blue-100">
Générer de nouveaux codes de secours
</button>
</div>
{/* Mot de passe */}
<div className="pt-4 border-t border-slate-100">
<p className="text-sm font-medium text-slate-900 mb-2">Mot de passe institutionnel</p>
<p className="text-xs text-slate-500 mb-4">Dernière modification : Il y a 43 jours</p>
<button className="text-sm font-medium text-slate-700 hover:text-slate-900 bg-white hover:bg-slate-50 border border-slate-300 px-4 py-2 rounded-lg transition-colors duration-200 shadow-sm">
Modifier le mot de passe
</button>
</div>
</CardContent>
</Card>
);
}
export default AccessWidget;
@@ -0,0 +1,37 @@
import { Card, CardContent, CardHeader } from '@/components/ui/Card';
import { Building } from "lucide-react";
export function InformationWidget() {
return (
<Card>
<CardHeader className="p-6 border-slate-100">
<h2 className="text-lg font-semibold text-slate-900 border-slate-100 flex items-center">
<Building className="w-5 h-5 mr-2 text-slate-400" />
Profil de l'Organisation
</h2>
</CardHeader>
<CardContent>
<dl className="space-y-4 text-sm">
<div>
<dt className="text-slate-500 font-medium">Entité Légale</dt>
<dd className="mt-1 font-semibold text-slate-900">Cabinet Juridique Example & Associés</dd>
</div>
<div>
<dt className="text-slate-500 font-medium">Administrateur du compte</dt>
<dd className="mt-1 text-slate-900">Direction Générale (direction@example.com)</dd>
</div>
<div>
<dt className="text-slate-500 font-medium">Niveau d'Infogérance (SLA)</dt>
<dd className="mt-1 flex items-center">
<span className="px-2 py-1 bg-blue-900 text-white text-xs font-bold rounded shadow-sm mr-2 tracking-wider">VIP PLATINUM</span>
<span className="text-slate-700 font-medium">Couverture 24/7 (99.99%)</span>
</dd>
</div>
</dl>
</CardContent>
</Card>
);
}
export default InformationWidget;