feat: add indicator if an attachment is task cover
This commit is contained in:
parent
a7731370a0
commit
f01107fd73
2 changed files with 19 additions and 2 deletions
|
@ -35,7 +35,15 @@
|
||||||
:key="a.id"
|
:key="a.id"
|
||||||
@click="viewOrDownload(a)"
|
@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">
|
<div class="info">
|
||||||
<p class="attachment-info-meta">
|
<p class="attachment-info-meta">
|
||||||
<i18n-t keypath="task.attachment.createdBy" scope="global">
|
<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();
|
@include modal-transition();
|
||||||
</style>
|
</style>
|
|
@ -696,7 +696,8 @@
|
||||||
"copyUrlTooltip": "Copy the url of this attachment for usage in text",
|
"copyUrlTooltip": "Copy the url of this attachment for usage in text",
|
||||||
"setAsCover": "Make cover",
|
"setAsCover": "Make cover",
|
||||||
"unsetAsCover": "Remove cover",
|
"unsetAsCover": "Remove cover",
|
||||||
"successfullyChangedCoverImage": "The cover image was successfully changed."
|
"successfullyChangedCoverImage": "The cover image was successfully changed.",
|
||||||
|
"usedAsCover": "Cover image"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"title": "Comments",
|
"title": "Comments",
|
||||||
|
|
Loading…
Reference in a new issue