Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

This commit is contained in:
yflory 2020-04-21 12:05:13 +02:00
commit c2e0ed0d59
3 changed files with 8 additions and 2 deletions

View File

@ -74,6 +74,7 @@
}
}
media-tag {
cursor: pointer;
* {
max-width: 100%;
}
@ -93,6 +94,7 @@
pre.mermaid {
svg {
max-width: 100%;
cursor: pointer;
}
}
}

View File

@ -1708,14 +1708,17 @@ define([
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;

View File

@ -650,6 +650,7 @@ define([
});
ctx.sframeChan.on('EV_NEW_VERSION', function () {
// XXX lock the UI and do the same in non-framework apps
var $err = $('<div>').append(Messages.newVersionError);
$err.find('a').click(function () {
funcs.gotoURL();