-
-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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 <[email protected]> * fixed reversed sort icons Co-authored-by: Kuchenpirat <[email protected]> * fixed sort dir on timeline filter * sync checkbox state with preferences state --------- Co-authored-by: Kuchenpirat <[email protected]>
- Loading branch information
1 parent
e83fa89
commit 0a34473
Showing
7 changed files
with
139 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
frontend/composables/recipes/use-recipe-timeline-events.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { computed, useContext } from "@nuxtjs/composition-api"; | ||
import { TimelineEventType } from "~/lib/api/types/recipe"; | ||
|
||
export interface TimelineEventTypeData { | ||
value: TimelineEventType; | ||
label: string; | ||
icon: string; | ||
} | ||
|
||
export const useTimelineEventTypes = () => { | ||
const { $globals, i18n } = useContext(); | ||
const eventTypeOptions = computed<TimelineEventTypeData[]>(() => { | ||
return [ | ||
{ | ||
value: "comment", | ||
label: i18n.tc("recipe.comment"), | ||
icon: $globals.icons.commentTextMultiple, | ||
}, | ||
{ | ||
value: "info", | ||
label: i18n.tc("settings.theme.info"), | ||
icon: $globals.icons.informationVariant, | ||
}, | ||
{ | ||
value: "system", | ||
label: i18n.tc("general.system"), | ||
icon: $globals.icons.cog, | ||
}, | ||
]; | ||
}); | ||
|
||
return { | ||
eventTypeOptions, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters