From 36f9f35b0b43e3812550fd4ffd304bddbdeaff26 Mon Sep 17 00:00:00 2001 From: ulfrxdev Date: Mon, 6 Apr 2026 12:06:58 +0200 Subject: [PATCH] Redesign filter view --- index.html | 85 +++++++++++++++++----- js/app.js | 16 +++++ js/views/Filter.js | 159 +++++++++++++++++++++++------------------ js/views/RecipeList.js | 35 ++++++++- manifest.webmanifest | 2 +- 5 files changed, 207 insertions(+), 90 deletions(-) diff --git a/index.html b/index.html index c5429c1..a5835cb 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ Recipe App - Modular - + @@ -279,7 +279,7 @@ } #recipe-search-shell { min-height: 2.75rem; - border-radius: 1.7rem; + border-radius: 1.5rem; background: #3a3b38 !important; border: 1px solid rgba(79, 81, 76, 0.95) !important; box-shadow: @@ -375,10 +375,13 @@
+
+
Ładowanie...
+
diff --git a/js/app.js b/js/app.js index 02f690e..67b91a0 100644 --- a/js/app.js +++ b/js/app.js @@ -132,6 +132,21 @@ function setupTabs() { let initAppPromise = null; +function renderAppBootError(message) { + const appContainer = document.getElementById('app-container'); + if (!appContainer) return; + + appContainer.innerHTML = ` +
+
+

Nie udało się uruchomić aplikacji

+

${message}

+ +
+
+ `; +} + async function initApp() { if (initAppPromise) return initAppPromise; @@ -171,6 +186,7 @@ async function initApp() { function bootApp() { initApp().catch((error) => { console.error('Failed to initialize app', error); + renderAppBootError('Spróbuj odświeżyć aplikację. Jeśli problem wróci, zamknij ją całkowicie i otwórz ponownie.'); }); } diff --git a/js/views/Filter.js b/js/views/Filter.js index f9ca450..61e6652 100644 --- a/js/views/Filter.js +++ b/js/views/Filter.js @@ -1,8 +1,8 @@ import { RECIPES } from '../data/catalog.js?v=2'; import { MEAL_SLOTS } from '../planner/mealSlots.js'; -import { applyFilters, getFilterState, getFilteredCount, refreshRecipeList } from './RecipeList.js'; +import { applyFilters, getFilterState } from './RecipeList.js'; -const FILTER_SHEET_TRANSITION = 'transform 300ms cubic-bezier(0.32,0.72,0,1)'; +const FILTER_PANEL_TRANSITION = 'opacity 180ms ease, transform 180ms ease'; const FILTER_SURFACE = '#2d2e2b'; const FILTER_SURFACE_SOFT = '#2f2f2d'; const FILTER_BORDER = '#444442'; @@ -13,12 +13,13 @@ const FILTER_TEXT_SECONDARY = '#d7d2c8'; const FILTER_TEXT_MUTED = '#9b978f'; const FILTER_TEXT_DIM = '#7d7a74'; const FILTER_TEXT_ACTIVE = '#f2efe8'; -const FILTER_TRACK = '#444442'; -const FILTER_TRACK_FILL = '#9b978f'; +const FILTER_TRACK = '#393937'; +const FILTER_TRACK_FILL = '#56534f'; const PREP_TIME_MIN = 5; const PREP_TIME_MAX = 120; const PREP_TIME_STEP = 5; const PREP_TIME_MIN_GAP = PREP_TIME_STEP; +const FILTER_RECIPE_BLUR = 'blur(3px) saturate(0.94)'; function escapeHtml(s) { return String(s) @@ -53,31 +54,23 @@ export function getFilterHTML() { width: 1rem; height: 1rem; border-radius: 9999px; - border: 2px solid ${FILTER_SURFACE}; - background: ${FILTER_TEXT_ACTIVE}; - box-shadow: 0 0 0 1px ${FILTER_BORDER_ACTIVE}; + border: 1px solid rgba(242,239,232,0.16); + background: ${FILTER_TRACK_FILL}; + box-shadow: 0 0 0 1px rgba(0,0,0,0.12); touch-action: none; outline: none; } -