Skip to content

Commit

Permalink
fix: fix console warnings following #474
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Mar 30, 2024
1 parent 2f3c430 commit 0fabf1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/OpenFoodFactsLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a v-if="display === 'link'" :href="getOFFUrl()" target="_blank">
{{ getOFFName() }}
</a>
<v-btn v-if="display === 'button'" size="small" append-icon="mdi-open-in-new" :href="getOFFUrl()" target="_blank">
<v-btn v-else-if="display === 'button'" size="small" append-icon="mdi-open-in-new" :href="getOFFUrl()" target="_blank">
{{ getOFFName() }}
</v-btn>
</template>
Expand Down
13 changes: 6 additions & 7 deletions src/components/ProductCategoriesChip.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<template>
<v-chip v-if="productCategories.length" label size="small" density="comfortable" @click="showProductCategoriesDialog">
{{ $t('ProductCard.CategoryTotal', { count: productCategories.length }) }}
<ProductCategoriesDialog
v-if="productCategories.length && productCategoriesDialog"
:categories="productCategories"
v-model="productCategoriesDialog"
@close="productCategoriesDialog = false">
</ProductCategoriesDialog>
</v-chip>
<v-chip v-else label size="small" density="comfortable" prepend-icon="mdi-help" color="warning">
{{ $t('ProductCard.CategoriesLower') }}
<v-tooltip activator="parent" open-on-click location="top">{{ $t('ProductCard.ProductCategoriesMissing') }}</v-tooltip>
</v-chip>

<ProductCategoriesDialog
v-if="productCategories.length && productCategoriesDialog"
:categories="productCategories"
v-model="productCategoriesDialog"
@close="productCategoriesDialog = false"
></ProductCategoriesDialog>
</template>

<script>
Expand Down
13 changes: 6 additions & 7 deletions src/components/ProductLabelsChip.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<template>
<v-chip v-if="productLabels.length" label size="small" density="comfortable" @click="showProductLabelsDialog">
{{ $t('ProductCard.LabelTotal', { count: productLabels.length }) }}
<ProductLabelsDialog
v-if="productLabelsDialog"
:labels="productLabels"
v-model="productLabelsDialog"
@close="productLabelsDialog = false">
</ProductLabelsDialog>
</v-chip>
<v-chip v-else label size="small" density="comfortable"><!-- prepend-icon="mdi-help" color="warning" -->
{{ $t('ProductCard.LabelTotal', { count: 0 }) }}
</v-chip>

<ProductLabelsDialog
v-if="productLabels.length && productLabelsDialog"
:labels="productLabels"
v-model="productLabelsDialog"
@close="productLabelsDialog = false"
></ProductLabelsDialog>
</template>

<script>
Expand Down

0 comments on commit 0fabf1a

Please sign in to comment.