From 245aaa92a250d4834dae21129a920f9ed9305780 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Fri, 4 Nov 2022 11:41:39 +0100 Subject: [PATCH] =?UTF-8?q?Show=20=F0=9F=94=92=20(lock)=20glyph=20in=20mes?= =?UTF-8?q?sagelist=20for=20encrypted=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/Model/Message.js | 4 +++- dev/Styles/User/MessageList.less | 6 +----- snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php | 1 + vendors/fontastic/styles.css | 3 +++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dev/Model/Message.js b/dev/Model/Message.js index c3d1cead9..6404670c5 100644 --- a/dev/Model/Message.js +++ b/dev/Model/Message.js @@ -95,6 +95,7 @@ export class MessageModel extends AbstractModel { pgpSigned: null, pgpVerified: null, + encrypted: false, pgpEncrypted: null, pgpDecrypted: false, @@ -110,7 +111,8 @@ export class MessageModel extends AbstractModel { this.flags = ko.observableArray(); addComputablesTo(this, { - attachmentIconClass: () => FileInfo.getAttachmentsIconClass(this.attachments()), + attachmentIconClass: () => + this.encrypted() ? 'icon-lock' : FileInfo.getAttachmentsIconClass(this.attachments()), threadsLen: () => this.threads().length, listAttachments: () => this.attachments() .filter(item => SettingsUserStore.listInlineAttachments() || !item.isLinked()), diff --git a/dev/Styles/User/MessageList.less b/dev/Styles/User/MessageList.less index c97292544..1ac93f0f7 100644 --- a/dev/Styles/User/MessageList.less +++ b/dev/Styles/User/MessageList.less @@ -235,7 +235,7 @@ html:not(rl-mobile) { white-space: nowrap; } - .attachmentParent { + .withAttachments .attachmentParent { margin: 0 10px 0 5px; } @@ -298,10 +298,6 @@ html:not(rl-mobile) { margin-right: 0.25em; } - &:not(.withAttachments) .attachmentParent { - display: none; - } - &.hasUnseenSubMessage { background-color: rgba(255, 255, 64, 0.15); border-left-color: lighten(orange, 30%); diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php index a6f60ed6f..1c34c79c0 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php @@ -658,6 +658,7 @@ class Message implements \JsonSerializable 'Folder' => $this->sFolder, 'Uid' => $this->iUid, 'subject' => \trim(Utils::Utf8Clear($this->sSubject)), + 'encrypted' => 'multipart/encrypted' == $this->sContentType || $this->PgpEncrypted(), 'MessageId' => $this->sMessageId, 'SpamScore' => $this->bIsSpam ? 100 : $this->iSpamScore, 'SpamResult' => $this->sSpamResult, diff --git a/vendors/fontastic/styles.css b/vendors/fontastic/styles.css index 11b68a4c5..01d4ac0e8 100644 --- a/vendors/fontastic/styles.css +++ b/vendors/fontastic/styles.css @@ -88,6 +88,9 @@ .icon-folder-add::before { content: "\e03c"; } +.icon-lock::before { + content: "🔒"; +} .icon-popup::before { content: "\e045"; }