feat: add indicator if an attachment is task cover
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2022-10-05 15:04:03 +02:00
parent a7731370a0
commit f01107fd73
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 19 additions and 2 deletions

View File

@ -35,7 +35,15 @@
:key="a.id"
@click="viewOrDownload(a)"
>
<div class="filename">{{ a.file.name }}</div>
<div class="filename">
{{ a.file.name }}
<span
v-if="task.coverImageAttachmentId === a.id"
class="is-task-cover"
>
{{ $t('task.attachment.usedAsCover') }}
</span>
</div>
<div class="info">
<p class="attachment-info-meta">
<i18n-t keypath="task.attachment.createdBy" scope="global">
@ -418,5 +426,13 @@ async function setCoverImage(attachment: IAttachment | null) {
}
}
.is-task-cover {
background: var(--primary);
color: var(--white);
padding: .25rem .35rem;
border-radius: 4px;
font-size: .75rem;
}
@include modal-transition();
</style>

View File

@ -696,7 +696,8 @@
"copyUrlTooltip": "Copy the url of this attachment for usage in text",
"setAsCover": "Make cover",
"unsetAsCover": "Remove cover",
"successfullyChangedCoverImage": "The cover image was successfully changed."
"successfullyChangedCoverImage": "The cover image was successfully changed.",
"usedAsCover": "Cover image"
},
"comment": {
"title": "Comments",