mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 02:03:35 -04:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -99,6 +99,7 @@ import { computed, defineComponent, ref, useContext, useRoute } from "@nuxtjs/co | ||||
| import RecipeCardMobile from "./RecipeCardMobile.vue"; | ||||
| import RecipeTimelineContextMenu from "./RecipeTimelineContextMenu.vue"; | ||||
| import { useStaticRoutes } from "~/composables/api"; | ||||
| import { useTimelineEventTypes } from "~/composables/recipes/use-recipe-timeline-events"; | ||||
| import { Recipe, RecipeTimelineEventOut } from "~/lib/api/types/recipe" | ||||
| import UserAvatar from "~/components/Domain/User/UserAvatar.vue"; | ||||
| import SafeMarkdown from "~/components/global/SafeMarkdown.vue"; | ||||
| @@ -124,6 +125,7 @@ export default defineComponent({ | ||||
|   setup(props) { | ||||
|     const { $auth, $globals, $vuetify } = useContext(); | ||||
|     const { recipeTimelineEventImage } = useStaticRoutes(); | ||||
|     const { eventTypeOptions } = useTimelineEventTypes(); | ||||
|     const timelineEvents = ref([] as RecipeTimelineEventOut[]); | ||||
|  | ||||
|     const route = useRoute(); | ||||
| @@ -164,21 +166,10 @@ export default defineComponent({ | ||||
|       } | ||||
|     }) | ||||
|  | ||||
|     const icon = computed( () => { | ||||
|       switch (props.event.eventType) { | ||||
|         case "comment": | ||||
|           return $globals.icons.commentTextMultiple; | ||||
|  | ||||
|         case "info": | ||||
|           return $globals.icons.informationVariant; | ||||
|  | ||||
|         case "system": | ||||
|           return $globals.icons.cog; | ||||
|  | ||||
|         default: | ||||
|           return $globals.icons.informationVariant; | ||||
|       }; | ||||
|     }) | ||||
|     const icon = computed(() => { | ||||
|       const option = eventTypeOptions.value.find((option) => option.value === props.event.eventType); | ||||
|       return option ? option.icon : $globals.icons.informationVariant; | ||||
|     }); | ||||
|  | ||||
|     const hideImage = ref(false); | ||||
|     const eventImageUrl = computed<string>( () => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user