From 1b0b35d3bfca143c2fc33423413bb636ac3d8998 Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Thu, 9 Apr 2026 09:03:19 +0200 Subject: [PATCH] feat: show Save button always, disabled when no pending changes Co-Authored-By: Claude Sonnet 4.6 --- src/components/TopBar.tsx | 123 +++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 54 deletions(-) diff --git a/src/components/TopBar.tsx b/src/components/TopBar.tsx index 3e0b159..1d44331 100644 --- a/src/components/TopBar.tsx +++ b/src/components/TopBar.tsx @@ -80,61 +80,76 @@ export function TopBar({ stats, onExport, hasData, hasUnsavedChanges, userEmail, )}
- {pendingCount > 0 && ( -
- {/* Split button: Save All + dropdown toggle */} -
- - -
- - {/* Dropdown: list of pending changes */} - {showPending && ( -
-
- Pending changes - {pendingCount} unsaved -
-
- {Object.entries(pendingChanges).map(([articleNo, { articleName }]) => ( -
-
-
-

{articleNo}

-

{articleName}

-
- -
- ))} -
-
- )} +
+ {/* Split button: Save All + dropdown toggle */} +
0 ? "shadow-green-900/30" : "shadow-none opacity-40" + )}> + +
- )} + + {/* Dropdown: list of pending changes */} + {showPending && pendingCount > 0 && ( +
+
+ Pending changes + {pendingCount} unsaved +
+
+ {Object.entries(pendingChanges).map(([articleNo, { articleName }]) => ( +
+
+
+

{articleNo}

+

{articleName}

+
+ +
+ ))} +
+
+ )} +
{hasData && (