mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-28 14:55:48 +00:00
Also show inline images as attachments
This commit is contained in:
@@ -20,13 +20,6 @@ export class AttachmentCollectionModel extends AbstractCollectionModel
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
hasVisible() {
|
||||
return !!this.filter(item => !item.isLinked()).length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} cid
|
||||
* @returns {*}
|
||||
|
||||
@@ -150,7 +150,8 @@ export class MessageModel extends AbstractModel {
|
||||
this.addComputables({
|
||||
attachmentIconClass: () => FileInfo.getAttachmentsIconClass(this.attachments()),
|
||||
threadsLen: () => this.threads().length,
|
||||
hasAttachments: () => this.attachments().hasVisible(),
|
||||
// hasAttachments: () => this.attachments().filter(item => !item.isLinked()).length,
|
||||
hasAttachments: () => this.attachments().length,
|
||||
|
||||
isUnseen: () => !this.flags().includes('\\seen'),
|
||||
isFlagged: () => this.flags().includes('\\flagged'),
|
||||
|
||||
@@ -137,7 +137,7 @@ export class MailMessageView extends AbstractViewRight {
|
||||
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip')
|
||||
&& (currentMessage()?.attachments || [])
|
||||
.filter(item => item?.download && !item?.isLinked() && item?.checked())
|
||||
.filter(item => item?.download /*&& !item?.isLinked()*/ && item?.checked())
|
||||
.length,
|
||||
|
||||
tagsAllowed: () => FolderUserStore.currentFolder() ? FolderUserStore.currentFolder().tagsAllowed() : false,
|
||||
@@ -467,7 +467,7 @@ export class MailMessageView extends AbstractViewRight {
|
||||
|
||||
downloadAsZip() {
|
||||
const hashes = (currentMessage() ? currentMessage().attachments : [])
|
||||
.map(item => item?.checked() && !item?.isLinked() ? item.download : '')
|
||||
.map(item => item?.checked() /*&& !item?.isLinked()*/ ? item.download : '')
|
||||
.filter(v => v);
|
||||
if (hashes.length) {
|
||||
Remote.post('AttachmentsActions', this.downloadAsZipLoading, {
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
<div class="attachmentsPlace" data-bind="visible: message().hasAttachments(), css: {'selection-mode' : showAttachmentControls}">
|
||||
<ul class="attachmentList" data-bind="foreach: message().attachments()">
|
||||
<li class="attachmentItem" draggable="true"
|
||||
data-bind="visible: !isLinked(), event: { 'dragstart': eventDragStart }, attr: { 'title': fileName }, css: {'checked': checked}">
|
||||
data-bind="event: { 'dragstart': eventDragStart }, attr: { 'title': fileName }, css: {'checked': checked}">
|
||||
<div class="attachmentIconParent" data-bind="css: { 'hasPreview': hasPreview(), 'hasPreplay': hasPreplay(), 'isImage': isImage() }">
|
||||
<i class="hidePreview iconMain" data-bind="css: iconClass()"></i>
|
||||
<div class="showPreview">
|
||||
|
||||
Reference in New Issue
Block a user