From 1821f4feff8ff3814bace700cff82e8ed9dfb90c Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 9 Jul 2025 23:58:08 +0000 Subject: [PATCH] Modernize the user interface with a cleaner and more professional design Refactors UI components to implement a modern, angular design with updated color scheme and styling in `NewSaleForm.tsx`, `Dashboard.tsx`, `Login.tsx` and `index.css`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: dec54137-d5a2-4406-8ad4-5f2f9fb110bf Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/6a7de82e-d1f1-4ccf-baa2-a2d2d7172ac9.jpg --- client/src/components/NewSaleForm.tsx | 34 ++++----- client/src/index.css | 105 +++++++++++++++++++++----- client/src/pages/Dashboard.tsx | 35 +++++---- client/src/pages/Login.tsx | 40 ++++------ replit.md | 5 ++ 5 files changed, 141 insertions(+), 78 deletions(-) diff --git a/client/src/components/NewSaleForm.tsx b/client/src/components/NewSaleForm.tsx index 990506b..20fb1e0 100644 --- a/client/src/components/NewSaleForm.tsx +++ b/client/src/components/NewSaleForm.tsx @@ -166,10 +166,10 @@ export default function NewSaleForm() {
{/* Seller Information */} -
-

-
- +
+

+
+
Informations Vendeur

@@ -204,10 +204,10 @@ export default function NewSaleForm() {
{/* Product Information */} -
-

-
- +
+

+
+
Informations Produit

@@ -306,10 +306,10 @@ export default function NewSaleForm() {
{/* Customer Information */} -
-

-
- +
+

+
+
Informations Client

@@ -394,10 +394,10 @@ export default function NewSaleForm() {
{/* Identity Information */} -
-

-
- +
+

+
+
@@ -503,7 +503,7 @@ export default function NewSaleForm() { type="submit" size="lg" disabled={isSubmitting || createSaleMutation.isPending} - className="bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white border-0 shadow-lg hover:shadow-xl hover:scale-[1.02] smooth-transition touch-friendly-button order-1 sm:order-2" + className="bg-primary hover:bg-primary/90 text-primary-foreground border-0 shadow-lg hover:shadow-xl order-1 sm:order-2" > {isSubmitting || createSaleMutation.isPending ? 'Enregistrement...' : 'Enregistrer la Vente'} diff --git a/client/src/index.css b/client/src/index.css index ca40f3a..231da71 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -15,18 +15,18 @@ --border: hsl(220, 13%, 91%); --input: hsl(220, 13%, 91%); - /* Modern blue-purple gradient palette */ - --primary: hsl(232, 97%, 59%); - --primary-foreground: hsl(0, 0%, 100%); - --secondary: hsl(220, 14%, 96%); - --secondary-foreground: hsl(222, 15%, 11%); - --accent: hsl(262, 100%, 97%); - --accent-foreground: hsl(222, 15%, 11%); + /* Modern dark theme palette */ + --primary: hsl(220, 13%, 18%); + --primary-foreground: hsl(0, 0%, 98%); + --secondary: hsl(220, 13%, 95%); + --secondary-foreground: hsl(220, 13%, 18%); + --accent: hsl(220, 13%, 95%); + --accent-foreground: hsl(220, 13%, 18%); /* Status colors */ - --destructive: hsl(0, 85%, 60%); + --destructive: hsl(0, 72%, 51%); --destructive-foreground: hsl(0, 0%, 98%); - --success: hsl(142, 71%, 45%); + --success: hsl(142, 69%, 45%); --success-foreground: hsl(0, 0%, 98%); --warning: hsl(38, 92%, 50%); --warning-foreground: hsl(0, 0%, 98%); @@ -34,8 +34,8 @@ --info-foreground: hsl(0, 0%, 98%); /* Interactive elements */ - --ring: hsl(232, 97%, 59%); - --radius: 0.75rem; + --ring: hsl(220, 13%, 18%); + --radius: 0.375rem; /* Gradient colors */ --gradient-from: hsl(232, 97%, 59%); @@ -56,8 +56,8 @@ --border: hsl(215, 28%, 17%); --input: hsl(215, 28%, 17%); - /* Dark mode blue-purple palette */ - --primary: hsl(232, 97%, 65%); + /* Dark mode palette */ + --primary: hsl(0, 0%, 98%); --primary-foreground: hsl(222, 20%, 4%); --secondary: hsl(215, 28%, 17%); --secondary-foreground: hsl(210, 40%, 95%); @@ -74,12 +74,79 @@ --info: hsl(210, 100%, 65%); --info-foreground: hsl(0, 0%, 98%); - --ring: hsl(232, 97%, 65%); - - /* Dark gradient colors */ - --gradient-from: hsl(232, 97%, 65%); - --gradient-to: hsl(262, 100%, 65%); - --gradient-accent: hsl(282, 100%, 65%); + --ring: hsl(0, 0%, 98%); +} + +/* Modern Design Utilities */ +.modern-card { + border: 1px solid hsl(var(--border)); + background: hsl(var(--card)); + box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); +} + +.modern-button { + border: 1px solid hsl(var(--border)); + background: hsl(var(--background)); + color: hsl(var(--foreground)); + font-weight: 500; + padding: 8px 16px; + transition: all 0.2s ease; +} + +.modern-button:hover { + background: hsl(var(--muted)); + border-color: hsl(var(--primary)); +} + +.modern-button-primary { + background: hsl(var(--primary)); + color: hsl(var(--primary-foreground)); + border: 1px solid hsl(var(--primary)); +} + +.modern-button-primary:hover { + background: hsl(var(--primary) / 0.9); +} + +.modern-input { + border: 1px solid hsl(var(--border)); + background: hsl(var(--background)); + color: hsl(var(--foreground)); + padding: 8px 12px; + font-size: 14px; + transition: border-color 0.2s ease; +} + +.modern-input:focus { + outline: none; + border-color: hsl(var(--primary)); + box-shadow: 0 0 0 1px hsl(var(--primary)); +} + +.modern-section { + border: 1px solid hsl(var(--border)); + background: hsl(var(--card)); + padding: 24px; + margin-bottom: 24px; +} + +.modern-section-header { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 24px; + padding-bottom: 12px; + border-bottom: 1px solid hsl(var(--border)); +} + +.modern-icon-container { + width: 40px; + height: 40px; + background: hsl(var(--primary)); + color: hsl(var(--primary-foreground)); + display: flex; + align-items: center; + justify-content: center; } /* Enhanced keyframes for mobile animations */ diff --git a/client/src/pages/Dashboard.tsx b/client/src/pages/Dashboard.tsx index 6fc3945..8870e18 100644 --- a/client/src/pages/Dashboard.tsx +++ b/client/src/pages/Dashboard.tsx @@ -40,32 +40,31 @@ function DashboardContent() { return (
{/* Modern Header */} -
+
-
-
+
+
-
- +
+
-
-

RegisFlow

-

Registre des ventes des Feux d'artifice

+

RegisFlow

+

Registre des ventes des Feux d'artifice

{/* Store Selector for Admin */} {isAdmin && !isLoadingStores && ( -
+
@@ -97,13 +89,13 @@ export default function Login() { control={form.control} name="password" render={({ field }) => ( - - Mot de passe + + Mot de passe @@ -113,7 +105,7 @@ export default function Login() { />