feat: Implement reference resolving for cards that have a link in the title
Signed-off-by: Julius Härtl <jus@bitgrid.net> fix: Enrich on update Signed-off-by: Julius Knorr <jus@bitgrid.net> fix: Enrich on create Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
committed by
Julius Knorr
parent
46c4c7d4fd
commit
75be929077
@@ -4,7 +4,10 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div v-if="cardId && ( attachments.length > 0 )" class="card-cover">
|
||||
<div v-if="referencePreview" class="card-cover">
|
||||
<div class="image-wrapper rounded-left rounded-right" :style="{ backgroundImage: `url(${referencePreview})`}" />
|
||||
</div>
|
||||
<div v-else-if="cardId && ( attachments.length > 0 )" class="card-cover">
|
||||
<div v-for="(attachment, index) in attachments"
|
||||
:key="attachment.id"
|
||||
:class="['image-wrapper', { 'rounded-left': index === 0 }, { 'rounded-right': index === attachments.length - 1 }]"
|
||||
@@ -43,6 +46,12 @@ export default {
|
||||
attachment.extendedData.fileid ? generateUrl(`/core/preview?fileId=${attachment.extendedData.fileid}&x=${x}&y=${y}&a=1`) : null
|
||||
)
|
||||
},
|
||||
card() {
|
||||
return this.$store.getters.cardById(this.cardId)
|
||||
},
|
||||
referencePreview() {
|
||||
return this.card?.referenceData?.richObject?.thumb
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
cardId: {
|
||||
|
||||
Reference in New Issue
Block a user