From 0a344731c81a11fbd5707a39e996e3b8497b58df Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Tue, 12 Mar 2024 10:20:48 -0500 Subject: [PATCH] feat: Timeline Filters (#3284) * added timeline event filters * updated empty timeline text * simplify icons/labels for event types * added missing translations * cloned sort improvements to explore page * added filter indicator * lint * removed lint warning * add top margin to "no events found" text Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com> * fixed reversed sort icons Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com> * fixed sort dir on timeline filter * sync checkbox state with preferences state --------- Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com> --- .../Domain/Recipe/RecipeExplorerPage.vue | 8 +- .../Domain/Recipe/RecipeTimeline.vue | 94 +++++++++++++++++-- .../Domain/Recipe/RecipeTimelineItem.vue | 21 ++--- .../recipes/use-recipe-timeline-events.ts | 35 +++++++ frontend/composables/use-users/preferences.ts | 3 + frontend/lang/messages/en-US.json | 4 + frontend/pages/login.vue | 1 - 7 files changed, 139 insertions(+), 27 deletions(-) create mode 100644 frontend/composables/recipes/use-recipe-timeline-events.ts diff --git a/frontend/components/Domain/Recipe/RecipeExplorerPage.vue b/frontend/components/Domain/Recipe/RecipeExplorerPage.vue index 72c47cebbc68..9d7605bf9f99 100644 --- a/frontend/components/Domain/Recipe/RecipeExplorerPage.vue +++ b/frontend/components/Domain/Recipe/RecipeExplorerPage.vue @@ -67,12 +67,16 @@ - {{ $globals.icons.sort }} + {{ + state.orderDirection === "asc" ? + $globals.icons.sortDescending : $globals.icons.sortAscending + }} - {{ state.orderDirection === "asc" ? "Sort Descending" : "Sort Ascending" }} + {{ state.orderDirection === "asc" ? $tc("general.sort-descending") : $tc("general.sort-ascending") }} + - - {{ preferences.orderDirection === "asc" ? $globals.icons.sortCalendarAscending : $globals.icons.sortCalendarDescending }} - + + + + + + + + {{ + preferences.orderDirection === "asc" ? + $globals.icons.sortCalendarDescending : $globals.icons.sortCalendarAscending + }} + + + {{ preferences.orderDirection === "asc" ? $tc("general.sort-descending") : $tc("general.sort-ascending") }} + + + + + + + + + + + + + + + @@ -29,9 +73,9 @@ /> - + - {{ $t("recipe.timeline-is-empty") }} + {{ $t("recipe.timeline-no-events-found-try-adjusting-filters") }}
@@ -41,14 +85,15 @@