From 1b83c829973c651d203c81a18f18f86eb8018a3c Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sun, 31 Jul 2022 14:39:35 -0500 Subject: [PATCH] feat: implement local storage for sorting and dynamic sort icons on the new recipe sort card (#1506) * added new sort icons * added dynamic sort icons * implemented local storage for sorting and mobile card view * fixed bug with local storage booleans * added type hints * bum vue use to use merge defaults * use reactive localstorage * add $vuetify type * sort returns * fix type error Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com> --- .../Domain/Recipe/RecipeCardSection.vue | 103 ++++++++++-------- frontend/composables/use-users/preferences.ts | 28 +++++ frontend/package.json | 2 +- frontend/plugins/globals.ts | 8 +- frontend/utils/icons/icon-type.ts | 8 ++ frontend/utils/icons/icons.ts | 16 +++ frontend/yarn.lock | 34 +++--- 7 files changed, 133 insertions(+), 66 deletions(-) create mode 100644 frontend/composables/use-users/preferences.ts diff --git a/frontend/components/Domain/Recipe/RecipeCardSection.vue b/frontend/components/Domain/Recipe/RecipeCardSection.vue index a77ddf0be521..5a6100e0877a 100644 --- a/frontend/components/Domain/Recipe/RecipeCardSection.vue +++ b/frontend/components/Domain/Recipe/RecipeCardSection.vue @@ -61,7 +61,7 @@