mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-29 01:04:18 -04:00 
			
		
		
		
	* wip: fix recipe card section * refactor basic search to share composable * fix dialog results * use search for cat/tag/tool pages * update organizer to support name edits * fix composable typing
		
			
				
	
	
		
			37 lines
		
	
	
		
			740 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			740 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { useContext } from "@nuxtjs/composition-api";
 | |
| 
 | |
| export interface ContextMenuItem {
 | |
|   title: string;
 | |
|   icon: string;
 | |
|   event: string;
 | |
|   color?: string;
 | |
| }
 | |
| 
 | |
| export interface ContextMenuPresets {
 | |
|   delete: ContextMenuItem;
 | |
|   edit: ContextMenuItem;
 | |
|   save: ContextMenuItem;
 | |
| }
 | |
| 
 | |
| export function useContextPresets(): ContextMenuPresets {
 | |
|   const { $globals, i18n } = useContext();
 | |
| 
 | |
|   return {
 | |
|     delete: {
 | |
|       title: i18n.tc("general.delete"),
 | |
|       icon: $globals.icons.delete,
 | |
|       event: "delete",
 | |
|     },
 | |
|     edit: {
 | |
|       title: i18n.tc("general.edit"),
 | |
|       icon: $globals.icons.edit,
 | |
|       event: "edit",
 | |
|     },
 | |
|     save: {
 | |
|       title: i18n.tc("general.save"),
 | |
|       icon: $globals.icons.save,
 | |
|       event: "save",
 | |
|     },
 | |
|   };
 | |
| }
 |