From 7e3a36f2dd6efa729e9073b8f1b2f1a8bcb62cde Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Tue, 19 Oct 2021 18:45:03 -0800 Subject: [PATCH] =?UTF-8?q?=20feat(frontend):=20=E2=9C=A8=20add=20debugger?= =?UTF-8?q?=20to=20creation=20page=20=20(#750)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(frontend): :sparkles: add debugger to creation page * styling Co-authored-by: Hayden --- frontend/api/class-interfaces/recipes.ts | 4 + frontend/assets/main.css | 2 +- frontend/components/global/BaseButton.vue | 1 + frontend/components/global/BasePageTitle.vue | 3 + frontend/package.json | 1 + frontend/pages/recipe/create.vue | 349 ++++++++++++------- frontend/pages/user/profile/edit.vue | 2 +- frontend/yarn.lock | 71 +++- 8 files changed, 308 insertions(+), 125 deletions(-) diff --git a/frontend/api/class-interfaces/recipes.ts b/frontend/api/class-interfaces/recipes.ts index b9f58bfe1500..3fd11a7efe19 100644 --- a/frontend/api/class-interfaces/recipes.ts +++ b/frontend/api/class-interfaces/recipes.ts @@ -82,6 +82,10 @@ export class RecipeAPI extends BaseCRUDAPI { return this.requests.post(routes.recipesRecipeSlugImage(slug), { url }); } + async testCreateOneUrl(url: string) { + return await this.requests.post(routes.recipesTestScrapeUrl, { url }); + } + async createOneByUrl(url: string) { return await this.requests.post(routes.recipesCreateUrl, { url }); } diff --git a/frontend/assets/main.css b/frontend/assets/main.css index a0bab629afd6..ebefef1c4610 100644 --- a/frontend/assets/main.css +++ b/frontend/assets/main.css @@ -8,7 +8,7 @@ } .narrow-container { - max-width: 700px !important; + max-width: 800px !important; } .theme--dark.v-application { diff --git a/frontend/components/global/BaseButton.vue b/frontend/components/global/BaseButton.vue index 1496e7b7e72c..4acfa46efce5 100644 --- a/frontend/components/global/BaseButton.vue +++ b/frontend/components/global/BaseButton.vue @@ -8,6 +8,7 @@ :outlined="btnStyle.outlined" :text="btnStyle.text" :to="to" + v-bind="$attrs" v-on="$listeners" @click="download ? downloadFile() : undefined" > diff --git a/frontend/components/global/BasePageTitle.vue b/frontend/components/global/BasePageTitle.vue index c0919d38ceb1..196a89d35f31 100644 --- a/frontend/components/global/BasePageTitle.vue +++ b/frontend/components/global/BasePageTitle.vue @@ -10,6 +10,9 @@ +
+ +
diff --git a/frontend/package.json b/frontend/package.json index 32bb03b2b2c4..c11574f8d5a9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -27,6 +27,7 @@ "date-fns": "^2.23.0", "fuse.js": "^6.4.6", "nuxt": "^2.15.7", + "v-jsoneditor": "^1.4.5", "vuedraggable": "^2.24.3", "vuetify": "^2.5.5" }, diff --git a/frontend/pages/recipe/create.vue b/frontend/pages/recipe/create.vue index a74f76547315..9de87cf3a74b 100644 --- a/frontend/pages/recipe/create.vue +++ b/frontend/pages/recipe/create.vue @@ -1,133 +1,213 @@