diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 149bd4f39..a2dc0dbe5 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -8,30 +8,34 @@ on:
jobs:
php-lint:
- name: Run PHP Linter and Code Style checker
- runs-on: ubuntu-latest
- steps:
- - name: Checkout the project
- uses: actions/checkout@v2
- - name: Get PHP version
- shell: bash
- run: php -v
- - name: Install Composer
- shell: bash
- run: >-
- wget https://github.com/composer/getcomposer.org/raw/master/web/installer -O - -q |
- php -- --quiet
- - name: Install packages
- shell: bash
- run: composer install
- - name: Run linter
- shell: bash
- run: composer lint:lint
- - name: Run code style checker
- shell: bash
- env:
- PHP_CS_FIXER_IGNORE_ENV: 1
- run: composer cs:check
+ name: Run PHP Linter and Code Style checker
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout the project
+ uses: actions/checkout@v2
+ - name: Get PHP version
+ shell: bash
+ run: php -v
+ - name: Install Composer
+ shell: bash
+ run: >-
+ wget https://github.com/composer/getcomposer.org/raw/master/web/installer -O - -q |
+ php -- --quiet
+ - name: Install packages
+ shell: bash
+ run: composer install
+ - name: Run linter
+ shell: bash
+ run: composer lint:lint
+ - name: Run code style checker
+ shell: bash
+ env:
+ PHP_CS_FIXER_IGNORE_ENV: 1
+ run: composer cs:check
+ - name: Check for formatting issues with vue files
+ shell: bash
+ run: npm run prettier
+
unit-tests:
name: Run the unittests
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1543aa60..8c266fa56 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@
[#596](https://github.com/nextcloud/cookbook/pull/596) @seyfeb
- Updated dependency of eslint-config-prettier
[#603](https://github.com/nextcloud/cookbook/pull/603) @christianlupus
+- Enforce basic code styling using prettier in vue files
+ [#607](https://github.com/nextcloud/cookbook/pull/607) @christianlupus
## Deprecated
- Obsolete routes to old user interface, see `appinfo/routes.php`
diff --git a/src/components/AppControls.vue b/src/components/AppControls.vue
index 120489205..3cecd3c6a 100644
--- a/src/components/AppControls.vue
+++ b/src/components/AppControls.vue
@@ -2,237 +2,372 @@
- {{ t('cookbook', 'Cannot access recipe folder.') }}
+ {{ t("cookbook", "Cannot access recipe folder.") }}
{{
- t('cookbook', 'You are logged in with a guest account. Therefore, you are not allowed to generate arbitrary files and folders on this Nextcloud instance. To be able to use the Cookbook app as a guest, you need to specify a folder where all recipes are stored. You will need write permission to this folder.')
+ // prettier-ignore
+ t("cookbook", "You are logged in with a guest account. Therefore, you are not allowed to generate arbitrary files and folders on this Nextcloud instance. To be able to use the Cookbook app as a guest, you need to specify a folder where all recipes are stored. You will need write permission to this folder." )
}}
-
- {{ t('cookbook', 'Select recipe folder') }}
+
+ {{ t("cookbook", "Select recipe folder") }}
-
@@ -26,30 +24,29 @@
diff --git a/src/components/AppNavi.vue b/src/components/AppNavi.vue
index 003a5b25c..6c4f09f1a 100644
--- a/src/components/AppNavi.vue
+++ b/src/components/AppNavi.vue
@@ -1,8 +1,9 @@
-
-
+
+
diff --git a/src/components/RecipeIngredient.vue b/src/components/RecipeIngredient.vue
index b600bd451..62aae5482 100644
--- a/src/components/RecipeIngredient.vue
+++ b/src/components/RecipeIngredient.vue
@@ -1,22 +1,28 @@
-
- ✔
+
+ ✔
-
+
diff --git a/src/components/RecipeInstruction.vue b/src/components/RecipeInstruction.vue
index cf4ebcd0a..ed3e12ba6 100644
--- a/src/components/RecipeInstruction.vue
+++ b/src/components/RecipeInstruction.vue
@@ -1,27 +1,25 @@
-
+
diff --git a/src/components/RecipeKeyword.vue b/src/components/RecipeKeyword.vue
index 0f61c0eb1..12f26f066 100644
--- a/src/components/RecipeKeyword.vue
+++ b/src/components/RecipeKeyword.vue
@@ -2,61 +2,57 @@
{{ name }}
- ({{count}})
+ ({{ count }})
diff --git a/src/components/RecipeList.vue b/src/components/RecipeList.vue
index 7ce90fa13..1200306a4 100644
--- a/src/components/RecipeList.vue
+++ b/src/components/RecipeList.vue
@@ -1,31 +1,42 @@
-
-
+
-
+
-
+
+ />
@@ -33,13 +44,18 @@
v-for="recipeObj in recipeObjects"
:key="recipeObj.recipe.recipe_id"
v-show="recipeObj.show"
- >
+ >
-
+ :blurred-preview-src="
+ recipeObj.recipe.imagePlaceholderUrl
+ "
+ :width="105"
+ :height="105"
+ />
{{ recipeObj.recipe.name }}
@@ -48,15 +64,15 @@
diff --git a/src/components/RecipeNutritionInfoItem.vue b/src/components/RecipeNutritionInfoItem.vue
index 8a8f9a239..4f356e2fc 100644
--- a/src/components/RecipeNutritionInfoItem.vue
+++ b/src/components/RecipeNutritionInfoItem.vue
@@ -11,26 +11,24 @@
diff --git a/src/components/RecipeTimer.vue b/src/components/RecipeTimer.vue
index b09049ad0..af5bfa3e0 100644
--- a/src/components/RecipeTimer.vue
+++ b/src/components/RecipeTimer.vue
@@ -1,18 +1,21 @@
-
-
-
{{ t('cookbook', label) }}
+
+
{{ t("cookbook", label) }}
{{ displayTime }}
-
diff --git a/src/components/RecipeTool.vue b/src/components/RecipeTool.vue
index 1a4bfa8b5..1d83c3044 100644
--- a/src/components/RecipeTool.vue
+++ b/src/components/RecipeTool.vue
@@ -4,15 +4,13 @@
diff --git a/src/components/RecipeView.vue b/src/components/RecipeView.vue
index 49d6ac6b4..544cf517f 100644
--- a/src/components/RecipeView.vue
+++ b/src/components/RecipeView.vue
@@ -1,83 +1,268 @@
-