Properly insert files to description

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-12-30 07:23:05 +01:00
parent 32b2823538
commit 82e2621eb1
2 changed files with 21 additions and 5 deletions

View File

@@ -69,7 +69,7 @@
</ActionButton>
</Actions>
<Actions v-if="removable" :force-menu="true">
<ActionLink v-if="attachment.extendedData.fileid" icon="icon-folder" :href="'/index.php/f/'+attachment.extendedData.fileid">
<ActionLink v-if="attachment.extendedData.fileid" icon="icon-folder" :href="internalLink(attachment)">
{{ t('deck', 'Show in files') }}
</ActionLink>
<ActionButton v-if="attachment.extendedData.fileid" icon="icon-delete">
@@ -160,6 +160,9 @@ export default {
attachmentUrl() {
return (attachment) => generateUrl(`/apps/deck/cards/${attachment.cardId}/attachment/${attachment.id}`)
},
internalLink() {
return (attachment) => generateUrl('/index.php/f/' + attachment.extendedData.fileid)
},
formattedFileSize() {
return (filesize) => formatFileSize(filesize)
},