зеркало из https://github.com/nextcloud/cookbook.git
Merge remote-tracking branch 'principal/master' into documentation
Signed-off-by: Christian Wolf <github@christianwolf.email>
This commit is contained in:
Коммит
b7f4d972ce
|
@ -23,11 +23,21 @@ jobs:
|
|||
lines=$(git diff HEAD~1 -- CHANGELOG.md | wc -l)
|
||||
echo "::set-output name=lines::$lines"
|
||||
|
||||
- name: Get all changed file names
|
||||
id: file-names
|
||||
run: |
|
||||
lines="$(git diff HEAD~1 --name-only)"
|
||||
echo "Changed files:"
|
||||
echo "$lines"
|
||||
cnt="$(echo "$lines" | grep -v '^package-lock.json$' | wc -l)"
|
||||
echo "That are $cnt changed files."
|
||||
echo "::set-output name=num::$cnt"
|
||||
|
||||
- name: Error if the number of diff lines is zero
|
||||
run: |
|
||||
echo "::error file=CHANGELOG.md::There was no change in the changelog detected. Please fill in a valid entry into that file."
|
||||
exit 1
|
||||
if: ${{ steps.diff.outputs.lines == 0 }}
|
||||
if: ${{ steps.diff.outputs.lines == 0 && steps.file-names.outputs.num > 0 }}
|
||||
|
||||
appinfo:
|
||||
name: Check for matching app info file
|
||||
|
|
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -3,10 +3,18 @@
|
|||
### Fixed
|
||||
- Refactor the code for image handling to make it testable
|
||||
[#933](https://github.com/nextcloud/cookbook/pull/933) @christianlupus
|
||||
- Allow merging of PRs from dependabot with only changes to package-lock.json
|
||||
[#952](https://github.com/nextcloud/cookbook/pull/952) @christianlupus
|
||||
- Redirect to login in case of logged out user
|
||||
[#956](https://github.com/nextcloud/cookbook/pull/956) @christianlupus
|
||||
|
||||
### Documentation
|
||||
- Enhanced the user doumentation by adding some starter's information
|
||||
- Corrected some spelling issues
|
||||
[#941](https://github.com/nextcloud/cookbook/pull/941) @Valdnet
|
||||
- Enhanced the user documentation by adding some starter's information
|
||||
[#936](https://github.com/nextcloud/cookbook/pull/936) @zorglubu
|
||||
- Translate user documentation to French
|
||||
[#936](https://github.com/nextcloud/cookbook/pull/947) @zorglubu
|
||||
|
||||
|
||||
## 0.9.11 - 2022-03-28
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 5.5 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 54 KiB |
Двоичный файл не отображается.
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 17 KiB |
|
@ -17,7 +17,6 @@
|
|||
1. Liste déroulante pour différents ordres de tri des recettes
|
||||
1. Les recettes avec leurs dates de création et de dernière modification
|
||||
|
||||
|
||||
### Où sont mes fichiers
|
||||
|
||||
Avant de créer votre première recette, vous devriez décider où seront stockées les recettes et images.
|
||||
|
@ -68,7 +67,6 @@ On peut accéder aux catégories de façon plus directe qu'aux mots-clés car el
|
|||
|
||||
En cliquant sur une catégorie dans le panneau latéral, vous pouvez filtrer rapidement des recettes comme "Légumes" ou "Pâtisserie". Les mots-clés peuvent ensuite être utilisés pour réduire la sélection avec des étiquettes comme "amandes" ou "facile". De cette façon, les catégories opérent un filtrage large, et les mots-clés vont permettre d'affiner ce filtrage.
|
||||
|
||||
|
||||
![Exemple utilisant les catégories pour un filtrage large, et les mots-clés pour affiner ce filtrage](assets/keywords-and-categories-fr.png)
|
||||
|
||||
## Importer des Recettes
|
||||
|
@ -87,7 +85,7 @@ Cependant l'application Cookbook nécessite que le site de recettes respecte les
|
|||
|
||||
Pour l'instant, la seule façon de partager des recettes est de partager, avec un autre utilisateur Nextcloud, le répertoire Nextcloud qui contient les recettes. À cette fin, le répertoire doit d'abord être partagé depuis le gestionnaire de fichiers de Nextcloud.Ensuite, il peut être indiqué comme répertoire de recette dans les *Paramètres* de l'application Cookbook.
|
||||
|
||||
![Settings](assets/settings-fr.png)
|
||||
![Paramètres de Cookbook](assets/settings-fr.png)
|
||||
|
||||
### Partage public
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ An image may be added to the recipe. There are multiple ways to get this done:
|
|||
|
||||
- The image can be previously stored on your Nextcloud instance. Click on the icon on the right of the image field, and select the image. Doing that, the image will be copied in the recipe's directory.
|
||||
|
||||
- The image can be loaded from a URL. Just type or paste the URL in the image field. The cookbook app will download and use the image.
|
||||
- The image can be loaded from a URL. Just type or paste the URL in the field. The cookbook app will download and use the image.
|
||||
|
||||
### Adding a link
|
||||
|
||||
|
|
14
l10n/bg.js
14
l10n/bg.js
|
@ -1,13 +1,20 @@
|
|||
OC.L10N.register(
|
||||
"cookbook",
|
||||
{
|
||||
"The recipe has already an image file. Cannot create a new one." : "Рецептата вече има файл с изображение. Не може да се създаде нов.",
|
||||
"There is no primary image for the recipe present." : "Няма основно изображение за настоящата рецепта.",
|
||||
"Cannot parse non-POST multipart encoding. This is a bug." : "Не може да се анализира multipart кодиране, различно от POST. Това е грешка.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Не може да се открие типът на предавани данни. Това е грешка, моля, докладвайте.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Намерен е невалиден низ, с кодиран URL адрес. Моля, докладвайте грешка.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Потребителят не се е вписал. Не може да бъде получена потребителска конфигурация.",
|
||||
"Recipes" : "Рецепти",
|
||||
"in %s" : "в %s",
|
||||
"Another recipe with that name already exists" : "Друга рецепта с това име вече съществува",
|
||||
"User cannot create recipe folder" : "Потребител не може да създаде папка с рецепти",
|
||||
"Recipe with ID %d not found." : "Няма намерена рецепта с ID %d.",
|
||||
"Image size \"%s\" is not recognized." : "Размерът на изображение \"%s\" не е разпознат.",
|
||||
"The full-sized image is no thumbnail." : "Пълният размер на изображение не е миниатюра.",
|
||||
"The thumbnail type %d is not known." : "Типът миниатюра %d не е известен.",
|
||||
"Cookbook" : "Готварска книга",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Интегрирана готварска книга, използваща JSON файлове schema.org като рецепти",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Библиотека за всички ваши рецепти. Тя използва JSON файлове, следващи формата на рецептата schema.org. За да добавите рецепта към колекцията, можете да поставите URL адреса на рецептата и предоставената уеб страница ще бъде анализирана и изтеглена в папка, която посочите в настройките на приложението.",
|
||||
|
@ -58,6 +65,7 @@ OC.L10N.register(
|
|||
"Could not set recipe update interval to {interval}" : "Интервалът за актуализиране на рецептата не можа да бъде зададен на {interval}",
|
||||
"Could not set recipe folder to {path}" : "Папка с рецепти не можа да се зададе на {path}",
|
||||
"Loading config failed" : "Зареждането на конфигурацията е неуспешно",
|
||||
"Enter URL or select from your Nextcloud instance on the right" : "Въведете URL адрес или изберете от вашия екземпляр на Nextcloud вдясно",
|
||||
"Pick a local image" : "Избор на локално изображение",
|
||||
"Path to your recipe image" : "Път към изображението на вашата рецепта",
|
||||
"Move entry up" : "Преместване на записа нагоре",
|
||||
|
@ -71,6 +79,9 @@ OC.L10N.register(
|
|||
"Description" : "Описание",
|
||||
"URL" : "URL",
|
||||
"Image" : "Изображение",
|
||||
"Preparation time (hours:minutes)" : "Време за подготовка (часове:минути)",
|
||||
"Cooking time (hours:minutes)" : "Време за готвене (часове:минути)",
|
||||
"Total time (hours:minutes)" : "Общо време (часове:минути)",
|
||||
"Choose category" : "Избор на категория",
|
||||
"Keywords" : "Ключови думи",
|
||||
"Choose keywords" : "Избор на ключови думи",
|
||||
|
@ -114,6 +125,9 @@ OC.L10N.register(
|
|||
"Search recipes with this keyword" : "Търсене на рецепти с тази ключова дума",
|
||||
"Date created" : "Дата на създаване",
|
||||
"Last modified" : "Последна промяна",
|
||||
"Preparation time (H:MM)" : "Време за подготовка (Ч:ММ)",
|
||||
"Cooking time (H:MM)" : "Време за готвене (Ч:ММ)",
|
||||
"Total time (H:MM)" : "Общо време (Ч:ММ)",
|
||||
"Serving Size" : "Размер на порция",
|
||||
"Energy" : "Енергия",
|
||||
"Sugar" : "Захар",
|
||||
|
|
14
l10n/bg.json
14
l10n/bg.json
|
@ -1,11 +1,18 @@
|
|||
{ "translations": {
|
||||
"The recipe has already an image file. Cannot create a new one." : "Рецептата вече има файл с изображение. Не може да се създаде нов.",
|
||||
"There is no primary image for the recipe present." : "Няма основно изображение за настоящата рецепта.",
|
||||
"Cannot parse non-POST multipart encoding. This is a bug." : "Не може да се анализира multipart кодиране, различно от POST. Това е грешка.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Не може да се открие типът на предавани данни. Това е грешка, моля, докладвайте.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Намерен е невалиден низ, с кодиран URL адрес. Моля, докладвайте грешка.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Потребителят не се е вписал. Не може да бъде получена потребителска конфигурация.",
|
||||
"Recipes" : "Рецепти",
|
||||
"in %s" : "в %s",
|
||||
"Another recipe with that name already exists" : "Друга рецепта с това име вече съществува",
|
||||
"User cannot create recipe folder" : "Потребител не може да създаде папка с рецепти",
|
||||
"Recipe with ID %d not found." : "Няма намерена рецепта с ID %d.",
|
||||
"Image size \"%s\" is not recognized." : "Размерът на изображение \"%s\" не е разпознат.",
|
||||
"The full-sized image is no thumbnail." : "Пълният размер на изображение не е миниатюра.",
|
||||
"The thumbnail type %d is not known." : "Типът миниатюра %d не е известен.",
|
||||
"Cookbook" : "Готварска книга",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Интегрирана готварска книга, използваща JSON файлове schema.org като рецепти",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Библиотека за всички ваши рецепти. Тя използва JSON файлове, следващи формата на рецептата schema.org. За да добавите рецепта към колекцията, можете да поставите URL адреса на рецептата и предоставената уеб страница ще бъде анализирана и изтеглена в папка, която посочите в настройките на приложението.",
|
||||
|
@ -56,6 +63,7 @@
|
|||
"Could not set recipe update interval to {interval}" : "Интервалът за актуализиране на рецептата не можа да бъде зададен на {interval}",
|
||||
"Could not set recipe folder to {path}" : "Папка с рецепти не можа да се зададе на {path}",
|
||||
"Loading config failed" : "Зареждането на конфигурацията е неуспешно",
|
||||
"Enter URL or select from your Nextcloud instance on the right" : "Въведете URL адрес или изберете от вашия екземпляр на Nextcloud вдясно",
|
||||
"Pick a local image" : "Избор на локално изображение",
|
||||
"Path to your recipe image" : "Път към изображението на вашата рецепта",
|
||||
"Move entry up" : "Преместване на записа нагоре",
|
||||
|
@ -69,6 +77,9 @@
|
|||
"Description" : "Описание",
|
||||
"URL" : "URL",
|
||||
"Image" : "Изображение",
|
||||
"Preparation time (hours:minutes)" : "Време за подготовка (часове:минути)",
|
||||
"Cooking time (hours:minutes)" : "Време за готвене (часове:минути)",
|
||||
"Total time (hours:minutes)" : "Общо време (часове:минути)",
|
||||
"Choose category" : "Избор на категория",
|
||||
"Keywords" : "Ключови думи",
|
||||
"Choose keywords" : "Избор на ключови думи",
|
||||
|
@ -112,6 +123,9 @@
|
|||
"Search recipes with this keyword" : "Търсене на рецепти с тази ключова дума",
|
||||
"Date created" : "Дата на създаване",
|
||||
"Last modified" : "Последна промяна",
|
||||
"Preparation time (H:MM)" : "Време за подготовка (Ч:ММ)",
|
||||
"Cooking time (H:MM)" : "Време за готвене (Ч:ММ)",
|
||||
"Total time (H:MM)" : "Общо време (Ч:ММ)",
|
||||
"Serving Size" : "Размер на порция",
|
||||
"Energy" : "Енергия",
|
||||
"Sugar" : "Захар",
|
||||
|
|
|
@ -6,6 +6,7 @@ OC.L10N.register(
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Nedaří se zpracovat ne-POST znakovou sadu z více částí. Toto je chyba.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Nezjištěn typ přenášených dat. Toto je chyba, prosíme, nahlašte ji.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Nalezen neplatný řetězec v URL. Prosím nahlaste chybu.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Uživatel není přihlášený. Není proto možné získat žádná nastavení pro něho.",
|
||||
"Recipes" : "Recepty",
|
||||
"in %s" : "v %s",
|
||||
"Another recipe with that name already exists" : "Pod tímto názvem už existuje jiný recept",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Nedaří se zpracovat ne-POST znakovou sadu z více částí. Toto je chyba.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Nezjištěn typ přenášených dat. Toto je chyba, prosíme, nahlašte ji.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Nalezen neplatný řetězec v URL. Prosím nahlaste chybu.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Uživatel není přihlášený. Není proto možné získat žádná nastavení pro něho.",
|
||||
"Recipes" : "Recepty",
|
||||
"in %s" : "v %s",
|
||||
"Another recipe with that name already exists" : "Pod tímto názvem už existuje jiný recept",
|
||||
|
|
|
@ -6,6 +6,7 @@ OC.L10N.register(
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Multipart-Kodierung von Nicht-POST kann nicht geparst werden. Dies ist ein Fehler.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Kann den Typ der übertragenen Daten nicht erkennen. Dies ist ein Fehler, bitte melde diesen.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Ungültige URL-codierte Zeichenfolge gefunden. Bitte melde den Fehler.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Es ist kein Benutzer angemeldet. Die benutzerspezifische Konfiguartion kann nicht geladen werden.",
|
||||
"Recipes" : "Rezepte",
|
||||
"in %s" : "in %s",
|
||||
"Another recipe with that name already exists" : "Ein Rezept mit diesem Namen existiert bereits",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Multipart-Kodierung von Nicht-POST kann nicht geparst werden. Dies ist ein Fehler.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Kann den Typ der übertragenen Daten nicht erkennen. Dies ist ein Fehler, bitte melde diesen.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Ungültige URL-codierte Zeichenfolge gefunden. Bitte melde den Fehler.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Es ist kein Benutzer angemeldet. Die benutzerspezifische Konfiguartion kann nicht geladen werden.",
|
||||
"Recipes" : "Rezepte",
|
||||
"in %s" : "in %s",
|
||||
"Another recipe with that name already exists" : "Ein Rezept mit diesem Namen existiert bereits",
|
||||
|
|
|
@ -6,6 +6,7 @@ OC.L10N.register(
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Multipart-Kodierung von Nicht-POST kann nicht geparst werden. Dies ist ein Fehler.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Kann den Typ der übertragenen Daten nicht erkennen. Dies ist ein Fehler, bitte melden Sie diesen.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Ungültige URL-kodierte Zeichenfolge gefunden. Bitte melden Sie den Fehler.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Der Benutzer ist nicht angemeldet. Es kann keine Benutzerkonfiguration abgerufen werden.",
|
||||
"Recipes" : "Rezepte",
|
||||
"in %s" : "in %s",
|
||||
"Another recipe with that name already exists" : "Ein Rezept mit diesem Namen existiert bereits",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Multipart-Kodierung von Nicht-POST kann nicht geparst werden. Dies ist ein Fehler.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Kann den Typ der übertragenen Daten nicht erkennen. Dies ist ein Fehler, bitte melden Sie diesen.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Ungültige URL-kodierte Zeichenfolge gefunden. Bitte melden Sie den Fehler.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Der Benutzer ist nicht angemeldet. Es kann keine Benutzerkonfiguration abgerufen werden.",
|
||||
"Recipes" : "Rezepte",
|
||||
"in %s" : "in %s",
|
||||
"Another recipe with that name already exists" : "Ein Rezept mit diesem Namen existiert bereits",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
OC.L10N.register(
|
||||
"cookbook",
|
||||
{
|
||||
"The recipe has already an image file. Cannot create a new one." : "La receta ya tiene un archivo de imagen. No se puede crear una nueva.",
|
||||
"There is no primary image for the recipe present." : "No hay imagen primaria para la presente recete.",
|
||||
"Cannot parse non-POST multipart encoding. This is a bug." : "No se puede analizar la codificación multiparte que no es POST. Esto es un error.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "No se pudo detectar el tipo de datos transmitidos. Esto es un error, por favor informe de esto.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Se ha encontrado una cadena no válida de codificación URL. Por favor, informe de este error.",
|
||||
|
@ -8,6 +10,10 @@ OC.L10N.register(
|
|||
"in %s" : "en %s",
|
||||
"Another recipe with that name already exists" : "Ya existe otra receta con ese nombre",
|
||||
"User cannot create recipe folder" : "El usuario no puede crear la carpeta de recetas",
|
||||
"Recipe with ID %d not found." : "No se ha encontrado la receta con ID%d.",
|
||||
"Image size \"%s\" is not recognized." : "No se reconoce el tamaño «%s» de la imagen.",
|
||||
"The full-sized image is no thumbnail." : "La imagen de tamaño completo no es una vista previa.",
|
||||
"The thumbnail type %d is not known." : "No se conoce el tipo de vista previa %d. ",
|
||||
"Cookbook" : "Recetario",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Recetario que utiliza archivos JSON para recetas según el estándar schema.org",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Una biblioteca para todas tus recetas. Utiliza archivos en formato JSON, según el estándar schema.org. Para añadir una receta a la colección puedes copiar y pegar el URL de la receta, de manera que la página web es analizada y descargada en la carpeta especificada en la configuración de la aplicación.",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ "translations": {
|
||||
"The recipe has already an image file. Cannot create a new one." : "La receta ya tiene un archivo de imagen. No se puede crear una nueva.",
|
||||
"There is no primary image for the recipe present." : "No hay imagen primaria para la presente recete.",
|
||||
"Cannot parse non-POST multipart encoding. This is a bug." : "No se puede analizar la codificación multiparte que no es POST. Esto es un error.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "No se pudo detectar el tipo de datos transmitidos. Esto es un error, por favor informe de esto.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Se ha encontrado una cadena no válida de codificación URL. Por favor, informe de este error.",
|
||||
|
@ -6,6 +8,10 @@
|
|||
"in %s" : "en %s",
|
||||
"Another recipe with that name already exists" : "Ya existe otra receta con ese nombre",
|
||||
"User cannot create recipe folder" : "El usuario no puede crear la carpeta de recetas",
|
||||
"Recipe with ID %d not found." : "No se ha encontrado la receta con ID%d.",
|
||||
"Image size \"%s\" is not recognized." : "No se reconoce el tamaño «%s» de la imagen.",
|
||||
"The full-sized image is no thumbnail." : "La imagen de tamaño completo no es una vista previa.",
|
||||
"The thumbnail type %d is not known." : "No se conoce el tipo de vista previa %d. ",
|
||||
"Cookbook" : "Recetario",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Recetario que utiliza archivos JSON para recetas según el estándar schema.org",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Una biblioteca para todas tus recetas. Utiliza archivos en formato JSON, según el estándar schema.org. Para añadir una receta a la colección puedes copiar y pegar el URL de la receta, de manera que la página web es analizada y descargada en la carpeta especificada en la configuración de la aplicación.",
|
||||
|
|
16
l10n/fi.js
16
l10n/fi.js
|
@ -1,12 +1,18 @@
|
|||
OC.L10N.register(
|
||||
"cookbook",
|
||||
{
|
||||
"The recipe has already an image file. Cannot create a new one." : "Reseptillä on jo kuva, ei voida luoda uutta.",
|
||||
"There is no primary image for the recipe present." : "Reseptille ei ole ensisijaista kuvaa.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Siirretyn datan tyyppiä ei voitu tunnistaa. Raportoi tästä bugista.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Virheellinen URL-merkkijono. Raportoi tästä bugista.",
|
||||
"Recipes" : "Reseptit",
|
||||
"in %s" : "luokassa %s",
|
||||
"Another recipe with that name already exists" : "Samanniminen resepti on jo olemassa",
|
||||
"User cannot create recipe folder" : "Käyttäjä ei voi luoda reseptikansiota",
|
||||
"Recipe with ID %d not found." : "Reseptiä ei löytynyt ID:llä %d.",
|
||||
"Image size \"%s\" is not recognized." : "Kuvan kokoa \"%s\" ei ole tunnistettu.",
|
||||
"The full-sized image is no thumbnail." : "Täysikokoinen kuva ei ole pienoiskuva.",
|
||||
"The thumbnail type %d is not known." : "Tuntematon pienoiskuvan tyyppi %d.",
|
||||
"Cookbook" : "Keittokirja",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Integroitu keittokirja, joka käyttää schema.org JSON-tiedostoja resepteissä",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Kirjasto resepteillesi käyttäen JSON-tiedostoja schema.orgin reseptiformaatilla. Lisätäksesi reseptin kokoelmaan voit liittää reseptin URL-osoitteen ja verkkosivu käsitellään ja ladataan sovelluksen asetuksissa määrittämääsi hakemistoon.",
|
||||
|
@ -56,6 +62,7 @@ OC.L10N.register(
|
|||
"Could not set recipe update interval to {interval}" : "Reseptin päivitysvälin määrittäminen arvoon {interval} epäonnistui",
|
||||
"Could not set recipe folder to {path}" : "Reseptihakemistoa ei voitu määrittää kohteeseen {path}",
|
||||
"Loading config failed" : "Asetusten lataus epäonnistui",
|
||||
"Enter URL or select from your Nextcloud instance on the right" : "Syötä URL tai valitse käyttämäsi Nextcloud oikealta",
|
||||
"Pick a local image" : "Valitse paikallinen kuva",
|
||||
"Path to your recipe image" : "Reseptin kuvan sijainti",
|
||||
"Move entry up" : "Siirrä ylöspäin",
|
||||
|
@ -69,6 +76,9 @@ OC.L10N.register(
|
|||
"Description" : "Kuvaus",
|
||||
"URL" : "URL-osoite",
|
||||
"Image" : "Kuva",
|
||||
"Preparation time (hours:minutes)" : "Esivalmistelujen kesto (tunnit:minuutit)",
|
||||
"Cooking time (hours:minutes)" : "Valmistuksen kesto (tunnit:minuutit)",
|
||||
"Total time (hours:minutes)" : "Kokonaiskesto (tunnit:minuutit)",
|
||||
"Choose category" : "Valitse luokka",
|
||||
"Keywords" : "Avainsanat",
|
||||
"Choose keywords" : "Valitse avainsanat",
|
||||
|
@ -103,12 +113,18 @@ OC.L10N.register(
|
|||
"Select order" : "Valitse järjestys",
|
||||
"Creation date" : "Luontipäivämäärä",
|
||||
"Modification date" : "Muokkauspäivämäärä",
|
||||
"Toggle keyword" : "Ota avainsana käyttöön tai pois käytöstä",
|
||||
"Keyword not contained in visible recipes" : "Näkyvillä olevat reseptit eivät sisällä tätä avainsanaa",
|
||||
"Toggle keyword area size" : "Vaihda avainsanapalkin kokoa",
|
||||
"Order keywords by number of recipes" : "Järjestä avainsanat reseptien lukumäärän mukaan",
|
||||
"Order keywords alphabetically" : "Järjestä avainsanat aakkosten mukaan",
|
||||
"Cooking time is up!" : "Valmistusaika päättyi!",
|
||||
"Search recipes with this keyword" : "Etsi reseptejä avainsanalla",
|
||||
"Date created" : "Luotu",
|
||||
"Last modified" : "Viimeksi muokattu",
|
||||
"Preparation time (H:MM)" : "Esivalmistelujen kestoo (H:MM)",
|
||||
"Cooking time (H:MM)" : "Valmistuksen kesto (H:MM)",
|
||||
"Total time (H:MM)" : "Kokonaiskesto (H:MM)",
|
||||
"Serving Size" : "Annoksia",
|
||||
"Energy" : "Energia",
|
||||
"Sugar" : "Sokeri",
|
||||
|
|
16
l10n/fi.json
16
l10n/fi.json
|
@ -1,10 +1,16 @@
|
|||
{ "translations": {
|
||||
"The recipe has already an image file. Cannot create a new one." : "Reseptillä on jo kuva, ei voida luoda uutta.",
|
||||
"There is no primary image for the recipe present." : "Reseptille ei ole ensisijaista kuvaa.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Siirretyn datan tyyppiä ei voitu tunnistaa. Raportoi tästä bugista.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Virheellinen URL-merkkijono. Raportoi tästä bugista.",
|
||||
"Recipes" : "Reseptit",
|
||||
"in %s" : "luokassa %s",
|
||||
"Another recipe with that name already exists" : "Samanniminen resepti on jo olemassa",
|
||||
"User cannot create recipe folder" : "Käyttäjä ei voi luoda reseptikansiota",
|
||||
"Recipe with ID %d not found." : "Reseptiä ei löytynyt ID:llä %d.",
|
||||
"Image size \"%s\" is not recognized." : "Kuvan kokoa \"%s\" ei ole tunnistettu.",
|
||||
"The full-sized image is no thumbnail." : "Täysikokoinen kuva ei ole pienoiskuva.",
|
||||
"The thumbnail type %d is not known." : "Tuntematon pienoiskuvan tyyppi %d.",
|
||||
"Cookbook" : "Keittokirja",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Integroitu keittokirja, joka käyttää schema.org JSON-tiedostoja resepteissä",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Kirjasto resepteillesi käyttäen JSON-tiedostoja schema.orgin reseptiformaatilla. Lisätäksesi reseptin kokoelmaan voit liittää reseptin URL-osoitteen ja verkkosivu käsitellään ja ladataan sovelluksen asetuksissa määrittämääsi hakemistoon.",
|
||||
|
@ -54,6 +60,7 @@
|
|||
"Could not set recipe update interval to {interval}" : "Reseptin päivitysvälin määrittäminen arvoon {interval} epäonnistui",
|
||||
"Could not set recipe folder to {path}" : "Reseptihakemistoa ei voitu määrittää kohteeseen {path}",
|
||||
"Loading config failed" : "Asetusten lataus epäonnistui",
|
||||
"Enter URL or select from your Nextcloud instance on the right" : "Syötä URL tai valitse käyttämäsi Nextcloud oikealta",
|
||||
"Pick a local image" : "Valitse paikallinen kuva",
|
||||
"Path to your recipe image" : "Reseptin kuvan sijainti",
|
||||
"Move entry up" : "Siirrä ylöspäin",
|
||||
|
@ -67,6 +74,9 @@
|
|||
"Description" : "Kuvaus",
|
||||
"URL" : "URL-osoite",
|
||||
"Image" : "Kuva",
|
||||
"Preparation time (hours:minutes)" : "Esivalmistelujen kesto (tunnit:minuutit)",
|
||||
"Cooking time (hours:minutes)" : "Valmistuksen kesto (tunnit:minuutit)",
|
||||
"Total time (hours:minutes)" : "Kokonaiskesto (tunnit:minuutit)",
|
||||
"Choose category" : "Valitse luokka",
|
||||
"Keywords" : "Avainsanat",
|
||||
"Choose keywords" : "Valitse avainsanat",
|
||||
|
@ -101,12 +111,18 @@
|
|||
"Select order" : "Valitse järjestys",
|
||||
"Creation date" : "Luontipäivämäärä",
|
||||
"Modification date" : "Muokkauspäivämäärä",
|
||||
"Toggle keyword" : "Ota avainsana käyttöön tai pois käytöstä",
|
||||
"Keyword not contained in visible recipes" : "Näkyvillä olevat reseptit eivät sisällä tätä avainsanaa",
|
||||
"Toggle keyword area size" : "Vaihda avainsanapalkin kokoa",
|
||||
"Order keywords by number of recipes" : "Järjestä avainsanat reseptien lukumäärän mukaan",
|
||||
"Order keywords alphabetically" : "Järjestä avainsanat aakkosten mukaan",
|
||||
"Cooking time is up!" : "Valmistusaika päättyi!",
|
||||
"Search recipes with this keyword" : "Etsi reseptejä avainsanalla",
|
||||
"Date created" : "Luotu",
|
||||
"Last modified" : "Viimeksi muokattu",
|
||||
"Preparation time (H:MM)" : "Esivalmistelujen kestoo (H:MM)",
|
||||
"Cooking time (H:MM)" : "Valmistuksen kesto (H:MM)",
|
||||
"Total time (H:MM)" : "Kokonaiskesto (H:MM)",
|
||||
"Serving Size" : "Annoksia",
|
||||
"Energy" : "Energia",
|
||||
"Sugar" : "Sokeri",
|
||||
|
|
|
@ -6,6 +6,7 @@ OC.L10N.register(
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Nem elemezhető a nem POST többrészes kódolás. Ez egy hiba.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Az átadott adatok típusa nem érzékelhető. Ez egy hiba, kérjük, jelezze.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Érvénytelen URL-kódolású karakterlánc található. Jelentse be a hibát.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "A felhasználó nincs bejelentkezve. Nem szerezhetők meg a felhasználói beállítások.",
|
||||
"Recipes" : "Receptek",
|
||||
"in %s" : "itt: %s",
|
||||
"Another recipe with that name already exists" : "Ezzel a névvel már létezik egy másik recept",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Nem elemezhető a nem POST többrészes kódolás. Ez egy hiba.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Az átadott adatok típusa nem érzékelhető. Ez egy hiba, kérjük, jelezze.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Érvénytelen URL-kódolású karakterlánc található. Jelentse be a hibát.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "A felhasználó nincs bejelentkezve. Nem szerezhetők meg a felhasználói beállítások.",
|
||||
"Recipes" : "Receptek",
|
||||
"in %s" : "itt: %s",
|
||||
"Another recipe with that name already exists" : "Ezzel a névvel már létezik egy másik recept",
|
||||
|
|
|
@ -6,6 +6,7 @@ OC.L10N.register(
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Nie można przeanalizować kodowania wieloczęściowego innego niż POST. To jest błąd.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Nie można wykryć rodzaju przesyłanych danych. To jest błąd, zgłoś go.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Znaleziono nieprawidłowy ciąg zakodowany w adresie URL. Zgłoś ten błąd.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Użytkownik nie jest zalogowany. Nie można uzyskać konfiguracji użytkownika.",
|
||||
"Recipes" : "Przepisy",
|
||||
"in %s" : "w %s",
|
||||
"Another recipe with that name already exists" : "Istnieje już inny przepis o tej nazwie",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "Nie można przeanalizować kodowania wieloczęściowego innego niż POST. To jest błąd.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Nie można wykryć rodzaju przesyłanych danych. To jest błąd, zgłoś go.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Znaleziono nieprawidłowy ciąg zakodowany w adresie URL. Zgłoś ten błąd.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Użytkownik nie jest zalogowany. Nie można uzyskać konfiguracji użytkownika.",
|
||||
"Recipes" : "Przepisy",
|
||||
"in %s" : "w %s",
|
||||
"Another recipe with that name already exists" : "Istnieje już inny przepis o tej nazwie",
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
OC.L10N.register(
|
||||
"cookbook",
|
||||
{
|
||||
"The recipe has already an image file. Cannot create a new one." : "A receita já tem um arquivo de imagem. Não é possível criar um novo.",
|
||||
"There is no primary image for the recipe present." : "Não há imagem primária para a receita presente.",
|
||||
"Cannot parse non-POST multipart encoding. This is a bug." : "Não é possível analisar a codificação non-POST multipart. Isso é um bug.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Não é possível detectar o tipo dos dados transmitidos. Isso é um erro, por favor, informe-o.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "String codificada por URL inválida encontrada. Por favor, comunique o erro.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "O usuário não está conectado. Nenhuma configuração de usuário pode ser obtida.",
|
||||
"Recipes" : "Receitas",
|
||||
"in %s" : "em %s",
|
||||
"Another recipe with that name already exists" : "Já existe outra receita com esse nome ",
|
||||
"User cannot create recipe folder" : "O usuário não pode criar uma pasta de receitas",
|
||||
"Recipe with ID %d not found." : "Receita com ID %d não encontrada.",
|
||||
"Image size \"%s\" is not recognized." : "Tamanho da imagem \"%s\" não é reconhecido.",
|
||||
"The full-sized image is no thumbnail." : "A imagem em tamanho real não é miniatura.",
|
||||
"The thumbnail type %d is not known." : "O tipo de miniatura %d não é conhecido.",
|
||||
"Cookbook" : "Livro de Receitas",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Um livro de receitas integrado usando arquivos JSON do schema.org como receitas",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Uma biblioteca para todas as suas receitas. Ela usa arquivos JSON seguindo o formato da receita do schema.org. Para adicionar uma receita à coleção, você pode colar a URL da receita. A página da web será analisada e baixada para a pasta especificada nas configurações do aplicativo.",
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
{ "translations": {
|
||||
"The recipe has already an image file. Cannot create a new one." : "A receita já tem um arquivo de imagem. Não é possível criar um novo.",
|
||||
"There is no primary image for the recipe present." : "Não há imagem primária para a receita presente.",
|
||||
"Cannot parse non-POST multipart encoding. This is a bug." : "Não é possível analisar a codificação non-POST multipart. Isso é um bug.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Não é possível detectar o tipo dos dados transmitidos. Isso é um erro, por favor, informe-o.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "String codificada por URL inválida encontrada. Por favor, comunique o erro.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "O usuário não está conectado. Nenhuma configuração de usuário pode ser obtida.",
|
||||
"Recipes" : "Receitas",
|
||||
"in %s" : "em %s",
|
||||
"Another recipe with that name already exists" : "Já existe outra receita com esse nome ",
|
||||
"User cannot create recipe folder" : "O usuário não pode criar uma pasta de receitas",
|
||||
"Recipe with ID %d not found." : "Receita com ID %d não encontrada.",
|
||||
"Image size \"%s\" is not recognized." : "Tamanho da imagem \"%s\" não é reconhecido.",
|
||||
"The full-sized image is no thumbnail." : "A imagem em tamanho real não é miniatura.",
|
||||
"The thumbnail type %d is not known." : "O tipo de miniatura %d não é conhecido.",
|
||||
"Cookbook" : "Livro de Receitas",
|
||||
"An integrated cookbook using schema.org JSON files as recipes" : "Um livro de receitas integrado usando arquivos JSON do schema.org como receitas",
|
||||
"A library for all your recipes. It uses JSON files following the schema.org recipe format. To add a recipe to the collection, you can paste in the URL of the recipe, and the provided web page will be parsed and downloaded to whichever folder you specify in the app settings." : "Uma biblioteca para todas as suas receitas. Ela usa arquivos JSON seguindo o formato da receita do schema.org. Para adicionar uma receita à coleção, você pode colar a URL da receita. A página da web será analisada e baixada para a pasta especificada nas configurações do aplicativo.",
|
||||
|
|
|
@ -6,6 +6,7 @@ OC.L10N.register(
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "POST olmayan çok parçalı kodlama işlenemedi. Bu bir hata olmalı. Lütfen bize bildirin.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Aktarılan verinin türü algılanamadı. Bu bir hata olmalı. Lütfen bize bildirin.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Adres kodlamalı dizge bulundu. Lütfen bize hata olarak bildirin.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Kullanıcı oturum açmamış. Hehrangi bir kullanıcı yapılandırması alınamadı.",
|
||||
"Recipes" : "Tarifler",
|
||||
"in %s" : "%s içinde",
|
||||
"Another recipe with that name already exists" : "Aynı adlı bir yemek tarifi zaten var",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "POST olmayan çok parçalı kodlama işlenemedi. Bu bir hata olmalı. Lütfen bize bildirin.",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "Aktarılan verinin türü algılanamadı. Bu bir hata olmalı. Lütfen bize bildirin.",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "Adres kodlamalı dizge bulundu. Lütfen bize hata olarak bildirin.",
|
||||
"The user is not logged in. No user configuration can be obtained." : "Kullanıcı oturum açmamış. Hehrangi bir kullanıcı yapılandırması alınamadı.",
|
||||
"Recipes" : "Tarifler",
|
||||
"in %s" : "%s içinde",
|
||||
"Another recipe with that name already exists" : "Aynı adlı bir yemek tarifi zaten var",
|
||||
|
|
|
@ -6,6 +6,7 @@ OC.L10N.register(
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "無法解析非 post 多部分編碼。這是一個 bug。",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "無法檢測傳輸數據類型。這是一個 bug。請報告它。",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "找到了無效的 URL 編碼的字符串。請報告一個 bug。",
|
||||
"The user is not logged in. No user configuration can be obtained." : "用戶未登錄,無法獲取用戶配置。",
|
||||
"Recipes" : "食譜",
|
||||
"in %s" : "在 %s",
|
||||
"Another recipe with that name already exists" : "另一個同名的食譜已經存在",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"Cannot parse non-POST multipart encoding. This is a bug." : "無法解析非 post 多部分編碼。這是一個 bug。",
|
||||
"Cannot detect type of transmitted data. This is a bug, please report it." : "無法檢測傳輸數據類型。這是一個 bug。請報告它。",
|
||||
"Invalid URL-encoded string found. Please report a bug." : "找到了無效的 URL 編碼的字符串。請報告一個 bug。",
|
||||
"The user is not logged in. No user configuration can be obtained." : "用戶未登錄,無法獲取用戶配置。",
|
||||
"Recipes" : "食譜",
|
||||
"in %s" : "在 %s",
|
||||
"Another recipe with that name already exists" : "另一個同名的食譜已經存在",
|
||||
|
|
|
@ -14,6 +14,7 @@ use OCA\Cookbook\Service\DbCacheService;
|
|||
use OCA\Cookbook\Helper\RestParameterParser;
|
||||
use OCA\Cookbook\Exception\UserFolderNotWritableException;
|
||||
use OCA\Cookbook\Exception\RecipeExistsException;
|
||||
use OCA\Cookbook\Exception\UserNotLoggedInException;
|
||||
use OCP\AppFramework\Http\JSONResponse;
|
||||
|
||||
class MainController extends Controller {
|
||||
|
@ -52,6 +53,7 @@ class MainController extends Controller {
|
|||
*
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @throws UserNotLoggedInException never
|
||||
*/
|
||||
public function index(): TemplateResponse {
|
||||
try {
|
||||
|
@ -61,6 +63,11 @@ class MainController extends Controller {
|
|||
Util::addScript('cookbook', 'nextcloud-cookbook-guest');
|
||||
return new TemplateResponse($this->appName, 'invalid_guest');
|
||||
}
|
||||
/*
|
||||
* The UserNotLoggedInException will not be caught here. It should never happen as the middleware of NC
|
||||
* will prevent the controller to be called. If this does not happen for some reason, let the exception be
|
||||
* thrown and the user most probably has found a bug. A stack trace might help there.
|
||||
*/
|
||||
|
||||
$this->dbCacheService->triggerCheck();
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace OCA\Cookbook\Exception;
|
||||
|
||||
class UserNotLoggedInException extends \Exception {
|
||||
public function __construct($message = null, $code = null, $previous = null) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
namespace OCA\Cookbook\Helper;
|
||||
|
||||
use OCA\Cookbook\AppInfo\Application;
|
||||
use OCA\Cookbook\Exception\UserNotLoggedInException;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
|
||||
|
@ -11,7 +12,7 @@ use OCP\IL10N;
|
|||
*/
|
||||
class UserConfigHelper {
|
||||
/**
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
private $userId;
|
||||
|
||||
|
@ -26,7 +27,7 @@ class UserConfigHelper {
|
|||
private $l;
|
||||
|
||||
public function __construct(
|
||||
string $UserId,
|
||||
?string $UserId,
|
||||
IConfig $config,
|
||||
IL10N $l
|
||||
) {
|
||||
|
@ -40,13 +41,27 @@ class UserConfigHelper {
|
|||
protected const KEY_PRINT_IMAGE = 'print_image';
|
||||
protected const KEY_FOLDER = 'folder';
|
||||
|
||||
/**
|
||||
* Checks if the user is logged in and the configuration can be obtained at all
|
||||
*
|
||||
* @return void
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
private function ensureUserIsLoggedIn(): void {
|
||||
if (is_null($this->userId)) {
|
||||
throw new UserNotLoggedInException($this->l->t('The user is not logged in. No user configuration can be obtained.'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a config value from the database
|
||||
*
|
||||
* @param string $key The key to get
|
||||
* @return string The resulting value or '' if the key was not found
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
private function getRawValue(string $key): string {
|
||||
$this->ensureUserIsLoggedIn();
|
||||
return $this->config->getUserValue($this->userId, Application::APP_ID, $key);
|
||||
}
|
||||
|
||||
|
@ -56,8 +71,10 @@ class UserConfigHelper {
|
|||
* @param string $key The key of the configuration
|
||||
* @param string $value The value of the config entry
|
||||
* @return void
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
private function setRawValue(string $key, string $value): void {
|
||||
$this->ensureUserIsLoggedIn();
|
||||
$this->config->setUserValue($this->userId, Application::APP_ID, $key, $value);
|
||||
}
|
||||
|
||||
|
@ -65,6 +82,7 @@ class UserConfigHelper {
|
|||
* Get the timestamp of the last rescan of the library
|
||||
*
|
||||
* @return integer The timestamp of the last index rebuild
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function getLastIndexUpdate(): int {
|
||||
$rawValue = $this->getRawValue(self::KEY_LAST_INDEX_UPDATE);
|
||||
|
@ -80,6 +98,7 @@ class UserConfigHelper {
|
|||
*
|
||||
* @param integer $value The timestamp of the last index rebuild
|
||||
* @return void
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function setLastIndexUpdate(int $value): void {
|
||||
$this->setRawValue(self::KEY_LAST_INDEX_UPDATE, strval($value));
|
||||
|
@ -89,6 +108,7 @@ class UserConfigHelper {
|
|||
* Get the number of seconds between rescans of the library
|
||||
*
|
||||
* @return integer The number of seconds to wait before a new rescan is triggered
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function getUpdateInterval(): int {
|
||||
$rawValue = $this->getRawValue(self::KEY_UPDATE_INTERVAL);
|
||||
|
@ -104,6 +124,7 @@ class UserConfigHelper {
|
|||
*
|
||||
* @param integer $value The number of seconds to wait at least between rescans
|
||||
* @return void
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function setUpdateInterval(int $value): void {
|
||||
$this->setRawValue(self::KEY_UPDATE_INTERVAL, $value);
|
||||
|
@ -113,6 +134,7 @@ class UserConfigHelper {
|
|||
* Check if the primary imgae should be printed or not
|
||||
*
|
||||
* @return boolean true, if the image should be printed
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function getPrintImage(): bool {
|
||||
$rawValue = $this->getRawValue(self::KEY_PRINT_IMAGE);
|
||||
|
@ -127,6 +149,7 @@ class UserConfigHelper {
|
|||
*
|
||||
* @param boolean $value true if the image should be printed
|
||||
* @return void
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function setPrintImage(bool $value): void {
|
||||
if ($value) {
|
||||
|
@ -142,6 +165,7 @@ class UserConfigHelper {
|
|||
* If no folder is stored in the config yet, a default setting will be generated and saved.
|
||||
*
|
||||
* @return string The name of the folder within the users files
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function getFolderName(): string {
|
||||
$rawValue = $this->getRawValue(self::KEY_FOLDER);
|
||||
|
@ -160,6 +184,7 @@ class UserConfigHelper {
|
|||
*
|
||||
* @param string $value The name of the folder within the user's files
|
||||
* @return void
|
||||
* @throws UserNotLoggedInException if no user is logged in
|
||||
*/
|
||||
public function setFolderName(string $value): void {
|
||||
$this->setRawValue(self::KEY_FOLDER, $value);
|
||||
|
|
|
@ -15,6 +15,7 @@ use OCP\PreConditionNotMetException;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use OCA\Cookbook\Exception\UserFolderNotWritableException;
|
||||
use OCA\Cookbook\Exception\RecipeExistsException;
|
||||
use OCA\Cookbook\Exception\UserNotLoggedInException;
|
||||
use OCA\Cookbook\Helper\ImageService\ImageSize;
|
||||
use OCA\Cookbook\Helper\UserConfigHelper;
|
||||
|
||||
|
@ -1012,6 +1013,7 @@ class RecipeService {
|
|||
|
||||
/**
|
||||
* @return Folder
|
||||
* @throws UserNotLoggedInException if no user is logged in to get the path from
|
||||
*/
|
||||
public function getFolderForUser() {
|
||||
$path = '/' . $this->user_id . '/files/' . $this->getUserFolderPath();
|
||||
|
|
|
@ -1936,9 +1936,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@nextcloud/vue": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-5.1.1.tgz",
|
||||
"integrity": "sha512-BKJTCqlxRxFvUlc1H95vIoUFXUb6Bcub/VGlIccDg0upm/IKFkyDbuhj7gBUDz4j/uqmKAKffzPO2Q9JFFQ8wg==",
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-5.3.1.tgz",
|
||||
"integrity": "sha512-f+OSbcS01s2UqYiLSUufJ8tGe5+SqALj1dysPGJm8pJ+R2zH+Pdl8R13YErwzdAa0nHwyISIp9L9MEOUItixRQ==",
|
||||
"dependencies": {
|
||||
"@nextcloud/auth": "^1.2.3",
|
||||
"@nextcloud/axios": "^1.3.2",
|
||||
|
@ -1959,7 +1959,7 @@
|
|||
"splitpanes": "^2.3.6",
|
||||
"string-length": "^5.0.0",
|
||||
"striptags": "^3.1.1",
|
||||
"style-loader": "^2.0.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"tributejs": "^5.1.3",
|
||||
"v-click-outside": "^3.0.1",
|
||||
"v-tooltip": "^2.0.3",
|
||||
|
@ -1967,7 +1967,6 @@
|
|||
"vue-color": "^2.7.1",
|
||||
"vue-material-design-icons": "^5.0.0",
|
||||
"vue-multiselect": "^2.1.6",
|
||||
"vue-visible": "^1.0.2",
|
||||
"vue2-datepicker": "^3.6.3"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -1985,36 +1984,6 @@
|
|||
"semver": "^7.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@nextcloud/vue/node_modules/loader-utils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
|
||||
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
|
||||
"dependencies": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nextcloud/vue/node_modules/schema-utils": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/webpack"
|
||||
}
|
||||
},
|
||||
"node_modules/@nextcloud/vue/node_modules/semver": {
|
||||
"version": "7.3.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||
|
@ -2029,25 +1998,6 @@
|
|||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@nextcloud/vue/node_modules/style-loader": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz",
|
||||
"integrity": "sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==",
|
||||
"dependencies": {
|
||||
"loader-utils": "^2.0.0",
|
||||
"schema-utils": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/webpack"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"webpack": "^4.0.0 || ^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@nextcloud/webpack-vue-config": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/webpack-vue-config/-/webpack-vue-config-5.0.0.tgz",
|
||||
|
@ -3420,6 +3370,7 @@
|
|||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
|
@ -4944,6 +4895,7 @@
|
|||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
|
@ -5187,9 +5139,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.12.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz",
|
||||
"integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==",
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz",
|
||||
"integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint/eslintrc": "^1.2.1",
|
||||
|
@ -5311,9 +5263,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-import": {
|
||||
"version": "2.25.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz",
|
||||
"integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==",
|
||||
"version": "2.26.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz",
|
||||
"integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array-includes": "^3.1.4",
|
||||
|
@ -5321,14 +5273,14 @@
|
|||
"debug": "^2.6.9",
|
||||
"doctrine": "^2.1.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
"eslint-module-utils": "^2.7.2",
|
||||
"eslint-module-utils": "^2.7.3",
|
||||
"has": "^1.0.3",
|
||||
"is-core-module": "^2.8.0",
|
||||
"is-core-module": "^2.8.1",
|
||||
"is-glob": "^4.0.3",
|
||||
"minimatch": "^3.0.4",
|
||||
"minimatch": "^3.1.2",
|
||||
"object.values": "^1.1.5",
|
||||
"resolve": "^1.20.0",
|
||||
"tsconfig-paths": "^3.12.0"
|
||||
"resolve": "^1.22.0",
|
||||
"tsconfig-paths": "^3.14.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
|
@ -5365,9 +5317,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/eslint-plugin-vue": {
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz",
|
||||
"integrity": "sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ==",
|
||||
"version": "8.6.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.6.0.tgz",
|
||||
"integrity": "sha512-abXiF2J18n/7ZPy9foSlJyouKf54IqpKlNvNmzhM93N0zs3QUxZG/oBd3tVPOJTKg7SlhBUtPxugpqzNbgGpQQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"eslint-utils": "^3.0.0",
|
||||
|
@ -9609,9 +9561,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.1.tgz",
|
||||
"integrity": "sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz",
|
||||
"integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
|
@ -11356,8 +11308,6 @@
|
|||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 12.13.0"
|
||||
},
|
||||
|
@ -12148,14 +12098,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/tsconfig-paths": {
|
||||
"version": "3.13.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.13.0.tgz",
|
||||
"integrity": "sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw==",
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
|
||||
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json5": "^0.0.29",
|
||||
"json5": "^1.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"minimist": "^1.2.6",
|
||||
"strip-bom": "^3.0.0"
|
||||
}
|
||||
},
|
||||
|
@ -12656,11 +12606,6 @@
|
|||
"vue": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vue-visible": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vue-visible/-/vue-visible-1.0.2.tgz",
|
||||
"integrity": "sha512-yaX2its9XAJKGuQqf7LsiZHHSkxsIK8rmCOQOvEGEoF41blKRK8qr9my4qYoD6ikdLss4n8tKqYBecmaY0+WJg=="
|
||||
},
|
||||
"node_modules/vue2-datepicker": {
|
||||
"version": "3.10.4",
|
||||
"resolved": "https://registry.npmjs.org/vue2-datepicker/-/vue2-datepicker-3.10.4.tgz",
|
||||
|
@ -12735,9 +12680,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/webpack": {
|
||||
"version": "5.70.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz",
|
||||
"integrity": "sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==",
|
||||
"version": "5.72.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.0.tgz",
|
||||
"integrity": "sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==",
|
||||
"dependencies": {
|
||||
"@types/eslint-scope": "^3.7.3",
|
||||
"@types/estree": "^0.0.51",
|
||||
|
@ -14978,9 +14923,9 @@
|
|||
}
|
||||
},
|
||||
"@nextcloud/vue": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-5.1.1.tgz",
|
||||
"integrity": "sha512-BKJTCqlxRxFvUlc1H95vIoUFXUb6Bcub/VGlIccDg0upm/IKFkyDbuhj7gBUDz4j/uqmKAKffzPO2Q9JFFQ8wg==",
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-5.3.1.tgz",
|
||||
"integrity": "sha512-f+OSbcS01s2UqYiLSUufJ8tGe5+SqALj1dysPGJm8pJ+R2zH+Pdl8R13YErwzdAa0nHwyISIp9L9MEOUItixRQ==",
|
||||
"requires": {
|
||||
"@nextcloud/auth": "^1.2.3",
|
||||
"@nextcloud/axios": "^1.3.2",
|
||||
|
@ -15001,7 +14946,7 @@
|
|||
"splitpanes": "^2.3.6",
|
||||
"string-length": "^5.0.0",
|
||||
"striptags": "^3.1.1",
|
||||
"style-loader": "^2.0.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"tributejs": "^5.1.3",
|
||||
"v-click-outside": "^3.0.1",
|
||||
"v-tooltip": "^2.0.3",
|
||||
|
@ -15009,7 +14954,6 @@
|
|||
"vue-color": "^2.7.1",
|
||||
"vue-material-design-icons": "^5.0.0",
|
||||
"vue-multiselect": "^2.1.6",
|
||||
"vue-visible": "^1.0.2",
|
||||
"vue2-datepicker": "^3.6.3"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -15023,26 +14967,6 @@
|
|||
"semver": "^7.3.2"
|
||||
}
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
|
||||
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
|
||||
|
@ -15050,15 +14974,6 @@
|
|||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"style-loader": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz",
|
||||
"integrity": "sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==",
|
||||
"requires": {
|
||||
"loader-utils": "^2.0.0",
|
||||
"schema-utils": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -16214,7 +16129,8 @@
|
|||
"big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
|
||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
|
@ -17443,7 +17359,8 @@
|
|||
"emojis-list": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q=="
|
||||
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"encodeurl": {
|
||||
"version": "1.0.2",
|
||||
|
@ -17623,9 +17540,9 @@
|
|||
}
|
||||
},
|
||||
"eslint": {
|
||||
"version": "8.12.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.12.0.tgz",
|
||||
"integrity": "sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q==",
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.13.0.tgz",
|
||||
"integrity": "sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint/eslintrc": "^1.2.1",
|
||||
|
@ -17808,9 +17725,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-import": {
|
||||
"version": "2.25.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz",
|
||||
"integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==",
|
||||
"version": "2.26.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz",
|
||||
"integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-includes": "^3.1.4",
|
||||
|
@ -17818,14 +17735,14 @@
|
|||
"debug": "^2.6.9",
|
||||
"doctrine": "^2.1.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
"eslint-module-utils": "^2.7.2",
|
||||
"eslint-module-utils": "^2.7.3",
|
||||
"has": "^1.0.3",
|
||||
"is-core-module": "^2.8.0",
|
||||
"is-core-module": "^2.8.1",
|
||||
"is-glob": "^4.0.3",
|
||||
"minimatch": "^3.0.4",
|
||||
"minimatch": "^3.1.2",
|
||||
"object.values": "^1.1.5",
|
||||
"resolve": "^1.20.0",
|
||||
"tsconfig-paths": "^3.12.0"
|
||||
"resolve": "^1.22.0",
|
||||
"tsconfig-paths": "^3.14.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
|
@ -17855,9 +17772,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-vue": {
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz",
|
||||
"integrity": "sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ==",
|
||||
"version": "8.6.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.6.0.tgz",
|
||||
"integrity": "sha512-abXiF2J18n/7ZPy9foSlJyouKf54IqpKlNvNmzhM93N0zs3QUxZG/oBd3tVPOJTKg7SlhBUtPxugpqzNbgGpQQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eslint-utils": "^3.0.0",
|
||||
|
@ -20942,9 +20859,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.1.tgz",
|
||||
"integrity": "sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==",
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz",
|
||||
"integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==",
|
||||
"dev": true
|
||||
},
|
||||
"process": {
|
||||
|
@ -22292,8 +22209,6 @@
|
|||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
|
||||
"integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"requires": {}
|
||||
},
|
||||
"style-mod": {
|
||||
|
@ -22867,14 +22782,14 @@
|
|||
}
|
||||
},
|
||||
"tsconfig-paths": {
|
||||
"version": "3.13.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.13.0.tgz",
|
||||
"integrity": "sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw==",
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
|
||||
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json5": "^0.0.29",
|
||||
"json5": "^1.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"minimist": "^1.2.6",
|
||||
"strip-bom": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -23284,11 +23199,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"vue-visible": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vue-visible/-/vue-visible-1.0.2.tgz",
|
||||
"integrity": "sha512-yaX2its9XAJKGuQqf7LsiZHHSkxsIK8rmCOQOvEGEoF41blKRK8qr9my4qYoD6ikdLss4n8tKqYBecmaY0+WJg=="
|
||||
},
|
||||
"vue2-datepicker": {
|
||||
"version": "3.10.4",
|
||||
"resolved": "https://registry.npmjs.org/vue2-datepicker/-/vue2-datepicker-3.10.4.tgz",
|
||||
|
@ -23349,9 +23259,9 @@
|
|||
"integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="
|
||||
},
|
||||
"webpack": {
|
||||
"version": "5.70.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz",
|
||||
"integrity": "sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==",
|
||||
"version": "5.72.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.0.tgz",
|
||||
"integrity": "sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==",
|
||||
"requires": {
|
||||
"@types/eslint-scope": "^3.7.3",
|
||||
"@types/estree": "^0.0.51",
|
||||
|
|
|
@ -19,9 +19,8 @@ use OCA\Cookbook\Exception\RecipeExistsException;
|
|||
use OCA\Cookbook\Exception\UserFolderNotWritableException;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass \OCA\Cookbook\Controller\MainController
|
||||
* @covers ::<private>
|
||||
* @covers ::<protected>
|
||||
* @covers \OCA\Cookbook\Controller\MainController
|
||||
* @covers \OCA\Cookbook\Exception\UserFolderNotWritableException
|
||||
*/
|
||||
class MainControllerTest extends TestCase {
|
||||
|
||||
|
@ -59,9 +58,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->sut = new MainController('cookbook', $request, $this->recipeService, $this->dbCacheService, $this->urlGenerator, $this->restParser);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::__construct
|
||||
*/
|
||||
public function testConstructor(): void {
|
||||
$this->ensurePropertyIsCorrect('urlGenerator', $this->urlGenerator);
|
||||
$this->ensurePropertyIsCorrect('service', $this->recipeService);
|
||||
|
@ -79,9 +75,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->dbCacheService->expects($this->once())->method('triggerCheck');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::index
|
||||
*/
|
||||
public function testIndex(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
$ret = $this->sut->index();
|
||||
|
@ -89,9 +82,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertEquals('index', $ret->getTemplateName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::index
|
||||
*/
|
||||
public function testIndexInvalidUser(): void {
|
||||
$this->recipeService->method('getFolderForUser')->willThrowException(new UserFolderNotWritableException());
|
||||
$ret = $this->sut->index();
|
||||
|
@ -99,9 +89,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertEquals('invalid_guest', $ret->getTemplateName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::getApiVersion
|
||||
*/
|
||||
public function testGetAPIVersion(): void {
|
||||
$ret = $this->sut->getApiVersion();
|
||||
$this->assertEquals(200, $ret->getStatus());
|
||||
|
@ -115,9 +102,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertTrue(isset($retData['api_version']['minor']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::categories
|
||||
*/
|
||||
public function testGetCategories(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -129,9 +113,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertEquals($cat, $ret->getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::keywords
|
||||
*/
|
||||
public function testGetKeywords(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -144,7 +125,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::new
|
||||
* @dataProvider dataProviderNew
|
||||
*/
|
||||
public function testNew($data, $id): void {
|
||||
|
@ -176,7 +156,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::new
|
||||
* @dataProvider dataProviderNew
|
||||
*/
|
||||
public function testNewFailed($data, $id): void {
|
||||
|
@ -197,7 +176,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::update
|
||||
* @dataProvider dataProviderUpdate
|
||||
*/
|
||||
public function testUpdate($data, $id): void {
|
||||
|
@ -229,7 +207,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::update
|
||||
* @dataProvider dataProviderUpdate
|
||||
*/
|
||||
public function testUpdateFailed($data, $id): void {
|
||||
|
@ -249,9 +226,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertEquals($errMsg, $ret->getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::import
|
||||
*/
|
||||
public function testImportFailed(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -265,9 +239,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertEquals(400, $ret->getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::import
|
||||
*/
|
||||
public function testImport(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -292,9 +263,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertEquals($json, $ret->getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::import
|
||||
*/
|
||||
public function testImportExisting(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -320,9 +288,6 @@ class MainControllerTest extends TestCase {
|
|||
$this->assertEquals($expected, $ret->getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::import
|
||||
*/
|
||||
public function testImportOther(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -344,7 +309,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::category
|
||||
* @dataProvider dataProviderCategory
|
||||
*/
|
||||
public function testCategory($cat, $recipes): void {
|
||||
|
@ -411,9 +375,6 @@ class MainControllerTest extends TestCase {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::category
|
||||
*/
|
||||
public function testCategoryFailed(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -431,7 +392,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::tags
|
||||
* @dataProvider dataProviderTags
|
||||
*/
|
||||
public function testTags($keywords, $recipes): void {
|
||||
|
@ -485,9 +445,6 @@ class MainControllerTest extends TestCase {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::tags
|
||||
*/
|
||||
public function testTagsFailed(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -505,7 +462,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::search
|
||||
* @dataProvider dpSearch
|
||||
* @todo no implementation in controller
|
||||
*/
|
||||
|
@ -543,9 +499,6 @@ class MainControllerTest extends TestCase {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::search
|
||||
*/
|
||||
public function testSearchFailed(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
@ -563,7 +516,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::categoryUpdate
|
||||
* @dataProvider dataProviderCategoryUpdateNoName
|
||||
*/
|
||||
public function testCategoryUpdateNoName($requestParams): void {
|
||||
|
@ -586,7 +538,6 @@ class MainControllerTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @covers ::categoryUpdate
|
||||
* @dataProvider dpCategoryUpdate
|
||||
* @todo No business logic in controller
|
||||
*/
|
||||
|
@ -642,9 +593,6 @@ class MainControllerTest extends TestCase {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ::categoryUpdate
|
||||
*/
|
||||
public function testCategoryUpdateFailure(): void {
|
||||
$this->ensureCacheCheckTriggered();
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace OCA\Cookbook\tests\Unit\Helper;
|
||||
|
||||
use OCA\Cookbook\Exception\UserNotLoggedInException;
|
||||
use OCA\Cookbook\Helper\UserConfigHelper;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
|
@ -11,6 +12,7 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
/**
|
||||
* @covers \OCA\Cookbook\Helper\UserConfigHelper
|
||||
* @covers \OCA\Cookbook\Exception\UserNotLoggedInException
|
||||
*/
|
||||
class UserConfigHelperTest extends TestCase {
|
||||
/**
|
||||
|
@ -24,7 +26,7 @@ class UserConfigHelperTest extends TestCase {
|
|||
private $userId;
|
||||
|
||||
/**
|
||||
* @var MockObject
|
||||
* @var MockObject|IConfig
|
||||
*/
|
||||
private $config;
|
||||
|
||||
|
@ -144,4 +146,14 @@ class UserConfigHelperTest extends TestCase {
|
|||
|
||||
$this->assertEquals('/Recipes', $this->dut->getFolderName());
|
||||
}
|
||||
|
||||
public function testNoUser() {
|
||||
$this->dut = new UserConfigHelper(null, $this->config, $this->l);
|
||||
|
||||
$this->config->expects($this->never())->method('getUserValue');
|
||||
$this->config->expects($this->never())->method('setUserValue');
|
||||
|
||||
$this->expectException(UserNotLoggedInException::class);
|
||||
$this->dut->getFolderName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace OCA\Cookbook\Tests\Unit\Service;
|
||||
|
||||
use OCA\Cookbook\Db\RecipeDb;
|
||||
use OCA\Cookbook\Service\RecipeService;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\IL10N;
|
||||
use OCP\IConfig;
|
||||
use ReflectionClass;
|
||||
use ReflectionMethod;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
* Class ValidateDurationTest tests the validateDuration method of the recipe service.
|
||||
*
|
||||
* @package OCA\Cookbook\Tests\Unit\Service
|
||||
*/
|
||||
class ValidateDurationTest extends TestCase {
|
||||
/**
|
||||
* @var RecipeService
|
||||
*/
|
||||
private $recipeService;
|
||||
/**
|
||||
* @var ReflectionMethod
|
||||
*/
|
||||
private $reflectedValidateDurationMethod;
|
||||
|
||||
public function setUp(): void {
|
||||
$this->recipeService = new RecipeService(
|
||||
'admin',
|
||||
$this->getMockBuilder(IRootFolder::class)->disableOriginalConstructor()->getMock(),
|
||||
$this->getMockBuilder(RecipeDb::class)->disableOriginalConstructor()->getMock(),
|
||||
$this->getMockBuilder(IConfig::class)->disableOriginalConstructor()->getMock(),
|
||||
$this->getMockBuilder(IL10N::class)->disableOriginalConstructor()->getMock()
|
||||
);
|
||||
$reflectedRecipeService = new ReflectionClass(RecipeService::class);
|
||||
//$this->reflectedValidateDurationMethod = $reflectedRecipeService->getMethod('validateDuration');
|
||||
//$this->reflectedValidateDurationMethod->setAccessible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider intervalProvider
|
||||
*
|
||||
* @param string $interval
|
||||
* @param bool $expectedResult
|
||||
*/
|
||||
/*public function testValidateCorrectTimeInterval(string $interval, bool $expectedResult)
|
||||
{
|
||||
if ($expectedResult) {
|
||||
$this->assertTrue($this->reflectedValidateDurationMethod->invoke($this->recipeService, $interval));
|
||||
} else {
|
||||
$this->assertFalse($this->reflectedValidateDurationMethod->invoke($this->recipeService, $interval));
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function intervalProvider(): array {
|
||||
return [
|
||||
['P2Y4DT6H8M', true],
|
||||
['P2IY4DT6H8M', false],
|
||||
];
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче