From 9a7faabbde733a0f9338589e154b4c25a70a8e2e Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 8 Oct 2025 17:18:25 +0000 Subject: [PATCH 1/7] Transitioned from Plan to Build mode Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/ZZqfJdr From 0fb9423945243c0f1986d2dd992bff26a94280f1 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 8 Oct 2025 17:20:07 +0000 Subject: [PATCH 2/7] Improve sidebar toggle button appearance and responsiveness on mobile Update sidebar toggle button styling in client/src/components/sidebar.tsx to include a border and adjust hover effects, improving its appearance and fitting better within the mobile layout. 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/ZZqfJdr --- client/src/components/sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/sidebar.tsx b/client/src/components/sidebar.tsx index 8e1d9a7..a96a03d 100644 --- a/client/src/components/sidebar.tsx +++ b/client/src/components/sidebar.tsx @@ -305,7 +305,7 @@ export default function Sidebar() { {/* Toggle Button */} From 4ea5ad411979886c32b89785092eefd8778f488f Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 8 Oct 2025 17:28:53 +0000 Subject: [PATCH 5/7] Improve responsiveness and adjust button sizes for better mobile experience Update padding and button sizes across various components to enhance mobile view and optimize user interaction. 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/pCkJ6mk --- .replit | 4 ---- client/src/components/ui/button.tsx | 8 ++++---- client/src/pages/ai.tsx | 2 +- client/src/pages/calendar.tsx | 2 +- client/src/pages/dashboard.tsx | 2 +- client/src/pages/history.tsx | 2 +- client/src/pages/media.tsx | 2 +- client/src/pages/new-post.tsx | 4 ++-- client/src/pages/pages.tsx | 2 +- client/src/pages/settings.tsx | 2 +- client/src/pages/sql.tsx | 4 ++-- client/src/pages/users-admin.tsx | 4 ++-- 12 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.replit b/.replit index 192bb32..b1b492e 100644 --- a/.replit +++ b/.replit @@ -30,10 +30,6 @@ externalPort = 4200 localPort = 40537 externalPort = 3000 -[[ports]] -localPort = 42011 -externalPort = 5000 - [[ports]] localPort = 43245 externalPort = 3001 diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsx index 36496a2..c8cbf29 100644 --- a/client/src/components/ui/button.tsx +++ b/client/src/components/ui/button.tsx @@ -20,10 +20,10 @@ const buttonVariants = cva( link: "text-primary underline-offset-4 hover:underline", }, size: { - default: "h-10 px-4 py-2", - sm: "h-9 rounded-md px-3", - lg: "h-11 rounded-md px-8", - icon: "h-10 w-10", + default: "h-11 px-4 py-2", + sm: "h-11 rounded-md px-3", + lg: "h-12 rounded-md px-8", + icon: "h-11 w-11", }, }, defaultVariants: { diff --git a/client/src/pages/ai.tsx b/client/src/pages/ai.tsx index 3f25ac1..a3860cb 100644 --- a/client/src/pages/ai.tsx +++ b/client/src/pages/ai.tsx @@ -25,7 +25,7 @@ export default function AI() {
setSidebarOpen(!sidebarOpen)} /> -
+

Assistant IA

diff --git a/client/src/pages/calendar.tsx b/client/src/pages/calendar.tsx index aa758db..b6cb235 100644 --- a/client/src/pages/calendar.tsx +++ b/client/src/pages/calendar.tsx @@ -25,7 +25,7 @@ export default function Calendar() {

setSidebarOpen(!sidebarOpen)} /> -
+

Calendrier

diff --git a/client/src/pages/dashboard.tsx b/client/src/pages/dashboard.tsx index c019d3e..d097e43 100644 --- a/client/src/pages/dashboard.tsx +++ b/client/src/pages/dashboard.tsx @@ -27,7 +27,7 @@ export default function Dashboard() {

setSidebarOpen(!sidebarOpen)} /> -
+
diff --git a/client/src/pages/history.tsx b/client/src/pages/history.tsx index f50fb36..37154a2 100644 --- a/client/src/pages/history.tsx +++ b/client/src/pages/history.tsx @@ -37,7 +37,7 @@ export default function History() {
setSidebarOpen(!sidebarOpen)} /> -
+

Historique

diff --git a/client/src/pages/media.tsx b/client/src/pages/media.tsx index 86b530e..67264a3 100644 --- a/client/src/pages/media.tsx +++ b/client/src/pages/media.tsx @@ -25,7 +25,7 @@ export default function Media() {

setSidebarOpen(!sidebarOpen)} /> -
+

Médiathèque

diff --git a/client/src/pages/new-post.tsx b/client/src/pages/new-post.tsx index 6b6b44f..c759abe 100644 --- a/client/src/pages/new-post.tsx +++ b/client/src/pages/new-post.tsx @@ -208,7 +208,7 @@ export default function NewPost() {

setSidebarOpen(!sidebarOpen)} /> -
+

Nouvelle publication

@@ -216,7 +216,7 @@ export default function NewPost() {

-
+
diff --git a/client/src/pages/pages.tsx b/client/src/pages/pages.tsx index bbda1e7..cb4ef7a 100644 --- a/client/src/pages/pages.tsx +++ b/client/src/pages/pages.tsx @@ -61,7 +61,7 @@ export default function PagesManagement() {
setSidebarOpen(!sidebarOpen)} /> -
+

Pages gérées

diff --git a/client/src/pages/settings.tsx b/client/src/pages/settings.tsx index 9e7fd43..788aabb 100644 --- a/client/src/pages/settings.tsx +++ b/client/src/pages/settings.tsx @@ -138,7 +138,7 @@ export default function Settings() {
setSidebarOpen(!sidebarOpen)} /> -
+

Paramètres

diff --git a/client/src/pages/sql.tsx b/client/src/pages/sql.tsx index d7fd7e0..11037b2 100644 --- a/client/src/pages/sql.tsx +++ b/client/src/pages/sql.tsx @@ -93,7 +93,7 @@ export default function SqlAdmin() {

setSidebarOpen(!sidebarOpen)} /> -
+

@@ -104,7 +104,7 @@ export default function SqlAdmin() {

-
+
{/* Liste des tables */} diff --git a/client/src/pages/users-admin.tsx b/client/src/pages/users-admin.tsx index 3901a3f..a9ba7d4 100644 --- a/client/src/pages/users-admin.tsx +++ b/client/src/pages/users-admin.tsx @@ -296,7 +296,7 @@ export default function UsersAdmin() {
setSidebarOpen(!sidebarOpen)} /> -
+

@@ -307,7 +307,7 @@ export default function UsersAdmin() {

-
+
{/* Liste des utilisateurs */}
From 88741d35f1514f2eef37985cb6176772855485b4 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 8 Oct 2025 17:58:06 +0000 Subject: [PATCH 6/7] Improve sidebar navigation by preventing default link behavior Replace Link components with anchor tags and implement onClick handlers to manage navigation within the sidebar, preventing default behavior and ensuring proper state updates before navigation. 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/bUe0qhu --- .replit | 8 +++++ client/src/components/sidebar.tsx | 60 +++++++++++++++++-------------- 2 files changed, 41 insertions(+), 27 deletions(-) diff --git a/.replit b/.replit index b1b492e..fa8f8de 100644 --- a/.replit +++ b/.replit @@ -22,6 +22,10 @@ externalPort = 3003 localPort = 35357 externalPort = 3002 +[[ports]] +localPort = 37431 +externalPort = 5000 + [[ports]] localPort = 37659 externalPort = 4200 @@ -34,6 +38,10 @@ externalPort = 3000 localPort = 43245 externalPort = 3001 +[[ports]] +localPort = 46681 +externalPort = 5173 + [env] PORT = "5000" diff --git a/client/src/components/sidebar.tsx b/client/src/components/sidebar.tsx index 071eec8..f0154c0 100644 --- a/client/src/components/sidebar.tsx +++ b/client/src/components/sidebar.tsx @@ -31,10 +31,16 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { const isAdmin = session?.role === "admin"; - const handleLinkClick = () => { + const handleLinkClick = (href: string, e: React.MouseEvent) => { + e.preventDefault(); + // Always close sidebar on mobile first if (onLinkClick) { onLinkClick(); } + // Navigate after a small delay to ensure state update completes + setTimeout(() => { + setLocation(href); + }, 10); }; const logoutMutation = useMutation({ @@ -92,11 +98,11 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { return (
  • - handleLinkClick(item.href, e)} className={` - flex items-center gap-3 px-4 py-3 rounded-xl font-medium transition-all relative + flex items-center gap-3 px-4 py-3 rounded-xl font-medium transition-all relative cursor-pointer ${isActive ? 'bg-gradient-to-r from-primary/10 to-secondary/10 text-primary shadow-sm' : 'text-muted-foreground hover:bg-sidebar-accent hover:text-foreground' @@ -119,7 +125,7 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { )} )} - + {isCollapsed && (
    {item.label} @@ -142,11 +148,11 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { return (
  • - handleLinkClick(item.href, e)} className={` - flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative + flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative cursor-pointer ${isActive ? 'bg-gradient-to-r from-primary/10 to-secondary/10 text-primary shadow-sm' : 'text-muted-foreground hover:bg-sidebar-accent hover:text-foreground' @@ -160,7 +166,7 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { )} {!isCollapsed && {item.label}} - + {isCollapsed && (
    {item.label} @@ -182,11 +188,11 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) {

    Administration

    )} - handleLinkClick("/pages", e)} className={` - flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group + flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group cursor-pointer ${location === "/pages" ? 'bg-gradient-to-r from-primary/10 to-secondary/10 text-primary shadow-sm' : 'text-muted-foreground hover:bg-sidebar-accent hover:text-foreground' @@ -205,12 +211,12 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { Pages gérées
  • )} - - + handleLinkClick("/users", e)} className={` - flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group + flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group cursor-pointer ${location === "/users" ? 'bg-gradient-to-r from-primary/10 to-secondary/10 text-primary shadow-sm' : 'text-muted-foreground hover:bg-sidebar-accent hover:text-foreground' @@ -229,12 +235,12 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { Utilisateurs
    )} - - + handleLinkClick("/sql", e)} className={` - flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group + flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group cursor-pointer ${location === "/sql" ? 'bg-gradient-to-r from-primary/10 to-secondary/10 text-primary shadow-sm' : 'text-muted-foreground hover:bg-sidebar-accent hover:text-foreground' @@ -253,12 +259,12 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { SQL
    )} - - + handleLinkClick("/settings", e)} className={` - flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group + flex items-center gap-3 px-4 py-3 rounded-xl transition-all relative group cursor-pointer ${location === "/settings" ? 'bg-gradient-to-r from-primary/10 to-secondary/10 text-primary shadow-sm' : 'text-muted-foreground hover:bg-sidebar-accent hover:text-foreground' @@ -277,7 +283,7 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) { Paramètres
    )} - + )} @@ -318,10 +324,10 @@ export default function Sidebar({ onLinkClick }: SidebarProps = {}) {
    )} - {/* Toggle Button */} + {/* Toggle Button (Desktop only) */}