зеркало из https://github.com/nextcloud/cookbook.git
Revert "Merge pull request #1746 from nextcloud/dependabot/npm_and_yarn/prettier-3.0.0"
This reverts commit06696725c7
, reversing changes made tod59f08e63a
.
This commit is contained in:
Родитель
876e575a91
Коммит
3445f542a5
|
@ -43,8 +43,6 @@
|
|||
[#1729](https://github.com/nextcloud/cookbook/pull/1729) @dependabot @christianlupus
|
||||
- Update Node to new LTS version
|
||||
[#1735](https://github.com/nextcloud/cookbook/pull/1735) @nextcloud-command
|
||||
- Update major prettier version
|
||||
[#1746](https://github.com/nextcloud/cookbook/pull/1746) @dependabot @christianlupus
|
||||
|
||||
|
||||
## 0.10.2 - 2023-03-24
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
"eslint-import-resolver-alias": "^1.1.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-vue": "^9.0.1",
|
||||
"prettier": "^3.0.0",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier-package-json": "^2.6.3",
|
||||
"stylelint": "^14.5.3",
|
||||
"stylelint-config-idiomatic-order": "^9.0.0",
|
||||
|
@ -1411,23 +1411,6 @@
|
|||
"url": "https://opencollective.com/postcss/"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/component-compiler-utils/node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/component-compiler-utils/node_modules/yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
|
@ -7698,15 +7681,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
|
||||
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
|
@ -12524,14 +12507,6 @@
|
|||
"source-map": "^0.6.1"
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
|
@ -17139,9 +17114,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"prettier": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
|
||||
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"prettier-package-json": {
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
"eslint-import-resolver-alias": "^1.1.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-vue": "^9.0.1",
|
||||
"prettier": "^3.0.0",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier-package-json": "^2.6.3",
|
||||
"stylelint": "^14.5.3",
|
||||
"stylelint-config-idiomatic-order": "^9.0.0",
|
||||
|
|
|
@ -285,7 +285,7 @@ export default {
|
|||
if (
|
||||
!(await showSimpleConfirmModal(
|
||||
// prettier-ignore
|
||||
t("cookbook", "Are you sure you want to delete this recipe?"),
|
||||
t("cookbook", "Are you sure you want to delete this recipe?")
|
||||
))
|
||||
) {
|
||||
return
|
||||
|
|
|
@ -47,7 +47,7 @@ export default {
|
|||
},
|
||||
false, // Single result
|
||||
["httpd/unix-directory"], // Desired MIME type
|
||||
true, // Make modal dialog
|
||||
true // Make modal dialog
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
@ -190,7 +190,7 @@ export default {
|
|||
{
|
||||
category: cat.name,
|
||||
}
|
||||
),
|
||||
)
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
@ -224,7 +224,7 @@ export default {
|
|||
{
|
||||
category: oldName,
|
||||
}
|
||||
),
|
||||
)
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
@ -269,7 +269,7 @@ export default {
|
|||
console.error(e2)
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
t("cookbook","The server reported an error. Please check."),
|
||||
t("cookbook","The server reported an error. Please check.")
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
@ -277,7 +277,7 @@ export default {
|
|||
console.error(e2)
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
t("cookbook", "Could not query the server. This might be a network problem."),
|
||||
t("cookbook", "Could not query the server. This might be a network problem.")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ export default {
|
|||
this.$log.info(
|
||||
`Reloading recipes in ${
|
||||
$this.$refs[`app-navi-cat-${i}`][0].title
|
||||
}`,
|
||||
}`
|
||||
)
|
||||
$this.categoryOpen(i)
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ export default {
|
|||
})
|
||||
} catch (e) {
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Failed to fetch categories"),
|
||||
t("cookbook", "Failed to fetch categories")
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
|
|
@ -49,7 +49,7 @@ export default {
|
|||
false,
|
||||
["image/jpeg", "image/png"],
|
||||
true,
|
||||
OC.dialogs.FILEPICKER_TYPE_CHOOSE,
|
||||
OC.dialogs.FILEPICKER_TYPE_CHOOSE
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
@ -100,7 +100,7 @@ export default {
|
|||
field.focus()
|
||||
field.setSelectionRange(
|
||||
this.lastCursorPosition,
|
||||
this.lastCursorPosition,
|
||||
this.lastCursorPosition
|
||||
)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -232,7 +232,7 @@ export default {
|
|||
const $ul = $li.closest("ul")
|
||||
const $insertedIndex = Array.prototype.indexOf.call(
|
||||
$ul.childNodes,
|
||||
$li,
|
||||
$li
|
||||
)
|
||||
|
||||
// Remove the common prefix from each line of the pasted text
|
||||
|
@ -268,7 +268,7 @@ export default {
|
|||
this.addNewEntry(
|
||||
$insertedIndex + i + 1,
|
||||
false,
|
||||
inputLinesArray[i],
|
||||
inputLinesArray[i]
|
||||
)
|
||||
}
|
||||
this.$emit("input", this.buffer)
|
||||
|
@ -325,7 +325,7 @@ export default {
|
|||
const $ul = $li.closest("ul")
|
||||
const $pressedLiIndex = Array.prototype.indexOf.call(
|
||||
$ul.childNodes,
|
||||
$li,
|
||||
$li
|
||||
)
|
||||
|
||||
if ($pressedLiIndex >= this.$refs["list-field"].length - 1) {
|
||||
|
@ -354,7 +354,7 @@ export default {
|
|||
const $ul = $li.closest("ul")
|
||||
const $pressedLiIndex = Array.prototype.indexOf.call(
|
||||
$ul.childNodes,
|
||||
$li,
|
||||
$li
|
||||
)
|
||||
this.lastFocusedFieldIndex = $pressedLiIndex
|
||||
this.handleSuggestionsPopupKeyUp(e)
|
||||
|
@ -388,7 +388,7 @@ export default {
|
|||
field.focus()
|
||||
field.setSelectionRange(
|
||||
this.lastCursorPosition,
|
||||
this.lastCursorPosition,
|
||||
this.lastCursorPosition
|
||||
)
|
||||
})
|
||||
},
|
||||
|
|
|
@ -98,7 +98,7 @@ export default {
|
|||
const onThumbnailPreviewLoaded = () => {
|
||||
imgPlaceholder.removeEventListener(
|
||||
"load",
|
||||
onThumbnailPreviewLoaded,
|
||||
onThumbnailPreviewLoaded
|
||||
)
|
||||
img.addEventListener("load", onThumbnailFullyLoaded)
|
||||
$this.$once("hook:destroyed", () => {
|
||||
|
@ -110,12 +110,12 @@ export default {
|
|||
|
||||
imgPlaceholder.addEventListener(
|
||||
"load",
|
||||
onThumbnailPreviewLoaded,
|
||||
onThumbnailPreviewLoaded
|
||||
)
|
||||
$this.$once("hook:destroyed", () => {
|
||||
imgPlaceholder.removeEventListener(
|
||||
"load",
|
||||
onThumbnailPreviewLoaded,
|
||||
onThumbnailPreviewLoaded
|
||||
)
|
||||
})
|
||||
|
||||
|
|
|
@ -497,7 +497,7 @@ export default {
|
|||
$this.isFetchingCategories = false
|
||||
} catch (e) {
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Failed to fetch categories"),
|
||||
t("cookbook", "Failed to fetch categories")
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
@ -523,7 +523,7 @@ export default {
|
|||
$this.isFetchingKeywords = false
|
||||
} catch (e) {
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Failed to fetch keywords"),
|
||||
t("cookbook", "Failed to fetch keywords")
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
@ -553,7 +553,7 @@ export default {
|
|||
$this.setup()
|
||||
} catch {
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Loading recipe failed"),
|
||||
t("cookbook", "Loading recipe failed")
|
||||
)
|
||||
// Disable loading indicator
|
||||
if ($this.$store.state.loadingRecipe) {
|
||||
|
@ -599,19 +599,19 @@ export default {
|
|||
default:
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
t("cookbook","Unknown answer returned from server. See logs."),
|
||||
t("cookbook","Unknown answer returned from server. See logs.")
|
||||
)
|
||||
this.$log.error(e.response)
|
||||
}
|
||||
} else if (e.request) {
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "No answer for request was received."),
|
||||
t("cookbook", "No answer for request was received.")
|
||||
)
|
||||
this.$log.error(e)
|
||||
} else {
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
t("cookbook","Could not start request to save recipe."),
|
||||
t("cookbook","Could not start request to save recipe.")
|
||||
)
|
||||
this.$log.error(e)
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ export default {
|
|||
|
||||
if (this.filters) {
|
||||
ret = ret.filter((r) =>
|
||||
r.name.toLowerCase().includes($this.filters.toLowerCase()),
|
||||
r.name.toLowerCase().includes($this.filters.toLowerCase())
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ export default {
|
|||
}
|
||||
if (recipeProperty === "name") {
|
||||
return r1[recipeProperty].localeCompare(
|
||||
r2[recipeProperty],
|
||||
r2[recipeProperty]
|
||||
)
|
||||
}
|
||||
if (
|
||||
|
|
|
@ -156,9 +156,9 @@ export default {
|
|||
.map(
|
||||
(r) =>
|
||||
r.keywords &&
|
||||
r.keywords.split(",").includes(kw.name),
|
||||
r.keywords.split(",").includes(kw.name)
|
||||
)
|
||||
.reduce((l, r) => l || r, false),
|
||||
.reduce((l, r) => l || r, false)
|
||||
)
|
||||
},
|
||||
/**
|
||||
|
@ -166,7 +166,7 @@ export default {
|
|||
*/
|
||||
selectedKeywordsWithCount() {
|
||||
return this.keywordsWithCount.filter((kw) =>
|
||||
this.selectedKeywordsBuffer.includes(kw.name),
|
||||
this.selectedKeywordsBuffer.includes(kw.name)
|
||||
)
|
||||
},
|
||||
/**
|
||||
|
@ -174,7 +174,7 @@ export default {
|
|||
*/
|
||||
unavailableKeywords() {
|
||||
return this.unselectedKeywords.filter(
|
||||
(kw) => !this.selectableKeywords.includes(kw),
|
||||
(kw) => !this.selectableKeywords.includes(kw)
|
||||
)
|
||||
},
|
||||
/**
|
||||
|
@ -182,7 +182,7 @@ export default {
|
|||
*/
|
||||
unselectedKeywords() {
|
||||
return this.keywordsWithCount.filter(
|
||||
(kw) => !this.selectedKeywordsWithCount.includes(kw),
|
||||
(kw) => !this.selectedKeywordsWithCount.includes(kw)
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
@ -71,7 +71,7 @@ export default {
|
|||
// Source for the sound https://pixabay.com/sound-effects/alarm-clock-short-6402/
|
||||
// Voted by poll https://nextcloud.christian-wolf.click/nextcloud/apps/polls/s/Wke3s6CscDwQEjPV
|
||||
this.audio = new Audio(
|
||||
linkTo("cookbook", "assets/alarm-continuous.mp3"),
|
||||
linkTo("cookbook", "assets/alarm-continuous.mp3")
|
||||
)
|
||||
|
||||
// For now, the alarm should play continuously until it is dismissed
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
v-if="
|
||||
'carbohydrateContent' in recipe.nutrition &&
|
||||
!isNullOrEmpty(
|
||||
recipe.nutrition['carbohydrateContent'],
|
||||
recipe.nutrition['carbohydrateContent']
|
||||
)
|
||||
"
|
||||
:title="t('cookbook', 'Carbohydrate')"
|
||||
|
@ -222,7 +222,7 @@
|
|||
v-if="
|
||||
'cholesterolContent' in recipe.nutrition &&
|
||||
!isNullOrEmpty(
|
||||
recipe.nutrition['cholesterolContent'],
|
||||
recipe.nutrition['cholesterolContent']
|
||||
)
|
||||
"
|
||||
:title="t('cookbook', 'Cholesterol')"
|
||||
|
@ -240,7 +240,7 @@
|
|||
v-if="
|
||||
'proteinContent' in recipe.nutrition &&
|
||||
!isNullOrEmpty(
|
||||
recipe.nutrition['proteinContent'],
|
||||
recipe.nutrition['proteinContent']
|
||||
)
|
||||
"
|
||||
:title="t('cookbook', 'Protein')"
|
||||
|
@ -250,7 +250,7 @@
|
|||
v-if="
|
||||
'sodiumContent' in recipe.nutrition &&
|
||||
!isNullOrEmpty(
|
||||
recipe.nutrition['sodiumContent'],
|
||||
recipe.nutrition['sodiumContent']
|
||||
)
|
||||
"
|
||||
:title="t('cookbook', 'Sodium')"
|
||||
|
@ -268,7 +268,7 @@
|
|||
v-if="
|
||||
'saturatedFatContent' in recipe.nutrition &&
|
||||
!isNullOrEmpty(
|
||||
recipe.nutrition['saturatedFatContent'],
|
||||
recipe.nutrition['saturatedFatContent']
|
||||
)
|
||||
"
|
||||
:title="t('cookbook', 'Saturated Fat')"
|
||||
|
@ -278,7 +278,7 @@
|
|||
v-if="
|
||||
'unsaturatedFatContent' in recipe.nutrition &&
|
||||
!isNullOrEmpty(
|
||||
recipe.nutrition['unsaturatedFatContent'],
|
||||
recipe.nutrition['unsaturatedFatContent']
|
||||
)
|
||||
"
|
||||
:title="t('cookbook', 'Unsaturated Fat')"
|
||||
|
@ -288,7 +288,7 @@
|
|||
v-if="
|
||||
'transFatContent' in recipe.nutrition &&
|
||||
!isNullOrEmpty(
|
||||
recipe.nutrition['transFatContent'],
|
||||
recipe.nutrition['transFatContent']
|
||||
)
|
||||
"
|
||||
:title="t('cookbook', 'Trans Fat')"
|
||||
|
@ -395,25 +395,25 @@ export default {
|
|||
|
||||
if (this.$store.state.recipe.description) {
|
||||
recipe.description = helpers.escapeHTML(
|
||||
this.$store.state.recipe.description,
|
||||
this.$store.state.recipe.description
|
||||
)
|
||||
}
|
||||
|
||||
if (this.$store.state.recipe.recipeIngredient) {
|
||||
recipe.ingredients = Object.values(
|
||||
this.$store.state.recipe.recipeIngredient,
|
||||
this.$store.state.recipe.recipeIngredient
|
||||
).map((i) => helpers.escapeHTML(i))
|
||||
}
|
||||
|
||||
if (this.$store.state.recipe.recipeInstructions) {
|
||||
recipe.instructions = Object.values(
|
||||
this.$store.state.recipe.recipeInstructions,
|
||||
this.$store.state.recipe.recipeInstructions
|
||||
).map((i) => helpers.escapeHTML(i))
|
||||
}
|
||||
|
||||
if (this.$store.state.recipe.keywords) {
|
||||
recipe.keywords = String(
|
||||
this.$store.state.recipe.keywords,
|
||||
this.$store.state.recipe.keywords
|
||||
).split(",")
|
||||
}
|
||||
|
||||
|
@ -449,13 +449,13 @@ export default {
|
|||
|
||||
if (this.$store.state.recipe.tool) {
|
||||
recipe.tools = this.$store.state.recipe.tool.map((i) =>
|
||||
helpers.escapeHTML(i),
|
||||
helpers.escapeHTML(i)
|
||||
)
|
||||
}
|
||||
|
||||
if (this.$store.state.recipe.dateCreated) {
|
||||
const date = this.parseDateTime(
|
||||
this.$store.state.recipe.dateCreated,
|
||||
this.$store.state.recipe.dateCreated
|
||||
)
|
||||
recipe.dateCreated =
|
||||
date != null ? date.format("L, LT").toString() : null
|
||||
|
@ -463,7 +463,7 @@ export default {
|
|||
|
||||
if (this.$store.state.recipe.dateModified) {
|
||||
const date = this.parseDateTime(
|
||||
this.$store.state.recipe.dateModified,
|
||||
this.$store.state.recipe.dateModified
|
||||
)
|
||||
recipe.dateModified =
|
||||
date != null ? date.format("L, LT").toString() : null
|
||||
|
@ -486,7 +486,7 @@ export default {
|
|||
for (let idx = 0; idx < this.recipe.ingredients.length; ++idx) {
|
||||
if (
|
||||
this.recipe.ingredients[idx].startsWith(
|
||||
this.headerPrefix,
|
||||
this.headerPrefix
|
||||
)
|
||||
) {
|
||||
return true
|
||||
|
@ -524,12 +524,12 @@ export default {
|
|||
return yieldCalculator.recalculateIngredients(
|
||||
this.parsedIngredients,
|
||||
this.recipeYield,
|
||||
this.$store.state.recipe.recipeYield,
|
||||
this.$store.state.recipe.recipeYield
|
||||
)
|
||||
},
|
||||
ingredientsWithValidSyntax() {
|
||||
return this.parsedIngredients.map(
|
||||
yieldCalculator.isValidIngredientSyntax,
|
||||
yieldCalculator.isValidIngredientSyntax
|
||||
)
|
||||
},
|
||||
ingredientsSyntaxCorrect() {
|
||||
|
@ -553,7 +553,7 @@ export default {
|
|||
|
||||
if (r.ingredients) {
|
||||
this.parsedIngredients = r.ingredients.map(() =>
|
||||
t("cookbook", "Loading…"),
|
||||
t("cookbook", "Loading…")
|
||||
)
|
||||
r.ingredients.forEach((ingredient, idx) => {
|
||||
normalizeMarkdown(ingredient)
|
||||
|
@ -570,7 +570,7 @@ export default {
|
|||
|
||||
if (r.instructions) {
|
||||
this.parsedInstructions = r.instructions.map(() =>
|
||||
t("cookbook", "Loading…"),
|
||||
t("cookbook", "Loading…")
|
||||
)
|
||||
r.instructions.forEach((instruction, idx) => {
|
||||
normalizeMarkdown(instruction)
|
||||
|
@ -587,7 +587,7 @@ export default {
|
|||
|
||||
if (r.tools) {
|
||||
this.parsedTools = r.tools.map(() =>
|
||||
t("cookbook", "Loading…"),
|
||||
t("cookbook", "Loading…")
|
||||
)
|
||||
r.tools.forEach((tool, idx) => {
|
||||
normalizeMarkdown(tool)
|
||||
|
@ -688,7 +688,7 @@ export default {
|
|||
$this.$store.dispatch("setPage", { page: "recipe" })
|
||||
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Loading recipe failed"),
|
||||
t("cookbook", "Loading recipe failed")
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -704,10 +704,10 @@ export default {
|
|||
navigator.clipboard
|
||||
.writeText(ingredientsToCopy)
|
||||
.then(() =>
|
||||
this.$log.info("JSON array copied to clipboard"),
|
||||
this.$log.info("JSON array copied to clipboard")
|
||||
)
|
||||
.catch((err) =>
|
||||
this.$log.error("Failed to copy JSON array: ", err),
|
||||
this.$log.error("Failed to copy JSON array: ", err)
|
||||
)
|
||||
} else {
|
||||
// fallback solution
|
||||
|
|
|
@ -74,7 +74,7 @@ export default {
|
|||
{
|
||||
tags,
|
||||
}
|
||||
),
|
||||
)
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
@ -95,7 +95,7 @@ export default {
|
|||
{
|
||||
category: cat,
|
||||
}
|
||||
),
|
||||
)
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
@ -106,13 +106,13 @@ export default {
|
|||
const $this = this
|
||||
try {
|
||||
const response = await api.recipes.search(
|
||||
$this.$route.params.value,
|
||||
$this.$route.params.value
|
||||
)
|
||||
$this.results = response.data
|
||||
} catch (e) {
|
||||
$this.results = []
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Failed to load search results"),
|
||||
t("cookbook", "Failed to load search results")
|
||||
)
|
||||
if (e && e instanceof Error) {
|
||||
throw e
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
{{
|
||||
t(
|
||||
"cookbook",
|
||||
"Control which blocks of information are shown in the recipe view. If you do not use some features and find them distracting, you may hide them.",
|
||||
"Control which blocks of information are shown in the recipe view. If you do not use some features and find them distracting, you may hide them."
|
||||
)
|
||||
}}
|
||||
</legend>
|
||||
|
@ -232,7 +232,7 @@ export default {
|
|||
} catch {
|
||||
await showSimpleAlertModal(
|
||||
// prettier-ignore
|
||||
t("cookbook","Could not set preference for image printing"),
|
||||
t("cookbook","Could not set preference for image printing")
|
||||
)
|
||||
this.resetPrintImage = true
|
||||
this.printImage = oldVal
|
||||
|
@ -260,7 +260,7 @@ export default {
|
|||
{
|
||||
interval: newVal,
|
||||
}
|
||||
),
|
||||
)
|
||||
)
|
||||
this.resetInterval = true
|
||||
this.updateInterval = oldVal
|
||||
|
@ -281,7 +281,7 @@ export default {
|
|||
// eslint-disable-next-line no-console
|
||||
console.error("Error while trying to save info blocks", err)
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Could not save visible info blocks"),
|
||||
t("cookbook", "Could not save visible info blocks")
|
||||
)
|
||||
this.resetVisibleInfoBlocks = true
|
||||
this.visibleInfoBlocks = oldVal
|
||||
|
@ -321,13 +321,13 @@ export default {
|
|||
{
|
||||
path
|
||||
}
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
},
|
||||
false,
|
||||
["httpd/unix-directory"],
|
||||
true,
|
||||
true
|
||||
)
|
||||
},
|
||||
|
||||
|
@ -347,7 +347,7 @@ export default {
|
|||
|
||||
this.printImage = config.print_image
|
||||
this.visibleInfoBlocks = visibleInfoBlocksDecode(
|
||||
config.visibleInfoBlocks,
|
||||
config.visibleInfoBlocks
|
||||
)
|
||||
this.showTagCloudInRecipeList =
|
||||
this.$store.state.localSettings.showTagCloudInRecipeList
|
||||
|
@ -356,7 +356,7 @@ export default {
|
|||
} catch (err) {
|
||||
this.$log.error("Error setting up SettingsDialog", err)
|
||||
await showSimpleAlertModal(
|
||||
t("cookbook", "Loading config failed"),
|
||||
t("cookbook", "Loading config failed")
|
||||
)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -190,7 +190,7 @@ export const suggestionsPopupMixin = {
|
|||
ArrowDown: +1,
|
||||
}[e.key],
|
||||
0,
|
||||
this.suggestionOptions.length - 1,
|
||||
this.suggestionOptions.length - 1
|
||||
)
|
||||
this.suggestionsData = {
|
||||
...this.suggestionsData,
|
||||
|
@ -273,7 +273,7 @@ export const suggestionsPopupMixin = {
|
|||
searchText === "" ||
|
||||
option.title
|
||||
.toLowerCase()
|
||||
.includes(searchText.toLowerCase()),
|
||||
.includes(searchText.toLowerCase())
|
||||
)
|
||||
},
|
||||
},
|
||||
|
@ -327,7 +327,7 @@ export default {
|
|||
field.offsetLeft + caretPos.left,
|
||||
field.offsetLeft +
|
||||
field.offsetWidth -
|
||||
SUGGESTIONS_POPUP_WIDTH,
|
||||
SUGGESTIONS_POPUP_WIDTH
|
||||
),
|
||||
top: field.offsetTop + caretPos.top + caretPos.height,
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@ const baseUrl = `${generateUrl("apps/cookbook")}/webapp`
|
|||
instance.interceptors.request.use((config) => {
|
||||
Vue.$log.debug(
|
||||
`[axios] Making "${config.method}" request to "${config.url}"`,
|
||||
config,
|
||||
config
|
||||
)
|
||||
const contentType = config.headers[config.method]["Content-Type"]
|
||||
if (!["application/json", "text/json"].includes(contentType)) {
|
||||
Vue.$log.warn(
|
||||
`[axios] Request to "${config.url}" is using Content-Type "${contentType}", not JSON`,
|
||||
`[axios] Request to "${config.url}" is using Content-Type "${contentType}", not JSON`
|
||||
)
|
||||
}
|
||||
return config
|
||||
|
@ -30,7 +30,7 @@ instance.interceptors.response.use(
|
|||
(error) => {
|
||||
Vue.$log.warn("[axios] Received error", error)
|
||||
return Promise.reject(error)
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
axios.defaults.headers.common.Accept = "application/json"
|
||||
|
|
|
@ -74,7 +74,7 @@ function escapeHTML(text) {
|
|||
"'": "'",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
})[a],
|
||||
}[a])
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ const isEnabled = () => {
|
|||
if (userValue !== null && expiry === null) {
|
||||
localStorage.setItem(
|
||||
KEY_EXPIRY,
|
||||
moment().add(EXPIRY_MINUTES, "m").valueOf(),
|
||||
moment().add(EXPIRY_MINUTES, "m").valueOf()
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@ export const showSimpleAlertModal = create(SimpleAlertModal, "content", "title")
|
|||
export const showSimpleConfirmModal = create(
|
||||
SimpleConfirmModal,
|
||||
"content",
|
||||
"title",
|
||||
"title"
|
||||
)
|
||||
|
|
|
@ -35,7 +35,7 @@ async function getRecipesFromLinks(linkIds) {
|
|||
recipe = null
|
||||
}
|
||||
return recipe
|
||||
}),
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -58,12 +58,12 @@ function insertMarkdownLinks(content, recipes) {
|
|||
// Replace plain references with recipe name
|
||||
const rePlain = RegExp(
|
||||
`(^|\\s|[,._+&?!-])#r/${id}($|\\s|[,._+&?!-])`,
|
||||
"g",
|
||||
"g"
|
||||
)
|
||||
// const re = /(^|\s|[,._+&?!-])#r\/(\d+)(?=$|\s|[.,_+&?!-])/g
|
||||
ret = ret.replace(
|
||||
rePlain,
|
||||
`$1[${r.name} (\\#r/${id})](${getRecipeUrl(id)})$2`,
|
||||
`$1[${r.name} (\\#r/${id})](${getRecipeUrl(id)})$2`
|
||||
)
|
||||
})
|
||||
return ret
|
||||
|
|
|
@ -56,7 +56,7 @@ export default new Vuex.Store({
|
|||
initializeStore(state) {
|
||||
if (localStorage.getItem("showTagCloudInRecipeList")) {
|
||||
state.localSettings.showTagCloudInRecipeList = JSON.parse(
|
||||
localStorage.getItem("showTagCloudInRecipeList"),
|
||||
localStorage.getItem("showTagCloudInRecipeList")
|
||||
)
|
||||
} else {
|
||||
state.localSettings.showTagCloudInRecipeList = true
|
||||
|
|
Загрузка…
Ссылка в новой задаче