feat(task): cover image for tasks #2460

Merged
konrad merged 10 commits from feature/task-cover into main 2022-10-05 13:28:13 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 054d70cbe5 - Show all commits

View File

@ -129,12 +129,12 @@ const coverImageBlobUrl = ref<string | null>(null)
async function maybeDownloadCoverImage() {
if (!props.task.coverImageAttachmentId) {
coverImageBlobUrl.value = null
return
}
const attachment = props.task.attachments.find(a => a.id === props.task.coverImageAttachmentId)
if (!attachment || !SUPPORTED_IMAGE_SUFFIX.some((suffix) => attachment.file.name.endsWith(suffix))) {
console.log('not an attachment')
return
}