Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ jobs:
shell: bash
run: make appinfo/info.xml

- name: Update NPM
shell: bash
run: sudo npm install -g npm

- name: Install the NPM dependencies
shell: bash
run: >-
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
[#823](https://github.com/nextcloud/cookbook/pull/823) @christianlupus
- Fix test script after update in docker-compose
[#833](https://github.com/nextcloud/cookbook/pull/833) @christianlupus
- Update NPM during automatic building to latest version ([#837](https://github.com/nextcloud/cookbook/issues/837))
[#839](https://github.com/nextcloud/cookbook/pull/839) @christianlupus
- Downgrade eslint to meet peer dependencies ([#838](https://github.com/nextcloud/cookbook/issues/838))
[#839](https://github.com/nextcloud/cookbook/pull/839) @christianlupus
- Fix bug in Makefile to simplify development
[#839](https://github.com/nextcloud/cookbook/pull/839) @christianlupus


## 0.9.6 - 2021-10-18
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ appstore_package_name=$(appstore_build_directory)/$(app_name)
npm=$(shell which npm 2> /dev/null)
composer=$(shell which composer 2> /dev/null)

all: build
all: build appinfo/info.xml

# Fetches the PHP and JS dependencies and compiles the JS. If no composer.json
# is present, the composer step is skipped, if no package.json or js/package.json
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"prettier-fix": "npx prettier --write src",
"stylelint": "npx stylelint src",
"stylelint-fix": "npx stylelint --fix src",
"eslint": "npx eslint src",
"eslint-fix": "npx eslint --fix src"
"eslint": "npx eslint src/**/*.{vue,js}",
"eslint-fix": "npx eslint --fix src/**/*.{vue,js}"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,7 +46,7 @@
"babel-loader": "^8.1.0",
"compression-webpack-plugin": "^9.0.0",
"css-loader": "^6.0.0",
"eslint": "^8.0.1",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-import": "^2.22.1",
Expand Down
8 changes: 5 additions & 3 deletions src/components/AppControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ export default {
deleteRecipe() {
// Confirm delete
if (
!confirm(
// eslint-disable-next-line no-alert
!window.confirm(
// prettier-ignore
t("cookbook","Are you sure you want to delete this recipe?")
)
Expand All @@ -307,10 +308,11 @@ export default {

this.$store
.dispatch("deleteRecipe", { id: this.$store.state.recipe.id })
.then((response) => {
.then(() => {
$this.$window.goTo("/")
})
.catch((e) => {
// eslint-disable-next-line no-alert
alert(t("cookbook", "Delete failed"))
if (e && e instanceof Error) {
throw e
Expand All @@ -330,7 +332,7 @@ export default {
this.$root.$emit("saveRecipe")
},
search(e) {
this.$window.goTo("/search/" + e.target[1].value)
this.$window.goTo(`/search/${e.target[1].value}`)
},
updateFilters(e) {
this.filterValue = e
Expand Down
6 changes: 5 additions & 1 deletion src/components/AppNavi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export default {
e2.response.status >= 400 &&
e2.response.status < 500
) {
if (e2.response.status == 409) {
if (e2.response.status === 409) {
// There was a recipe found with the same name

// eslint-disable-next-line no-alert
Expand All @@ -295,14 +295,18 @@ export default {
alert(e2.response.data)
}
} else {
// eslint-disable-next-line no-console
console.error(e2)
// eslint-disable-next-line no-alert
alert(
// prettier-ignore
t("cookbook","The server reported an error. Please check.")
)
}
} else {
// eslint-disable-next-line no-console
console.error(e2)
// eslint-disable-next-line no-alert
alert(
// prettier-ignore
t("cookbook", "Could not query the server. This might be a network problem.")
Expand Down
6 changes: 3 additions & 3 deletions src/components/RecipeCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="recipe-card" v-if="recipe !== null">
<div v-if="recipe !== null" class="recipe-card">
<router-link :to="'/recipe/' + recipe.recipe_id">
<lazy-picture
v-if="recipe.imageUrl"
Expand All @@ -13,8 +13,8 @@
<span class="recipe-title">{{ recipe.name }}</span>
<div class="recipe-info-container-bottom">
<span
class="recipe-info-date"
v-if="formatDateTime(recipe.dateCreated) != null"
class="recipe-info-date"
>
<span
class="icon-calendar-dark recipe-info-date-icon"
Expand All @@ -24,11 +24,11 @@
</span>
</span>
<span
class="recipe-info-date"
v-if="
recipe.dateModified !== recipe.dateCreated &&
formatDateTime(recipe.dateModified) != null
"
class="recipe-info-date"
>
<span class="icon-rename recipe-info-date-icon" />
<span class="recipe-date"
Expand Down
10 changes: 4 additions & 6 deletions src/components/RecipeEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ import EditMultiselect from "./EditMultiselect.vue"
import EditMultiselectInputGroup from "./EditMultiselectInputGroup.vue"
import EditMultiselectPopup from "./EditMultiselectPopup.vue"
import EditTimeField from "./EditTimeField.vue"
import ActionButton from "@nextcloud/vue/dist/Components/ActionButton"

export default {
name: "RecipeEdit",
Expand All @@ -137,7 +136,6 @@ export default {
EditTimeField,
EditMultiselectInputGroup,
EditMultiselectPopup,
ActionButton,
},
// We can check if the user has browsed from the same recipe's view to this
// edit and save some time by not reloading the recipe data, leading to a
Expand Down Expand Up @@ -583,11 +581,10 @@ export default {
return this.$store.dispatch("updateRecipe", {
recipe: this.recipe,
})
} else {
return this.$store.dispatch("createRecipe", {
recipe: this.recipe,
})
}
return this.$store.dispatch("createRecipe", {
recipe: this.recipe,
})
})()

request
Expand All @@ -602,6 +599,7 @@ export default {

switch (e.response.status) {
case 409:
// eslint-disable-next-line no-alert
alert(e.response.data.msg)
break

Expand Down
1 change: 1 addition & 0 deletions src/components/RecipeInstruction.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<!-- eslint-disable-next-line vue/no-v-html -->
<li :class="{ done: isDone }" @click="toggleDone" v-html="instruction"></li>
</template>

Expand Down
3 changes: 1 addition & 2 deletions src/components/RecipeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
v-if="showTagCloudInRecipeList"
v-model="keywordFilter"
:keywords="rawKeywords"
:filteredRecipes="filteredRecipes"
:filtered-recipes="filteredRecipes"
/>
<div id="recipes-submenu" class="recipes-submenu-container">
<Multiselect
Expand Down Expand Up @@ -53,7 +53,6 @@
</template>

<script>
import moment from "@nextcloud/moment"
import Multiselect from "@nextcloud/vue/dist/Components/Multiselect"
import RecipeCard from "./RecipeCard.vue"
import RecipeListKeywordCloud from "./RecipeListKeywordCloud.vue"
Expand Down
8 changes: 7 additions & 1 deletion src/components/RecipeTool.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<template>
<!-- eslint-disable-next-line vue/no-v-html -->
<li v-html="tool"></li>
</template>

<script>
export default {
name: "RecipeTool",
props: ["tool"],
props: {
tool: {
type: String,
default: "",
},
},
}
</script>

Expand Down