mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	feat: Show Cookbooks from Other Households (#4452)
This commit is contained in:
		| @@ -45,6 +45,10 @@ export interface UserParsingPreferences { | ||||
|   parser: RegisteredParser; | ||||
| } | ||||
|  | ||||
| export interface UserCookbooksPreferences { | ||||
|   hideOtherHouseholds: boolean; | ||||
| } | ||||
|  | ||||
| export function useUserMealPlanPreferences(): Ref<UserMealPlanPreferences> { | ||||
|   const fromStorage = useLocalStorage( | ||||
|     "meal-planner-preferences", | ||||
| @@ -153,3 +157,17 @@ export function useParsingPreferences(): Ref<UserParsingPreferences> { | ||||
|  | ||||
|   return fromStorage; | ||||
| } | ||||
|  | ||||
| export function useCookbookPreferences(): Ref<UserCookbooksPreferences> { | ||||
|   const fromStorage = useLocalStorage( | ||||
|     "cookbook-preferences", | ||||
|     { | ||||
|       hideOtherHouseholds: false, | ||||
|     }, | ||||
|     { mergeDefaults: true } | ||||
|     // we cast to a Ref because by default it will return an optional type ref | ||||
|     // but since we pass defaults we know all properties are set. | ||||
|   ) as unknown as Ref<UserCookbooksPreferences>; | ||||
|  | ||||
|   return fromStorage; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user