Add option to space to enable plural name usage

* Add option to space to enable usage of plural name
  for food and unit per space

* Respect option per space to use the plural name
This commit is contained in:
Niklas Schwarz
2022-09-11 22:45:18 +02:00
parent 9994b6f9c2
commit b1ad5ef205
40 changed files with 193 additions and 83 deletions

View File

@@ -204,7 +204,7 @@
v-if="!import_multiple">
<recipe-card :recipe="recipe_json" :detailed="false"
:show_context_menu="false"
:show_context_menu="false" :use_plural="use_plural"
></recipe-card>
</b-col>
<b-col>
@@ -461,6 +461,7 @@ export default {
recent_urls: [],
source_data: '',
recipe_json: undefined,
use_plural: false,
// recipe_html: undefined,
// recipe_tree: undefined,
recipe_images: [],
@@ -490,6 +491,10 @@ export default {
this.INTEGRATIONS.forEach((int) => {
int.icon = this.getRandomFoodIcon()
})
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
})
},
methods: {
/**