diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue index c1df9db27..92629d3df 100644 --- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue +++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue @@ -16,7 +16,7 @@ - + @@ -525,13 +525,13 @@ import VueCookies from "vue-cookies" import "bootstrap-vue/dist/bootstrap-vue.css" import moment from "moment" import _debounce from "lodash/debounce" +import { Treeselect, LOAD_CHILDREN_OPTIONS } from "@riophae/vue-treeselect" +import "@riophae/vue-treeselect/dist/vue-treeselect.css" import { ApiMixin, ResolveUrlMixin, StandardToasts, ToastMixin } from "@/utils/utils" import LoadingSpinner from "@/components/LoadingSpinner" // TODO: is this deprecated? import RecipeCard from "@/components/RecipeCard" import GenericMultiselect from "@/components/GenericMultiselect" -import { Treeselect, LOAD_CHILDREN_OPTIONS } from "@riophae/vue-treeselect" -import "@riophae/vue-treeselect/dist/vue-treeselect.css" import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher" import Multiselect from "vue-multiselect" @@ -732,23 +732,8 @@ export default { this.search.search_keywords[0].items = [] this.facets.Keywords = [] for (let x of urlParams.getAll("keyword")) { - let initial_keyword = { id: Number.parseInt(x), name: "loading..." } - this.search.search_keywords.push(initial_keyword) - - this.genericAPI(this.Models.KEYWORD, this.Actions.FETCH, { id: initial_keyword.id }) - .then((response) => { - let kw_index = this.search.search_keywords.findIndex((k) => k.id === initial_keyword.id) - this.$set(this.search.search_keywords, kw_index, response.data) - this.$set(this.facets.Keywords, kw_index, response.data) - }) - .catch((err) => { - if (err.response.status === 404) { - let kw_index = this.search.search_keywords.findIndex((k) => k.id === initial_keyword.id) - this.search.search_keywords.splice(kw_index, 1) - this.facets.Keywords.splice(kw_index, 1) - this.refreshData(false) - } - }) + this.search.search_keywords[0].items.push(Number.parseInt(x)) + this.facets.Keywords.push({ id: x, name: "loading..." }) } } else { this.facets.Keywords = [] @@ -766,7 +751,7 @@ export default { } this.facets.Books = [] - for (let x of this.search.search_books) { + for (let x of this.search.search_books.map((x) => x.items).flat()) { this.facets.Books.push({ id: x, name: "loading..." }) } diff --git a/vue/src/components/ContextMenu/ModelMenu.vue b/vue/src/components/ContextMenu/ModelMenu.vue index 955bf3044..fb03a6237 100644 --- a/vue/src/components/ContextMenu/ModelMenu.vue +++ b/vue/src/components/ContextMenu/ModelMenu.vue @@ -19,9 +19,9 @@ {{ $t(Models["USERFILE"].name) }} - {{ Models["STEP"].name }} + {{ $t(Models["STEP"].name) }} - {{ Models["CUSTOM_FILTER"].name }} + {{ $t(Models["CUSTOM_FILTER"].name) }} diff --git a/vue/src/components/Modals/GenericModalForm.vue b/vue/src/components/Modals/GenericModalForm.vue index 48e429879..47abc2f3d 100644 --- a/vue/src/components/Modals/GenericModalForm.vue +++ b/vue/src/components/Modals/GenericModalForm.vue @@ -101,7 +101,6 @@ export default { show: function () { if (this.show) { this.form = getForm(this.model, this.action, this.item1, this.item2) - if (this.form?.form_function) { this.form = formFunctions[this.form.form_function](this.form) } diff --git a/vue/src/locales/en.json b/vue/src/locales/en.json index 4f562c0e1..9a1a29ae9 100644 --- a/vue/src/locales/en.json +++ b/vue/src/locales/en.json @@ -289,8 +289,6 @@ "remember_search": "Remember Search", "remember_hours": "Hours to Remember", "tree_select": "Use Tree Selection", - "left_handed": "Left-handed mode", - "left_handed_help": "Will optimize the UI for use with your left hand.", "OnHand_help": "Food is in inventory and will not be automatically added to a shopping list.", "ignore_shopping_help": "Never add food to the shopping list (e.g. water)", "shopping_category_help": "Supermarkets can be ordered and filtered by Shopping Category according to the layout of the aisles.",