mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-03 04:25:24 +02:00
Bug/misc fixes (#618)
* Fixes #617 * set recipe settings default by env variables * add variables to docker-compse * update changelog * bump dependencies * add fallback name to scraper Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
3e2c9f41cf
commit
9b5cf36981
16 changed files with 361 additions and 235 deletions
|
@ -4,6 +4,7 @@ export const API_ROUTES = {
|
|||
aboutEvents: `${prefix}/about/events`,
|
||||
aboutEventsNotifications: `${prefix}/about/events/notifications`,
|
||||
aboutEventsNotificationsTest: `${prefix}/about/events/notifications/test`,
|
||||
aboutRecipesDefaults: `${prefix}/about/recipes/defaults`,
|
||||
authRefresh: `${prefix}/auth/refresh`,
|
||||
authToken: `${prefix}/auth/token`,
|
||||
authTokenLong: `${prefix}/auth/token/long`,
|
||||
|
@ -27,6 +28,7 @@ export const API_ROUTES = {
|
|||
migrations: `${prefix}/migrations`,
|
||||
recipesCategory: `${prefix}/recipes/category`,
|
||||
recipesCreate: `${prefix}/recipes/create`,
|
||||
recipesCreateFromZip: `${prefix}/recipes/create-from-zip`,
|
||||
recipesCreateUrl: `${prefix}/recipes/create-url`,
|
||||
recipesSummary: `${prefix}/recipes/summary`,
|
||||
recipesSummaryUncategorized: `${prefix}/recipes/summary/uncategorized`,
|
||||
|
@ -70,6 +72,7 @@ export const API_ROUTES = {
|
|||
recipesRecipeSlug: recipe_slug => `${prefix}/recipes/${recipe_slug}`,
|
||||
recipesRecipeSlugAssets: recipe_slug => `${prefix}/recipes/${recipe_slug}/assets`,
|
||||
recipesRecipeSlugImage: recipe_slug => `${prefix}/recipes/${recipe_slug}/image`,
|
||||
recipesRecipeSlugZip: recipe_slug => `${prefix}/recipes/${recipe_slug}/zip`,
|
||||
recipesSlugComments: slug => `${prefix}/recipes/${slug}/comments`,
|
||||
recipesSlugCommentsId: (slug, id) => `${prefix}/recipes/${slug}/comments/${id}`,
|
||||
shoppingListsId: id => `${prefix}/shopping-lists/${id}`,
|
||||
|
|
|
@ -4,6 +4,15 @@ import { store } from "../store";
|
|||
import i18n from "@/i18n.js";
|
||||
|
||||
export const recipeAPI = {
|
||||
/**
|
||||
* Returns the Default Recipe Settings for the Site
|
||||
* @returns {AxoisResponse} Axois Response Object
|
||||
*/
|
||||
async getDefaultSettings() {
|
||||
const response = await apiReq.get(API_ROUTES.aboutRecipesDefaults);
|
||||
return response;
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a Recipe by URL
|
||||
* @param {string} recipeURL
|
||||
|
|
|
@ -125,12 +125,13 @@ export default {
|
|||
appendSteps(steps) {
|
||||
this.value.recipeInstructions.push(
|
||||
...steps.map(x => ({
|
||||
title: "",
|
||||
text: x,
|
||||
}))
|
||||
);
|
||||
},
|
||||
addStep() {
|
||||
this.value.recipeInstructions.push({ text: "" });
|
||||
this.value.recipeInstructions.push({ title: "", text: "" });
|
||||
},
|
||||
saveExtras(extras) {
|
||||
this.value.extras = extras;
|
||||
|
|
|
@ -68,11 +68,26 @@ export default {
|
|||
notes: [],
|
||||
extras: {},
|
||||
assets: [],
|
||||
settings: {
|
||||
public: true,
|
||||
showNutrition: true,
|
||||
showAssets: true,
|
||||
landscapeView: true,
|
||||
disableComments: false,
|
||||
disableAmount: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDefaultSettings();
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getDefaultSettings() {
|
||||
const response = await api.recipes.getDefaultSettings();
|
||||
this.recipeDetails.settings = response.data;
|
||||
},
|
||||
getImage(fileObject) {
|
||||
this.fileObject = fileObject;
|
||||
this.onFileChange();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue