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

pull/1/head
yflory 2021-12-09 11:27:38 +01:00
commit be277c03ba
21103 changed files with 432312 additions and 115 deletions

View File

@ -6,6 +6,7 @@ www/common/onlyoffice/x2t
www/common/onlyoffice/v1
www/common/onlyoffice/v2*
www/common/onlyoffice/v4
www/common/onlyoffice/v5
server.js
www/scratch

View File

@ -554,7 +554,7 @@ define([
return;
}
if (testing) { return void proceed(result); }
//if (testing) { return void proceed(result); }
if (!(proxy.curvePrivate && proxy.curvePublic &&
proxy.edPrivate && proxy.edPublic)) {

View File

@ -132,6 +132,24 @@
g.legend text, text.pieTitleText {
fill: @cp_markdown-block-fg;
}
g.legend rect {
stroke: @cryptpad_text_col !important;
stroke-width: 1px;
}
.pieCircle {
stroke: @cryptpad_text_col;
}
text.slice {
fill: @cryptpad_text_col;
}
}
&[mermaid-source^="erDiagram"] {
rect.er:not(.relationshipLabelBox) {
fill: #ECECFF;
}
g text.er {
fill: #333;
}
}
}
pre.markmap {

View File

@ -3,7 +3,7 @@ define([
'/bower_components/hyperjson/hyperjson.js',
'json.sortify',
'/drive/tests.js',
'/common/test.js',
//'/common/test.js',
'/common/common-hash.js',
'/common/common-util.js',
'/common/common-thumbnail.js',
@ -18,7 +18,7 @@ define([
'/bower_components/tweetnacl/nacl-fast.min.js',
'less!/customize/src/less2/pages/page-assert.less',
], function ($, Hyperjson, Sortify, Drive, Test, Hash, Util, Thumb, Wire, Flat, MediaTag, Block, ApiConfig, Assertions, h, Messages) {
], function ($, Hyperjson, Sortify, Drive, /*Test,*/ Hash, Util, Thumb, Wire, Flat, MediaTag, Block, ApiConfig, Assertions, h, Messages) {
window.Hyperjson = Hyperjson;
window.Sortify = Sortify;
var Nacl = window.nacl;
@ -526,11 +526,12 @@ define([
})),
]));
/*
if (failed) {
Test.failed();
} else {
Test.passed();
}
}*/
});
});

View File

@ -363,7 +363,7 @@ define([
});
});
var sheetURL = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html';
var sheetURL = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
assert(function (cb, msg) {
msg.innerText = "Missing HTTP headers required for .xlsx export from sheets. ";
@ -671,7 +671,7 @@ define([
});
assert(function (cb, msg) {
var url = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html';
var url = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
msg.appendChild(CSP_WARNING(url));
deferredPostMessage({
command: 'GET_HEADER',

File diff suppressed because one or more lines are too long

View File

@ -18,14 +18,14 @@ define([
'/lib/tippy/tippy.min.js',
'/common/hyperscript.js',
'/customize/loading.js',
'/common/test.js',
//'/common/test.js',
'/lib/jquery-ui/jquery-ui.min.js', // autocomplete widget
'/bower_components/bootstrap-tokenfield/dist/bootstrap-tokenfield.js',
'css!/lib/tippy/tippy.css',
'css!/lib/jquery-ui/jquery-ui.min.css'
], function ($, Messages, Util, Hash, Notifier, AppConfig,
Alertify, Tippy, h, Loading, Test) {
Alertify, Tippy, h, Loading/*, Test */) {
var UI = {};
/*
@ -994,7 +994,7 @@ define([
// Release the test blocker, hopefully every test has been registered.
// This test is created in sframe-boot2.js
cb = cb || function () {};
if (Test.__ASYNC_BLOCKER__) { Test.__ASYNC_BLOCKER__.pass(); }
//if (Test.__ASYNC_BLOCKER__) { Test.__ASYNC_BLOCKER__.pass(); }
var $loading = $('#' + LOADING);
$loading.addClass("cp-loading-hidden"); // Hide the loading screen

View File

@ -36,7 +36,7 @@ define([
init: function () {
require([
'mermaid',
'css!/code/mermaid-new.css'
//'css!/code/mermaid-new.css' // XXX
], function (_Mermaid) {
console.debug("loaded mermaid");
if (Mermaid.__stubbed) {
@ -202,7 +202,7 @@ define([
renderer.code = function (code, language) {
if (!code || typeof(code) !== 'string' || !code.trim()) { return defaultCode.apply(renderer, arguments); }
if (language === 'mermaid' && code.match(/^(graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph)/)) {
if (language === 'mermaid' && code.match(/^(flowchart|graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph|stateDiagram|erDiagram|journey|requirementDiagram)/)) {
return '<pre class="mermaid" data-plugin="mermaid">'+Util.fixHTML(code)+'</pre>';
} else if (language === 'markmap') {
return '<pre class="markmap" data-plugin="markmap">'+Util.fixHTML(code)+'</pre>';

View File

@ -3907,7 +3907,18 @@ define([
setEditable(true, false, true);
}
if (APP.readOnly) {
if (APP.readOnly && !APP.loggedIn) {
// XXX this incorrectly prompts guests to login/register even when they lack editing rights.
(function () {
var $banner = $(Pages.setHTML(h('div.cp-app-drive-content-info-box'), Messages.fm_info_sharedFolder));
$banner.find('[href="/login/"], [href="/register/"]').click(function (ev) {
ev.preventDefault();
var page = this.getAttribute('href').replace(/\//g, '');
common.setLoginRedirect(page);
});
$content.prepend($banner);
}());
} else if (APP.readOnly) {
// Read-only drive (team?)
$content.prepend($readOnly.clone());
} else if (sfId && folders[sfId] && folders[sfId].readOnly) {

View File

@ -61,7 +61,7 @@ define([
var CHECKPOINT_INTERVAL = 100;
var FORCE_CHECKPOINT_INTERVAL = 10000;
var DISPLAY_RESTORE_BUTTON = false;
var NEW_VERSION = 4; // version of the .bin, patches and ChainPad formats
var NEW_VERSION = 5; // version of the .bin, patches and ChainPad formats
var PENDING_TIMEOUT = 30000;
var CURRENT_VERSION = X2T.CURRENT_VERSION;
@ -215,7 +215,7 @@ define([
var tabId = metadataMgr.getNetfluxId() + '-' + obj.id;
if (content.ids[tabId]) {
delete content.ids[tabId];
delete content.locks[tabId];
if (content.locks) { delete content.locks[tabId]; }
APP.onLocal();
}
};
@ -2912,8 +2912,8 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
}
readOnly = true;
}
} else if (content && content.version <= 3) { // V2 or V3
version = 'v2b/';
} else if (content && content.version <= 4) { // V2 or V3
version = content.version <= 3 ? 'v2b/' : 'v4/';
APP.migrate = true;
// Registedred ~~users~~ editors can start the migration
if (common.isLoggedIn() && !readOnly) {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More