From aa05f10629cbada4bcb2fdcabf7da69c7ddd045b Mon Sep 17 00:00:00 2001 From: djmaze Date: Wed, 27 Jan 2021 12:02:37 +0100 Subject: [PATCH] v2.2.1 --- README.md | 35 ++++++++++++++++++----------------- dev/App/Abstract.js | 8 ++++---- dev/Common/Links.js | 9 +++------ dev/Remote/User/Fetch.js | 6 +++--- package.json | 2 +- 5 files changed, 29 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 2598653b5..f135ea500 100644 --- a/README.md +++ b/README.md @@ -109,33 +109,34 @@ Things might work in Edge 18, Firefox 50-62 and Chrome 54-68 due to one polyfill * Removed non-community (aka Prem/Premium/License) code -RainLoop 1.14 vs SnappyMail +RainLoop 1.15 vs SnappyMail |js/* |RainLoop |Snappy | |--------------- |--------: |--------: | -|admin.js |2.130.942 | 119.180 | -|app.js |4.184.455 | 527.492 | -|boot.js | 671.522 | 4.842 | -|libs.js | 647.614 | 235.475 | -|polyfills.js | 325.834 | 0 | +|admin.js |2.158.025 | 119.197 | +|app.js |4.215.733 | 527.415 | +|boot.js | 672.433 | 4.842 | +|libs.js | 647.679 | 235.475 | +|polyfills.js | 325.908 | 0 | |serviceworker.js | 0 | 285 | -|TOTAL |7.960.367 | 887.274 | +|TOTAL |8.019.778 | 887.214 | -|js/min/* |RainLoop |Snappy |Rain gzip |gzip |brotli | -|--------------- |--------: |--------: |--------: |--------: |--------: | -|admin.min.js | 252.147 | 61.128 | 73.657 | 17.416 | 15.445 | -|app.min.js | 511.202 | 256.673 |140.462 | 73.698 | 61.839 | -|boot.min.js | 66.007 | 2.630 | 22.567 | 1.375 | 1.189 | -|libs.min.js | 572.545 | 130.930 |176.720 | 47.397 | 42.116 | -|polyfills.min.js | 32.452 | 0 | 11.312 | 0 | 0 | -|TOTAL |1.434.353 | 451.361 |424.718 |139.886 |120.589 | -|TOTAL (no admin) |1.182.206 | 390.233 |351.061 |122.470 |105.144 | +|js/min/* |RainLoop |Snappy |Rain gzip |S gzip |R brotli |S brotli | +|--------------- |--------: |--------: |--------: |------: |-------: |-------: | +|admin.min.js | 255.514 | 61.165 | 73.899 | 17.419 | 60.674 | 15.447 | +|app.min.js | 516.000 | 256.632 |140.430 | 73.688 |110.657 | 61.812 | +|boot.min.js | 66.456 | 2.630 | 22.553 | 1.375 | 20.043 | 1.189 | +|libs.min.js | 574.626 | 130.930 |177.280 | 47.397 |151.855 | 42.116 | +|polyfills.min.js | 32.608 | 0 | 11.315 | 0 | 10.072 | 0 | +|TOTAL |1.445.204 | 451.357 |425.477 |139.879 |353.301 |120.564 | +|TOTAL (no admin) |1.189.690 | 390.192 |351.061 |122.460 |292.627 |105.117 | For a user its around 65% smaller and faster than traditional RainLoop. ### CSS changes -* Solve jQuery removed "features" with native css code. +* Solve jQuery removed "features" with native css code +* Cleanup unused css * Removed html.no-css * Removed dev/Styles/Cmd.less * Removed dev/Styles/Scroll.less diff --git a/dev/App/Abstract.js b/dev/App/Abstract.js index 3ae56927b..3f868ee55 100644 --- a/dev/App/Abstract.js +++ b/dev/App/Abstract.js @@ -8,7 +8,7 @@ import { } from 'Common/Globals'; import { KeyState } from 'Common/Enums'; -import { rootAdmin, rootUser } from 'Common/Links'; +import { logoutLink } from 'Common/Links'; import { i18nToNodes, initOnStartOrLangChange } from 'Common/Translator'; import { LanguageStore } from 'Stores/Language'; @@ -70,13 +70,13 @@ export class AbstractApp { } logoutReload(close = false) { - const logoutLink = rl.adminArea() ? rootAdmin() : rootUser(); + const url = logoutLink(); rl.hash.clear(); close && window.close && window.close(); - if (location.href !== logoutLink) { - setTimeout(() => (Settings.app('inIframe') ? parent : window).location.href = logoutLink, 100); + if (location.href !== url) { + setTimeout(() => (Settings.app('inIframe') ? parent : window).location.href = url, 100); } else { rl.route.reload(); } diff --git a/dev/Common/Links.js b/dev/Common/Links.js index d89a7b6ff..da2bfa70a 100644 --- a/dev/Common/Links.js +++ b/dev/Common/Links.js @@ -5,7 +5,6 @@ const ROOT = './', HASH_PREFIX = '#/', SERVER_PREFIX = './?', - SUB_QUERY_PREFIX = '&q[]=', VERSION = Settings.app('version'), VERSION_PREFIX = Settings.app('webVersionPath') || 'snappymail/v/' + VERSION + '/', @@ -14,9 +13,7 @@ const /** * @returns {string} */ -export function subQueryPrefix() { - return SUB_QUERY_PREFIX; -} +export const SUB_QUERY_PREFIX = '&q[]='; /** * @param {string=} startupUrl @@ -36,8 +33,8 @@ export function rootAdmin() { /** * @returns {string} */ -export function rootUser() { - return ROOT; +export function logoutLink() { + return rl.adminArea() ? rootAdmin() : ROOT; } /** diff --git a/dev/Remote/User/Fetch.js b/dev/Remote/User/Fetch.js index 468ffa3a9..34e9f91e3 100644 --- a/dev/Remote/User/Fetch.js +++ b/dev/Remote/User/Fetch.js @@ -8,7 +8,7 @@ import { MessageFlagsCache } from 'Common/Cache'; -import { subQueryPrefix } from 'Common/Links'; +import { SUB_QUERY_PREFIX } from 'Common/Links'; import AppStore from 'Stores/User/App'; import SettingsStore from 'Stores/User/Settings'; @@ -314,7 +314,7 @@ class RemoteUserFetch extends AbstractFetchRemote { if (folderHash && (!sSearch || !sSearch.includes('is:'))) { sGetAdd = 'MessageList/' + - subQueryPrefix() + + SUB_QUERY_PREFIX + '/' + urlsafeArray([ sFolderFullNameRaw, @@ -381,7 +381,7 @@ class RemoteUserFetch extends AbstractFetchRemote { {}, null, 'Message/' + - subQueryPrefix() + + SUB_QUERY_PREFIX + '/' + urlsafeArray([ sFolderFullNameRaw, diff --git a/package.json b/package.json index e66c9ace4..665e79953 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "title": "SnappyMail", "description": "Simple, modern & fast web-based email client", "private": true, - "version": "2.2.0", + "version": "2.2.1", "homepage": "https://snappymail.eu", "author": { "name": "DJ Maze",