Skip to content

Commit

Permalink
fix(proofs): fix some stuff after merging the proof private toggle. ref
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Mar 19, 2024
1 parent 3da8a21 commit 954190b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
},
"ProofDetails": {
"ReceiptWarning": "Receipts may contain personal information, we recommend to hide them (redact, fold...) before taking the picture.",
"PrivateWarning": "Otherwise, set the Proof Status to Private. Private proofs are only visible to you and the moderators.",
"PrivateWarning": "You can also set the receipt to Private. Private proofs will only be visible to you and to moderators.",
"Title": "Proof details",
"ProofStatus": "Proof status",
"Public": "Public",
"Private": "Private"
"Private": "Private",
"Privacy": "Privacy"
},
"Title": "Add multiple prices"
},
Expand Down
9 changes: 5 additions & 4 deletions src/views/AddPriceMultiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
<v-img :src="proofImagePreview" style="max-height:200px"></v-img>
</v-col>
</v-row>
<v-row v-if="proofType === 'RECEIPT'">
<v-row v-if="proofType === 'RECEIPT'" class="mt-0">
<v-col>
<h3 class="mb-1">Privacy</h3>
<h3 class="mb-1">{{ $t('AddPriceMultiple.ProofDetails.Privacy') }}</h3>
<p class="text-caption text-warning">
<i>{{ $t('AddPriceMultiple.ProofDetails.ReceiptWarning') }}</i>
<i>{{ $t('AddPriceMultiple.ProofDetails.PrivateWarning') }}</i>
Expand All @@ -77,8 +77,8 @@
hide-details
@change="updateIsPublicProof">
<template v-slot:label>
<v-icon start :icon="proofIsPublic ? 'mdi-lock-open-check' : 'mdi-lock-alert'" :color="proofIsPublic ? 'green' : 'red'"></v-icon>
{{ $t('AddPriceMultiple.ProofDetails.ProofStatus') }} :&nbsp;
<v-icon start size="small" :icon="proofIsPublic ? 'mdi-lock-open-check' : 'mdi-lock-alert'" :color="proofIsPublic ? 'green' : 'red'"></v-icon>
<strong>{{ $t('AddPriceMultiple.ProofDetails.ProofStatus') }}&nbsp;</strong>
<span :style="{ color: proofIsPublic ? 'green' : 'red' }">
{{ proofIsPublic ? $t('AddPriceMultiple.ProofDetails.Public') : $t('AddPriceMultiple.ProofDetails.Private') }}
</span>
Expand Down Expand Up @@ -533,6 +533,7 @@ export default {
this.proofIsPublic = selectedProof.is_public
},
getProofUrl(proof) {
return 'https://prices.openfoodfacts.org/img/0002/qU59gK8PQw.webp'
return `${import.meta.env.VITE_OPEN_PRICES_APP_URL}/img/${proof.file_path}`
},
newProof(source) {
Expand Down

0 comments on commit 954190b

Please sign in to comment.