diff --git a/README.md b/README.md index a4ad2a3835..888407e102 100644 --- a/README.md +++ b/README.md @@ -140,26 +140,26 @@ RainLoop 1.17 vs SnappyMail |js/* |RainLoop |Snappy | |--------------- |--------: |--------: | -|admin.js |2.170.153 | 80.467 | -|app.js |4.207.787 | 407.517 | +|admin.js |2.170.153 | 80.366 | +|app.js |4.207.787 | 407.909 | |boot.js | 868.735 | 4.142 | -|libs.js | 658.812 | 192.287 | +|libs.js | 658.812 | 192.289 | |sieve.js | 0 | 85.085 | |polyfills.js | 334.608 | 0 | |serviceworker.js | 0 | 285 | -|TOTAL |8.240.095 | 769.783 | +|TOTAL |8.240.095 | 770.076 | |js/min/* |RainLoop |Snappy |RL gzip |SM gzip |RL brotli |SM brotli | |--------------- |--------: |--------: |------: |------: |--------: |--------: | -|admin.min.js | 256.831 | 39.328 | 73.606 | 13.191 | 60.877 | 11.815 | -|app.min.js | 515.367 | 186.005 |139.456 | 63.143 |110.485 | 54.149 | +|admin.min.js | 256.831 | 39.283 | 73.606 | 13.181 | 60.877 | 11.803 | +|app.min.js | 515.367 | 186.036 |139.456 | 63.062 |110.485 | 54.135 | |boot.min.js | 84.659 | 2.084 | 26.998 | 1.202 | 23.643 | 1.003 | |libs.min.js | 584.772 | 93.758 |180.901 | 34.878 |155.182 | 31.291 | |sieve.min.js | 0 | 41.316 | 0 | 10.364 | 0 | 9.352 | |polyfills.min.js | 32.837 | 0 | 11.406 | 0 | 10.175 | 0 | -|TOTAL user |1.217.635 | 281.847 |358.761 | 99.223 |299.485 | 86.443 | -|TOTAL user+sieve |1.217.635 | 323.163 |358.761 |109.587 |299.485 | 95.795 | -|TOTAL admin | 959.099 | 135.170 |292.911 | 49.271 |249.877 | 44.109 | +|TOTAL user |1.217.635 | 281.878 |358.761 | 99.142 |299.485 | 86.429 | +|TOTAL user+sieve |1.217.635 | 323.194 |358.761 |109.506 |299.485 | 95.781 | +|TOTAL admin | 959.099 | 135.125 |292.911 | 49.261 |249.877 | 44.097 | For a user it is around 69% smaller and faster than traditional RainLoop. @@ -188,12 +188,12 @@ For a user it is around 69% smaller and faster than traditional RainLoop. |css/* |RainLoop |Snappy |RL gzip |SM gzip |SM brotli | |------------ |-------: |------: |------: |------: |--------: | -|app.css | 340.331 | 84.570 | 46.946 | 17.646 | 15.118 | -|app.min.css | 274.947 | 67.928 | 39.647 | 15.529 | 13.548 | +|app.css | 340.331 | 84.607 | 46.946 | 17.662 | 15.138 | +|app.min.css | 274.947 | 67.961 | 39.647 | 15.550 | 13.570 | |boot.css | | 1.326 | | 664 | 545 | |boot.min.css | | 1.071 | | 590 | 474 | -|admin.css | | 30.645 | | 7.024 | 6.117 | -|admin.min.css | | 24.746 | | 6.346 | 5.608 | +|admin.css | | 30.641 | | 7.028 | 6.111 | +|admin.min.css | | 24.742 | | 6.352 | 5.599 | ### PGP RainLoop uses the old OpenPGP.js v2 diff --git a/dev/Model/AttachmentCollection.js b/dev/Model/AttachmentCollection.js index 32a2e5779c..4715d219db 100644 --- a/dev/Model/AttachmentCollection.js +++ b/dev/Model/AttachmentCollection.js @@ -10,14 +10,24 @@ export class AttachmentCollectionModel extends AbstractCollectionModel * @returns {AttachmentCollectionModel} */ static reviveFromJson(items) { - return super.reviveFromJson(items, attachment => AttachmentModel.reviveFromJson(attachment)); -/* const attachments = super.reviveFromJson(items, attachment => AttachmentModel.reviveFromJson(attachment)); + let collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'}); + attachments.sort((a, b) => { + if (a.isInline()) { + if (!b.isInline()) { + return 1; + } + } else if (!b.isInline()) { + return -1; + } + return collator.compare(a.fileName, b.fileName); + }); +/* if (attachments) { attachments.InlineCount = attachments.reduce((accumulator, a) => accumulator + (a.isInline ? 1 : 0), 0); } - return attachments; */ + return attachments; } /** diff --git a/dev/Styles/User/Attachments.less b/dev/Styles/User/Attachments.less index 1f175d6505..9fad783696 100644 --- a/dev/Styles/User/Attachments.less +++ b/dev/Styles/User/Attachments.less @@ -1,3 +1,7 @@ +.attachmentList { + margin: 0; +} + .attachmentItem { background-color: rgba(128, 128, 128, 0.1); @@ -9,8 +13,7 @@ line-height: 20px; margin: 5px; min-height: 48px; - max-width: 200px; - min-width: 60px; + width: 16em; overflow: hidden; position: relative; diff --git a/dev/Styles/User/MessageView.less b/dev/Styles/User/MessageView.less index 1ae1b501bb..8b708698fe 100644 --- a/dev/Styles/User/MessageView.less +++ b/dev/Styles/User/MessageView.less @@ -286,15 +286,6 @@ border-bottom: 1px solid var(--border-color, #bbb); position: relative; - .attachmentList { - margin: 0; -/* - min-height: 4em; - max-height: 15vh; - overflow: auto; -*/ - } - &:not(.selection-mode) { .checkboxAttachment { display: none; diff --git a/dev/View/User/MailBox/MessageView.js b/dev/View/User/MailBox/MessageView.js index c34c6ddfcf..b5d2bb4712 100644 --- a/dev/View/User/MailBox/MessageView.js +++ b/dev/View/User/MailBox/MessageView.js @@ -162,7 +162,13 @@ export class MailMessageView extends AbstractViewRight { listAttachments: () => currentMessage()?.attachments() .filter(item => SettingsUserStore.listInlineAttachments() || !item.isLinked()), - hasAttachments: () => this.listAttachments()?.length, +// hasAttachments: () => this.listAttachments()?.length, + hasAttachments: () => currentMessage()?.attachments() + .some(item => SettingsUserStore.listInlineAttachments() || !item.isLinked()), +// listInlines: () => currentMessage()?.attachments() +// .filter(item => item.isLinked()), +// hasInlines: () => currentMessage()?.attachments() +// .some(item => SettingsUserStore.listInlineAttachments() || !item.isLinked()), canBeRepliedOrForwarded: () => !MessagelistUserStore.isDraftFolder() && this.messageVisible(),