diff --git a/js/views/MealPlanner.js b/js/views/MealPlanner.js index 2d5dad3..7fe9dd6 100644 --- a/js/views/MealPlanner.js +++ b/js/views/MealPlanner.js @@ -53,7 +53,7 @@ const PLANNER_SHEET_OFF_TRANSFORM = `translateY(calc(100% + ${PLANNER_SHEET_BOTT const PLANNER_PICKER_OFF_TRANSFORM = 'translateY(100%)'; const PLANNER_MEAL_SWIPE_MAX = 132; const PLANNER_MEAL_SWIPE_DELETE_THRESHOLD = 96; -const PLANNER_MEAL_PENDING_DELETE_MS = 3200; +const PLANNER_MEAL_PENDING_DELETE_MS = 2000; const PLANNER_MEAL_PENDING_DELETE_TICK_MS = 100; const PICKER_FILTER_MIN_MINUTES = 5; const PICKER_FILTER_MAX_MINUTES = 120; @@ -483,31 +483,35 @@ function renderDayContent(state, onMealRemoved = null) { const rowStyle = `--planner-swipe-progress:${isPendingDelete ? '1' : '0'};`; const rowAttrs = isPendingDelete ? 'data-pending-delete="true"' : ''; const backgroundStyle = isPendingDelete - ? 'background:rgba(122,58,52,0.78);' + ? 'background:linear-gradient(90deg, rgba(65,64,60,0.08), rgba(65,64,60,0.2));' : 'background:rgba(203,74,72, calc(0.18 + var(--planner-swipe-progress) * 0.5));'; const backgroundLabel = isPendingDelete - ? ` - + ? ` + + Usuwanie ` : ` Usuń `; const titleClass = isPendingDelete - ? 'text-[13px] font-normal text-[#d6bbb5] truncate line-through decoration-[#b9877f]' + ? 'text-[13px] font-normal text-[#bcb5ab] truncate' : 'text-[13px] font-normal text-[#ddd6ca] truncate'; const metaClass = isPendingDelete - ? 'text-[11px] text-[#c29a93] mt-0.5 tabular-nums' + ? 'text-[11px] text-[#878079] mt-0.5 tabular-nums' : 'text-[11px] text-[#9b978f] mt-0.5 tabular-nums'; const actionWrapClass = isPendingDelete - ? 'flex items-center shrink-0 self-center' + ? 'relative z-[2] flex items-center shrink-0 self-center' : 'flex items-center gap-1 shrink-0 self-center'; + const contentToneStyle = isPendingDelete + ? 'opacity:0.48; filter:saturate(0.72); transform:scale(0.985); transform-origin:left center; transition:opacity 180ms ease, transform 180ms ease, filter 180ms ease;' + : ''; const remainingProgress = isPendingDelete ? getPendingMealRemovalProgress(state, selectedDayKey, slot.id, entry.id) : 0; const entryAction = isPendingDelete ? `` @@ -515,13 +519,13 @@ function renderDayContent(state, onMealRemoved = null) { `; return ` -
+
${backgroundLabel}
-
-
-
+
+
+
${recipe.image ? `` @@ -600,7 +604,7 @@ function getPendingMealRemovalProgress(state, dayKey, slotId, entryId) { function getPendingMealRemovalButtonStyle(progress) { const clamped = Math.max(0, Math.min(1, progress)); const angle = Math.round(clamped * 360); - return `conic-gradient(from -90deg, rgba(243,198,191,0.96) 0deg, rgba(243,198,191,0.96) ${angle}deg, rgba(139,90,84,0.22) ${angle}deg, rgba(139,90,84,0.22) 360deg)`; + return `conic-gradient(from -90deg, rgba(229,223,214,0.96) 0deg, rgba(229,223,214,0.96) ${angle}deg, rgba(109,108,103,0.24) ${angle}deg, rgba(109,108,103,0.24) 360deg)`; } function stopPendingMealRemovalTicker(state) {