This commit is contained in:
the-djmaze 2024-03-16 00:36:58 +01:00
parent ce63c36fb0
commit 0fd0d18154
4 changed files with 72 additions and 61 deletions

View file

@ -126,7 +126,10 @@ export class AttachmentModel extends AbstractModel {
}
get download() {
return b64EncodeJSONSafe({
return b64EncodeJSONSafe(this.url ? {
fileName: this.fileName,
data: this.url.replace(/^.+,/, '')
} : {
folder: this.folder,
uid: this.uid,
mimeIndex: this.mimeIndex,

View file

@ -146,7 +146,7 @@ export class MailMessageView extends AbstractViewRight {
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip')
&& (currentMessage()?.attachments || [])
.filter(item => item?.download /*&& !item?.isLinked()*/ && item?.checked())
.filter(item => item?.checked() && item?.download /*&& !item?.isLinked()*/)
.length,
tagsAllowed: () => FolderUserStore.currentFolder()?.tagsAllowed(),