mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 05:27:14 -04:00
fix: thumbnail images now wrok
This commit is contained in:
parent
94bf192f12
commit
f847439e10
2 changed files with 11 additions and 11 deletions
|
@ -12,7 +12,7 @@ template(name="previewClipboardImagePopup")
|
|||
button.primary.js-upload-pasted-image {{_ 'upload'}}
|
||||
|
||||
template(name="previewAttachedImagePopup")
|
||||
img.preview-large-image.js-large-image-clicked(src="{{url}}")
|
||||
img.preview-large-image.js-large-image-clicked(src="{{link}}")
|
||||
|
||||
template(name="attachmentDeletePopup")
|
||||
p {{_ "attachment-delete-pop"}}
|
||||
|
@ -22,22 +22,22 @@ template(name="attachmentsGalery")
|
|||
.attachments-galery
|
||||
each attachments
|
||||
.attachment-item
|
||||
a.attachment-thumbnail.swipebox(href="{{url}}" title="{{name}}")
|
||||
a.attachment-thumbnail.swipebox(href="{{link}}" title="{{name}}")
|
||||
if isUploaded
|
||||
if isImage
|
||||
img.attachment-thumbnail-img(src="{{url}}")
|
||||
img.attachment-thumbnail-img(src="{{link}}")
|
||||
else if($eq extension 'mp3')
|
||||
video(width="100%" height="100%" controls="true")
|
||||
source(src="{{url}}" type="audio/mpeg")
|
||||
source(src="{{link}}" type="audio/mpeg")
|
||||
else if($eq extension 'ogg')
|
||||
video(width="100%" height="100%" controls="true")
|
||||
source(src="{{url}}" type="video/ogg")
|
||||
source(src="{{link}}" type="video/ogg")
|
||||
else if($eq extension 'webm')
|
||||
video(width="100%" height="100%" controls="true")
|
||||
source(src="{{url}}" type="video/webm")
|
||||
source(src="{{link}}" type="video/webm")
|
||||
else if($eq extension 'mp4')
|
||||
video(width="100%" height="100%" controls="true")
|
||||
source(src="{{url}}" type="video/mp4")
|
||||
source(src="{{link}}" type="video/mp4")
|
||||
else
|
||||
span.attachment-thumbnail-ext= extension
|
||||
else
|
||||
|
@ -46,7 +46,7 @@ template(name="attachmentsGalery")
|
|||
= name
|
||||
span.file-size ({{fileSize size}} KB)
|
||||
span.attachment-details-actions
|
||||
a.js-download(href="{{url download=true}}")
|
||||
a.js-download(href="{{link}}?download=true")
|
||||
i.fa.fa-download
|
||||
| {{_ 'download'}}
|
||||
if currentUser.isBoardMember
|
||||
|
|
|
@ -740,12 +740,12 @@ Cards.helpers({
|
|||
return Attachments.find(
|
||||
{ 'meta.cardId': this.linkedId },
|
||||
{ sort: { uploadedAt: -1 } },
|
||||
);
|
||||
).each();
|
||||
} else {
|
||||
return Attachments.find(
|
||||
{ 'meta.cardId': this._id },
|
||||
{ sort: { uploadedAt: -1 } },
|
||||
);
|
||||
).each();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -754,7 +754,7 @@ Cards.helpers({
|
|||
const cover = Attachments.findOne(this.coverId);
|
||||
// if we return a cover before it is fully stored, we will get errors when we try to display it
|
||||
// todo XXX we could return a default "upload pending" image in the meantime?
|
||||
return cover && cover.path && cover;
|
||||
return cover && cover.link() && cover;
|
||||
},
|
||||
|
||||
checklists() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue