From f4f4e0011f43b1b8293506d6a80581cf2780de3f Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 20 Apr 2020 12:32:07 -0400 Subject: [PATCH 1/4] don't merge this, it's very wrong --- www/common/cryptpad-common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 677243399..5ddf0f059 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1704,6 +1704,11 @@ define([ // Check for CryptPad updates var urlArgs = newUrlArgs || (Config.requireConf ? Config.requireConf.urlArgs : null); if (!urlArgs) { return; } + + console.log(newUrlArgs, urlArgs, currentVersion); + + if (newUrlArgs !== currentVersion) { return true; } + var arr = /ver=([0-9.]+)(-[0-9]*)?/.exec(urlArgs); var ver = arr[1]; if (!ver) { return; } From 9efbe59361e844a979db939df7c576a33d47138a Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 20 Apr 2020 14:25:43 -0400 Subject: [PATCH 2/4] force a page reload for patch version changes --- www/common/cryptpad-common.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 5ddf0f059..25b1a320f 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1704,23 +1704,21 @@ define([ // Check for CryptPad updates var urlArgs = newUrlArgs || (Config.requireConf ? Config.requireConf.urlArgs : null); if (!urlArgs) { return; } - - console.log(newUrlArgs, urlArgs, currentVersion); - - if (newUrlArgs !== currentVersion) { return true; } - var arr = /ver=([0-9.]+)(-[0-9]*)?/.exec(urlArgs); var ver = arr[1]; if (!ver) { return; } var verArr = ver.split('.'); - verArr[2] = 0; + //verArr[2] = 0; if (verArr.length !== 3) { return; } var stored = currentVersion || '0.0.0'; var storedArr = stored.split('.'); - storedArr[2] = 0; + //storedArr[2] = 0; + var shouldUpdate = JSON.stringify(verArr) !== JSON.stringify(storedArr); +/* var shouldUpdate = parseInt(verArr[0]) !== parseInt(storedArr[0]) || (parseInt(verArr[0]) === parseInt(storedArr[0]) && parseInt(verArr[1]) !== parseInt(storedArr[1])); +*/ if (!shouldUpdate) { return; } currentVersion = ver; localStorage[CRYPTPAD_VERSION] = ver; From a8c8b85f0c9322f7be2d65e60641347756822029 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 20 Apr 2020 14:31:02 -0400 Subject: [PATCH 3/4] add an XXX note for the 3.16.0 release --- www/common/sframe-common.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index ad8d6f77e..cf73ce52c 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -630,6 +630,7 @@ define([ }); ctx.sframeChan.on('EV_NEW_VERSION', function () { + // XXX lock the UI and do the same in non-framework apps var $err = $('
').append(Messages.newVersionError); $err.find('a').click(function () { funcs.gotoURL(); From 7e334d0e3a87bfb7554250553821892a4e5650dc Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 20 Apr 2020 14:41:37 -0400 Subject: [PATCH 4/4] add cursors to media-tags and mermaid in markdown preview --- customize.dist/src/less2/include/markdown.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/customize.dist/src/less2/include/markdown.less b/customize.dist/src/less2/include/markdown.less index 867dbacc9..1bd592d63 100644 --- a/customize.dist/src/less2/include/markdown.less +++ b/customize.dist/src/less2/include/markdown.less @@ -74,6 +74,7 @@ } } media-tag { + cursor: pointer; * { max-width: 100%; } @@ -93,6 +94,7 @@ pre.mermaid { svg { max-width: 100%; + cursor: pointer; } } }