Skip to content

Commit

Permalink
feat: add GDPR proof type (#341)
Browse files Browse the repository at this point in the history
* ProofCard: add translation for GDPR type

* Add link to wiki
  • Loading branch information
raphodn committed Feb 16, 2024
1 parent e182a5c commit 93b04a8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
17 changes: 16 additions & 1 deletion src/components/ProofFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
<div class="d-flex flex-wrap ga-1">
<v-chip label size="small" density="comfortable">
<v-icon start icon="mdi-paperclip"></v-icon>
{{ proofType }}
<span v-if="proof.type === 'GDPR_REQUEST'">
<a :href="OFF_WIKI_GDPR_REQUEST_URL" target="_blank">
{{ proofType }}
<v-icon size="x-small" icon="mdi-open-in-new"></v-icon>
</a>
</span>
<span v-if="proof.type !== 'GDPR_REQUEST'">
{{ proofType }}
</span>

</v-chip>
<PriceCountChip :count="proof.price_count" :withLabel="true"></PriceCountChip>
<RelativeDateTimeChip :dateTime="proof.created"></RelativeDateTimeChip>
Expand All @@ -13,6 +22,7 @@
<script>
import { mapStores } from 'pinia'
import { useAppStore } from '../store'
import constants from '../constants'
import PriceCountChip from '../components/PriceCountChip.vue'
import RelativeDateTimeChip from '../components/RelativeDateTimeChip.vue'
import ProofDeleteChip from '../components/ProofDeleteChip.vue'
Expand All @@ -26,6 +36,11 @@ export default {
props: {
'proof': null,
},
data() {
return {
OFF_WIKI_GDPR_REQUEST_URL: constants.OFF_WIKI_GDPR_REQUEST_URL,
}
},
computed: {
...mapStores(useAppStore),
username() {
Expand Down
3 changes: 3 additions & 0 deletions src/constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@
},
"ProofCard": {
"PRICE_TAG": "Price tag",
"RECEIPT": "Receipt"
"RECEIPT": "Receipt",
"GDPR_REQUEST": "GDPR request"
},
"ProofDeleteChip": {
"Confirmation": "Are you sure you want to delete this proof?",
Expand Down

0 comments on commit 93b04a8

Please sign in to comment.