fix: add category and favorites filters to all recipe pages

- Move categories logic into Search component for centralization
- Add isLoggedIn prop to SeasonLayout and IconLayout components
- Fix FilterPanel CSS to properly handle hidden favorites filter
- Fix FavoritesFilter to trigger onToggle when checkbox changes
- Update Search effect to track all filter states (category, tags, icon, season, favorites)
- Hide favorites filter on favorites page while maintaining proper grid layout
- All filters now work consistently across entire site
This commit is contained in:
2026-01-10 17:19:55 +01:00
parent 7ab3482850
commit bc170abcdf
12 changed files with 44 additions and 28 deletions

View File

@@ -26,7 +26,7 @@
return data.season.filter(r => matchedRecipeIds.has(r._id));
});
</script>
<IconLayout icons={data.icons} active_icon={data.icon} routePrefix="/{data.recipeLang}" lang={data.lang} recipes={data.season} onSearchResults={handleSearchResults}>
<IconLayout icons={data.icons} active_icon={data.icon} routePrefix="/{data.recipeLang}" lang={data.lang} recipes={data.season} isLoggedIn={!!data.session?.user} onSearchResults={handleSearchResults}>
{#snippet recipesSlot()}
<Recipes>
{#each rand_array(filteredRecipes) as recipe}