From b037203b8f214423335ed60ff40ddadb143c5eaa Mon Sep 17 00:00:00 2001 From: Kaibu Date: Sat, 23 Apr 2022 01:28:20 +0200 Subject: [PATCH] ui improvements (shopping and meal plan) - fixed content scaling for meal plan and shopping - style fixes on shopping list - touch based swipe actions for shopping list - better mobile experience overall --- vue/src/apps/MealPlanView/MealPlanView.vue | 15 +- vue/src/apps/RecipeView/RecipeView.vue | 6 +- .../ShoppingListView/ShoppingListView.vue | 887 +++++++++++------- vue/src/components/MealPlanCard.vue | 6 + vue/src/components/ShoppingLineItem.vue | 182 +++- 5 files changed, 693 insertions(+), 403 deletions(-) diff --git a/vue/src/apps/MealPlanView/MealPlanView.vue b/vue/src/apps/MealPlanView/MealPlanView.vue index 9b0d59b8b..da0ae46d4 100644 --- a/vue/src/apps/MealPlanView/MealPlanView.vue +++ b/vue/src/apps/MealPlanView/MealPlanView.vue @@ -2,7 +2,7 @@
-
+
diff --git a/vue/src/apps/RecipeView/RecipeView.vue b/vue/src/apps/RecipeView/RecipeView.vue index 3250edd9c..bab762da5 100644 --- a/vue/src/apps/RecipeView/RecipeView.vue +++ b/vue/src/apps/RecipeView/RecipeView.vue @@ -233,7 +233,7 @@ export default { this.loadRecipe(window.RECIPE_ID) this.$i18n.locale = window.CUSTOM_LOCALE this.requestWakeLock() - window.addEventListener('resize', this.handleRezise); + window.addEventListener('resize', this.handleResize); }, beforeUnmount() { this.destroyWakeLock() @@ -249,7 +249,7 @@ export default { } } }, - handleRezise: function () { + handleResize: function () { if (document.getElementById('nutrition_container') !== null) { this.ingredient_height = document.getElementById('ingredient_container').clientHeight - document.getElementById('nutrition_container').clientHeight } else { @@ -300,7 +300,7 @@ export default { this.loading = false setTimeout(() => { - this.handleRezise() + this.handleResize() }, 100) }) }, diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index 12919e80f..2a305bf66 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -1,103 +1,124 @@ + + + + + + {{ $t("Create") }} + + + + - - - -
-
-
- {{ s.name }} - + + +
+
+
+ {{ s.name }} + - - - - - -
-
+ > + + + + + +
+
+
+
+ + + +
+
+
- - - - - - - -
-
- - + + + + + {{ $t("Create") }} + + + + - {{ $t("CategoryInstruction") }} - - - - - -
-
- -
-
-
- {{ categoryName(c) }} - - - -
-
-
-
-
-
-
-
- - - - - -
-
- -
-
-
- {{ categoryName(c) }} - - - -
-
-
-
-
-
-
-
+ + {{ $t("CategoryInstruction") }} + + + + + + +
+
+ +
+
+
+ {{ categoryName(c) }} + + + +
+
+
+
+
+
+
+
+ + + + + +
+
+ +
+
+
+ {{ categoryName(c) }} + + + +
+
+
+
+
+
+
+
+
+
+
+ + - + +
{{ $t("mealplan_autoadd_shopping") }}
- +
@@ -403,7 +517,8 @@
{{ $t("mealplan_autoexclude_onhand") }}
- +
@@ -416,7 +531,8 @@
{{ $t("mealplan_autoinclude_related") }}
- +
@@ -453,7 +569,8 @@
{{ $t("shopping_auto_sync") }}
- +
@@ -466,7 +583,8 @@
{{ $t("shopping_add_onhand") }}
- +
@@ -479,7 +597,8 @@
{{ $t("shopping_recent_days") }}
- +
@@ -492,7 +611,8 @@
{{ $t("filter_to_supermarket") }}
- +
@@ -505,7 +625,8 @@
{{ $t("default_delay") }}
- +
@@ -518,7 +639,7 @@
{{ $t("csv_delim_label") }}
- +
@@ -531,7 +652,7 @@
{{ $t("csv_prefix_label") }}
- +
@@ -544,7 +665,8 @@
{{ $t("left_handed") }}
- +
@@ -561,20 +683,25 @@ -
+
- - - - - + + + + +
@@ -585,23 +712,32 @@ - + - + - + - +
- {{ $t("Reset") }} - {{ $t("Close") }} + {{ + $t("Reset") + }} + + + {{ $t("Close") }} +
@@ -610,7 +746,8 @@ - {{ $t("DelayFor", { hours: delay }) }} + + {{ $t("DelayFor", {hours: delay}) }} - {{ $t("Delete") }} + {{ + $t("Delete") + }} - +