Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add GDPR proof type #341

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading