@@ -35,12 +35,13 @@
|
|||||||
{{ board.title }} » {{ stack.title }}
|
{{ board.title }} » {{ stack.title }}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-upper">
|
<div class="card-upper">
|
||||||
<h3 v-if="compactMode || isArchived || showArchived || !canEdit || standalone">
|
<div v-if="currentBoard.coverImages && images.length" class="imageCover">
|
||||||
{{ attachments }}
|
<div class="imageCard" :style="mimetypeForAttachment(images[0])">
|
||||||
<div class="imageCover" v-if="currentBoard.coverImages">
|
<div v-if="loading" class="emptycontent">
|
||||||
<a class="fileicon" :style="mimetypeForAttachment(attachments[0])" />
|
<div class="icon icon-loading" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-upper">
|
</div>
|
||||||
|
</div>
|
||||||
<h3 v-if="compactMode || isArchived || showArchived || !canEdit">
|
<h3 v-if="compactMode || isArchived || showArchived || !canEdit">
|
||||||
{{ card.title }}
|
{{ card.title }}
|
||||||
</h3>
|
</h3>
|
||||||
@@ -118,8 +119,13 @@ export default {
|
|||||||
return {
|
return {
|
||||||
editing: false,
|
editing: false,
|
||||||
copiedCard: null,
|
copiedCard: null,
|
||||||
|
images: null,
|
||||||
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.loadImages()
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
compactMode: state => state.compactMode,
|
compactMode: state => state.compactMode,
|
||||||
@@ -136,9 +142,6 @@ export default {
|
|||||||
stack() {
|
stack() {
|
||||||
return this.$store.getters.stackById(this?.card?.stackId)
|
return this.$store.getters.stackById(this?.card?.stackId)
|
||||||
},
|
},
|
||||||
attachments() {
|
|
||||||
return [...this.$store.getters.attachmentsByCard(this.id)].filter(attachment => attachment.deletedAt >= 0)
|
|
||||||
},
|
|
||||||
canEdit() {
|
canEdit() {
|
||||||
if (this.currentBoard) {
|
if (this.currentBoard) {
|
||||||
return !this.currentBoard.archived && this.$store.getters.canEdit
|
return !this.currentBoard.archived && this.$store.getters.canEdit
|
||||||
@@ -199,6 +202,12 @@ export default {
|
|||||||
applyLabelFilter(label) {
|
applyLabelFilter(label) {
|
||||||
this.$nextTick(() => this.$store.dispatch('toggleFilter', { tags: [label.id] }))
|
this.$nextTick(() => this.$store.dispatch('toggleFilter', { tags: [label.id] }))
|
||||||
},
|
},
|
||||||
|
async loadImages() {
|
||||||
|
this.loading = true
|
||||||
|
await this.$store.dispatch('fetchAttachments', this.id)
|
||||||
|
this.loading = false
|
||||||
|
this.images = [...this.$store.getters.attachmentsByCard(this.id)].filter(attachment => attachment.deletedAt >= 0).sort((a, b) => b.id - a.id)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -229,18 +238,12 @@ export default {
|
|||||||
&.current-card {
|
&.current-card {
|
||||||
box-shadow: 0 0 5px 1px var(--color-box-shadow);
|
box-shadow: 0 0 5px 1px var(--color-box-shadow);
|
||||||
}
|
}
|
||||||
|
.imageCard {
|
||||||
.fileicon {
|
width: 272px;
|
||||||
display: flex;
|
height: 250px;
|
||||||
width: 260px;
|
background-size: cover;
|
||||||
height: 260px;
|
border-radius: var(--border-radius-large) var(--border-radius-large) 0 0 ;
|
||||||
background-size: contain;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
border-radius: var(--border-radius-large);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-upper {
|
.card-upper {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 44px;
|
min-height: 44px;
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
<ActionCheckbox v-if="canManage"
|
<ActionCheckbox v-if="canManage"
|
||||||
:checked="board.coverImages"
|
:checked="board.coverImages"
|
||||||
@change="actionToggleCoverImages">
|
@change="actionToggleCoverImages">
|
||||||
{{ t('deck', 'Show cover images') }} {{ board.coverImages }}
|
{{ t('deck', 'Show cover images') }}
|
||||||
</ActionCheckbox>
|
</ActionCheckbox>
|
||||||
<ActionButton v-if="canManage && !isDueSubmenuActive"
|
<ActionButton v-if="canManage && !isDueSubmenuActive"
|
||||||
icon="icon-delete"
|
icon="icon-delete"
|
||||||
|
|||||||
Reference in New Issue
Block a user