From 6ccf61f09af1a1a924365183c66dcaff8ea17045 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Mon, 11 May 2026 10:49:43 +0200 Subject: [PATCH] feat: AnyDay tab edit via double-click; remove pencil icons; fix active tab style CSS: - Active tab no longer shows accent underline; instead border-bottom matches the someday area bg (#f9f9f9 / #1a1a1b dark), creating a raised browser-tab look where the active tab visually merges with the content below - margin-bottom: -1px to cover the tab bar border-bottom on active tab JSX: - Double-click on any tab now opens TabVisualsPopover (edit tab) - Pencil icon and dissolve-X button removed from tab wrappers - TabVisualsPopover extended with: rename input, dissolve button (dissolve removes the tab grouping; lists are kept) - onRename and onDissolve props added to TabVisualsPopover v1.107.3 --- package.json | 2 +- src/app/globals.css | 9 ++++- src/components/WeeklyView.tsx | 70 +++++++++++++++++++++++------------ 3 files changed, 54 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index d3d0c66..b8a7750 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.107.2", + "version": "1.107.3", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/app/globals.css b/src/app/globals.css index 9a84291..8a97ad1 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1677,9 +1677,14 @@ h3 { color: var(--weekly-text, #222); font-weight: 700; border-color: var(--weekly-border, #e5e7eb); - border-bottom-color: var(--weekly-accent, #6366f1); + border-bottom-color: #f9f9f9; background: var(--weekly-bg, #fff); - box-shadow: 0 -1px 0 0 var(--weekly-bg, #fff); + box-shadow: none; + margin-bottom: -1px; +} + +.weekly-container.dark-mode .someday-tab-btn-h.active { + border-bottom-color: #1a1a1b; } .someday-tab-btn-h.drag-over { diff --git a/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 7956fa0..90d5dfa 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -8069,16 +8069,14 @@ export default function WeeklyView() { ); })()} - - {editingTabVisualsName === tab && ( updateTabVisuals(tab, updates)} + onRename={(newName) => { renameTab(tab, newName); setEditingTabVisualsName(null); }} + onDissolve={() => dissolveTab(tab)} onClose={() => setEditingTabVisualsName(null)} /> )} @@ -10999,6 +10989,8 @@ function TabVisualsPopover({ darkMode, language, onChange, + onRename, + onDissolve, onClose, }: { tabName: string; @@ -11006,9 +10998,12 @@ function TabVisualsPopover({ darkMode: boolean; language: string; onChange: (updates: { color?: string | null; icon?: string | null }) => void; + onRename: (newName: string) => void; + onDissolve: () => void; onClose: () => void; }) { const [iconPickerOpen, setIconPickerOpen] = useState(false); + const [renameValue, setRenameValue] = useState(tabName); const containerRef = useRef(null); useEffect(() => { const onDoc = (e: MouseEvent) => { @@ -11018,36 +11013,50 @@ function TabVisualsPopover({ return () => document.removeEventListener("mousedown", onDoc); }, [onClose]); const de = language === "de"; + const labelStyle = { fontSize: "0.75rem", color: darkMode ? "#9ca3af" : "#666", flex: 1 } as const; return (
e.stopPropagation()} > + {/* Header */}
- - {de ? `Tab-Stil: ${tabName}` : `Tab style: ${tabName}`} + + {de ? "Tab bearbeiten" : "Edit tab"}
+ {/* Rename */}
- {de ? "Icon" : "Icon"} + {de ? "Name" : "Name"} + setRenameValue(e.target.value)} + onBlur={() => { if (renameValue.trim() && renameValue.trim() !== tabName) onRename(renameValue.trim()); }} + onKeyDown={(e) => { if (e.key === "Enter") { if (renameValue.trim() && renameValue.trim() !== tabName) onRename(renameValue.trim()); (e.target as HTMLInputElement).blur(); } }} + style={{ flex: 1, fontSize: "0.8rem", border: `1px solid ${darkMode ? "#444" : "#e5e7eb"}`, borderRadius: "6px", padding: "4px 8px", background: darkMode ? "#2a2a3a" : "#f9f9f9", color: darkMode ? "#e5e7eb" : "#222", outline: "none" }} + /> +
+ {/* Icon */} +
+ {de ? "Icon" : "Icon"}
{iconPickerOpen && ( -
+
{ onChange({ icon: name }); setIconPickerOpen(false); }} @@ -11069,8 +11078,9 @@ function TabVisualsPopover({ />
)} + {/* Color */}
- {de ? "Farbe" : "Color"} + {de ? "Farbe" : "Color"} )}
+ {/* Dissolve / delete */} +
+ +
); }