From aa4d0f217e36444d478578107d2fb8c6bff817dd Mon Sep 17 00:00:00 2001 From: paradox Date: Fri, 31 Jul 2026 12:13:41 +0200 Subject: [PATCH] cleaned trust center and some widgets --- src/components/layout/Sidebar.tsx | 2 +- src/components/ui/Card.tsx | 3 ++- src/components/ui/PageHeader.tsx | 2 +- src/components/ui/ServiceObject.tsx | 18 +++++++++--------- src/components/ui/StatusBadge.tsx | 2 +- src/components/widgets/EvolutionFilterBar.tsx | 2 +- src/components/widgets/ServicesWidget.tsx | 2 +- src/components/widgets/SupportCtaWidget.tsx | 6 +++--- src/layouts/DashboardLayout.tsx | 8 ++++---- src/pages/TrustCenter.tsx | 12 ++++++------ 10 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index ff4f8ca..4475348 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -22,7 +22,7 @@ const NAVIGATION_ITEMS = [ export const Sidebar: React.FC = ({ onLogout, className }) => { return ( - + {/* 1. EN-TÊTE / LOGO */}
{/* Petit badge logo avec effet creusé */} diff --git a/src/components/ui/Card.tsx b/src/components/ui/Card.tsx index 881bc8d..43d1496 100644 --- a/src/components/ui/Card.tsx +++ b/src/components/ui/Card.tsx @@ -12,7 +12,7 @@ import { NEUMORPHISM } from '@/styles/Neumorphism'; interface CardProps extends React.HTMLAttributes { // 'raised' : relief neumorphique complet — dashboards, widgets isolés, peu nombreux à l'écran. // 'flat' : bordure fine, sans ombre — listes/tables denses (perf + lisibilité). - variant?: 'raised' | 'flat'; + variant?: 'raised' | 'flat'|'digged'; } export const Card = React.forwardRef( @@ -25,6 +25,7 @@ export const Card = React.forwardRef( "bg-[#e8e8e8] dark:bg-[#1e293b]", // Relief neumorphique (par défaut) variant === 'raised' && [NEUMORPHISM.lightShadow, NEUMORPHISM.darkShadow], + variant === 'digged' && [NEUMORPHISM.insetDark, NEUMORPHISM.insetLight], // Variante plate : pas d'ombre, juste une bordure discrète — pour tables/listes denses variant === 'flat' && "border border-black/5 dark:border-white/10", className diff --git a/src/components/ui/PageHeader.tsx b/src/components/ui/PageHeader.tsx index 6004165..aaef3d1 100644 --- a/src/components/ui/PageHeader.tsx +++ b/src/components/ui/PageHeader.tsx @@ -10,7 +10,7 @@ interface PageHeaderProps { export const PageHeader: React.FC = ({ title, description, children }) => { return ( - +

diff --git a/src/components/ui/ServiceObject.tsx b/src/components/ui/ServiceObject.tsx index 7dc6a86..6ece131 100644 --- a/src/components/ui/ServiceObject.tsx +++ b/src/components/ui/ServiceObject.tsx @@ -1,6 +1,7 @@ import React from 'react'; import type { ManagedContract } from '@/types/ManagedContract'; import { StatusBadge } from '@/components/ui/StatusBadge'; +import { Card } from './Card'; interface ServiceObjectProps { contract: ManagedContract; @@ -8,16 +9,15 @@ interface ServiceObjectProps { export const ServiceObject: React.FC = ({ contract }) => { return ( -
-
+ +

{contract.service_name}

- {contract.description && ( -

{contract.description}

- )} + {/* Fonctionne instantanément avec 'Actif', 'En déploiement', 'Suspendu' */} +
- - {/* Fonctionne instantanément avec 'Actif', 'En déploiement', 'Suspendu' */} - -
+ {contract.description && ( +

{contract.description}

+ )} + ); }; \ No newline at end of file diff --git a/src/components/ui/StatusBadge.tsx b/src/components/ui/StatusBadge.tsx index 75eb2b0..010be32 100644 --- a/src/components/ui/StatusBadge.tsx +++ b/src/components/ui/StatusBadge.tsx @@ -55,7 +55,7 @@ export const StatusBadge: React.FC = ({ status, className }) = return (
= ({
onSearchChange(e.target.value)} diff --git a/src/components/widgets/ServicesWidget.tsx b/src/components/widgets/ServicesWidget.tsx index 23d00b3..b30d5f5 100644 --- a/src/components/widgets/ServicesWidget.tsx +++ b/src/components/widgets/ServicesWidget.tsx @@ -19,7 +19,7 @@ export default function ServicesWidget() {

Catalogue des contrats d'infogérance actifs

-
+
{error && } {isLoading && !error && } {!isLoading && !error && contracts.length === 0 && ( diff --git a/src/components/widgets/SupportCtaWidget.tsx b/src/components/widgets/SupportCtaWidget.tsx index 33c3935..b3a122a 100644 --- a/src/components/widgets/SupportCtaWidget.tsx +++ b/src/components/widgets/SupportCtaWidget.tsx @@ -7,15 +7,15 @@ export const SupportCtaWidget: React.FC = () => { const navigate = useNavigate(); return ( - +

Centre de Support

-

+

Déclarez un incident critique ou demandez une évolution de votre infrastructure.

diff --git a/src/layouts/DashboardLayout.tsx b/src/layouts/DashboardLayout.tsx index f2bbe51..4f72340 100644 --- a/src/layouts/DashboardLayout.tsx +++ b/src/layouts/DashboardLayout.tsx @@ -8,16 +8,16 @@ interface DashboardLayoutProps { export default function DashboardLayout({ children, onLogout }: DashboardLayoutProps) { return ( -
+
{/* Intégration de la navbar extraite */} - + {/* CONTENU PRINCIPAL */}
-
+
{children}
); -} \ No newline at end of file +} \ No newline at end of file diff --git a/src/pages/TrustCenter.tsx b/src/pages/TrustCenter.tsx index ea0139c..5a4981b 100644 --- a/src/pages/TrustCenter.tsx +++ b/src/pages/TrustCenter.tsx @@ -10,11 +10,11 @@ export default function TrustCenter() { const navigate = useNavigate(); return ( -
-
+
+
{/* HEADER EXTRAIT */} - @@ -31,8 +31,8 @@ export default function TrustCenter() { {/* GRILLE DES WIDGETS */} -
-
+
+
navigate('/backups')} /> @@ -40,7 +40,7 @@ export default function TrustCenter() {
-
+