From 1d224d86588bfe846b9bcfbf9c844d64a3319695 Mon Sep 17 00:00:00 2001 From: smilerz Date: Sun, 21 Nov 2021 11:11:51 -0600 Subject: [PATCH] yarn build --- cookbook/views/api.py | 3 +- vue/package.json | 10 - vue/src/apps/CookbookView/CookbookView.vue | 18 +- vue/src/apps/MealPlanView/MealPlanView.vue | 530 +- vue/src/apps/ModelListView/ModelListView.vue | 275 +- vue/src/utils/openapi/api.ts | 10900 ++++++++--------- 6 files changed, 5585 insertions(+), 6151 deletions(-) diff --git a/cookbook/views/api.py b/cookbook/views/api.py index fd8d24016..129068b53 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -48,8 +48,7 @@ from cookbook.models import (Automation, BookmarkletImport, CookLog, Food, FoodI from cookbook.provider.dropbox import Dropbox from cookbook.provider.local import Local from cookbook.provider.nextcloud import Nextcloud -from cookbook.schemas import (FilterSchema, QueryOnlySchema, QueryParam, QueryParamAutoSchema, - RecipeSchema, TreeSchema) +from cookbook.schemas import FilterSchema, QueryParam, QueryParamAutoSchema, TreeSchema from cookbook.serializer import (AutomationSerializer, BookmarkletImportSerializer, CookLogSerializer, FoodInheritFieldSerializer, FoodSerializer, FoodShoppingUpdateSerializer, ImportLogSerializer, diff --git a/vue/package.json b/vue/package.json index e15cf6395..f0b1f8c29 100644 --- a/vue/package.json +++ b/vue/package.json @@ -84,14 +84,4 @@ "@vue/cli-plugin-pwa/workbox-webpack-plugin": "^5.1.3", "coa": "2.0.2" } - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not dead" - ], - "resolutions": { - "@vue/cli-plugin-pwa/workbox-webpack-plugin": "^5.1.3", - "coa": "2.0.2" - } } diff --git a/vue/src/apps/CookbookView/CookbookView.vue b/vue/src/apps/CookbookView/CookbookView.vue index 38b76852f..6363c52f5 100644 --- a/vue/src/apps/CookbookView/CookbookView.vue +++ b/vue/src/apps/CookbookView/CookbookView.vue @@ -87,29 +87,25 @@ export default { } }, computed: { - filteredBooks: function() { + filteredBooks: function () { return this.cookbooks.filter((book) => { return book.name.toLowerCase().includes(this.search.toLowerCase()) }) }, }, - createNew: function () { - let apiClient = new ApiApiFactory() - - apiClient.createRecipeBook({name: this.$t('New_Cookbook'), description: '', icon: '', shared: []}).then(result => { - let new_book = result.data + mounted() { this.refreshData() this.$i18n.locale = window.CUSTOM_LOCALE }, methods: { - refreshData: function() { + refreshData: function () { let apiClient = new ApiApiFactory() apiClient.listRecipeBooks().then((result) => { this.cookbooks = result.data }) }, - openBook: function(book) { + openBook: function (book) { if (book === this.current_book) { this.current_book = undefined this.recipes = [] @@ -124,11 +120,11 @@ export default { this.loading = false }) }, - createNew: function() { + createNew: function () { let apiClient = new ApiApiFactory() apiClient - .createRecipeBook({ name: "New Book", description: "", icon: "", shared: [] }) + .createRecipeBook({ name: this.$t("New_Cookbook"), description: "", icon: "", shared: [] }) .then((result) => { let new_book = result.data this.refreshData() @@ -141,7 +137,7 @@ export default { }, directives: { hover: { - inserted: function(el) { + inserted: function (el) { el.addEventListener("mouseenter", () => { el.classList.add("shadow") }) diff --git a/vue/src/apps/MealPlanView/MealPlanView.vue b/vue/src/apps/MealPlanView/MealPlanView.vue index ff672a3ef..927ba9ebe 100644 --- a/vue/src/apps/MealPlanView/MealPlanView.vue +++ b/vue/src/apps/MealPlanView/MealPlanView.vue @@ -1,105 +1,57 @@ - -
-
- -
-
- -
- -
- -
-
- - - - - - - - - - - - - - - -
-
-
- + +