mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Array.from() to spread syntax
This commit is contained in:
parent
07b002a66a
commit
df1d0fc8d6
6 changed files with 27 additions and 7 deletions
2
dev/External/SquireUI.js
vendored
2
dev/External/SquireUI.js
vendored
|
|
@ -58,7 +58,7 @@ const doc = document,
|
|||
tpl.querySelectorAll(':not('+allowedElements+',signature)').forEach(el => el.replaceWith(getFragmentOfChildren(el)));
|
||||
tpl.querySelectorAll('*').forEach(el => {
|
||||
if (el.hasAttributes()) {
|
||||
Array.from(el.attributes).forEach(attr => {
|
||||
[...el.attributes].forEach(attr => {
|
||||
let name = attr.name.toLowerCase();
|
||||
if (!allowedAttributes.includes(name)) {
|
||||
el.removeAttribute(name);
|
||||
|
|
|
|||
|
|
@ -397,8 +397,28 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
* @param {Object} oAttachment
|
||||
* @returns {boolean}
|
||||
*/
|
||||
attachmentPreview() {
|
||||
// TODO: add lightgallery alternative?
|
||||
attachmentPreview(/*attachment*/) {
|
||||
/*
|
||||
if (attachment && attachment.isImage() && !attachment.isLinked && this.message() && this.message().attachments()) {
|
||||
const items = this.message().attachments().map(item => {
|
||||
if (item && !item.isLinked && item.isImage()) {
|
||||
if (item === attachment) {
|
||||
index = listIndex;
|
||||
}
|
||||
++listIndex;
|
||||
return {
|
||||
src: item.linkPreview(),
|
||||
msrc: item.linkThumbnail(),
|
||||
title: item.fileName
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}).filter(value => !!value);
|
||||
|
||||
if (items.length) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue