|
|
@ -3,14 +3,15 @@ define([
|
|
|
|
'/bower_components/chainpad-crypto/crypto.js',
|
|
|
|
'/bower_components/chainpad-crypto/crypto.js',
|
|
|
|
'/common/sframe-chainpad-listmap.js',
|
|
|
|
'/common/sframe-chainpad-listmap.js',
|
|
|
|
'/common/toolbar3.js',
|
|
|
|
'/common/toolbar3.js',
|
|
|
|
'/common/cryptpad-common.js',
|
|
|
|
|
|
|
|
'/bower_components/nthen/index.js',
|
|
|
|
'/bower_components/nthen/index.js',
|
|
|
|
'/common/sframe-common.js',
|
|
|
|
'/common/sframe-common.js',
|
|
|
|
'/common/common-util.js',
|
|
|
|
'/common/common-util.js',
|
|
|
|
'/common/common-interface.js',
|
|
|
|
'/common/common-interface.js',
|
|
|
|
'/common/common-realtime.js',
|
|
|
|
'/common/common-realtime.js',
|
|
|
|
|
|
|
|
'/customize/messages.js',
|
|
|
|
'/bower_components/marked/marked.min.js',
|
|
|
|
'/bower_components/marked/marked.min.js',
|
|
|
|
'cm/lib/codemirror',
|
|
|
|
'cm/lib/codemirror',
|
|
|
|
|
|
|
|
|
|
|
|
'cm/mode/markdown/markdown',
|
|
|
|
'cm/mode/markdown/markdown',
|
|
|
|
|
|
|
|
|
|
|
|
'css!/bower_components/codemirror/lib/codemirror.css',
|
|
|
|
'css!/bower_components/codemirror/lib/codemirror.css',
|
|
|
@ -24,24 +25,19 @@ define([
|
|
|
|
Crypto,
|
|
|
|
Crypto,
|
|
|
|
Listmap,
|
|
|
|
Listmap,
|
|
|
|
Toolbar,
|
|
|
|
Toolbar,
|
|
|
|
Cryptpad,
|
|
|
|
|
|
|
|
nThen,
|
|
|
|
nThen,
|
|
|
|
SFCommon,
|
|
|
|
SFCommon,
|
|
|
|
Util,
|
|
|
|
Util,
|
|
|
|
UI,
|
|
|
|
UI,
|
|
|
|
Realtime,
|
|
|
|
Realtime,
|
|
|
|
|
|
|
|
Messages,
|
|
|
|
Marked,
|
|
|
|
Marked,
|
|
|
|
CodeMirror
|
|
|
|
CodeMirror
|
|
|
|
)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var Messages = Cryptpad.Messages;
|
|
|
|
|
|
|
|
var APP = window.APP = {
|
|
|
|
var APP = window.APP = {
|
|
|
|
Cryptpad: Cryptpad,
|
|
|
|
|
|
|
|
_onRefresh: []
|
|
|
|
_onRefresh: []
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var onConnectError = function () {
|
|
|
|
|
|
|
|
UI.errorLoadingScreen(Messages.websocketError);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Decryption event for avatar mediatag (TODO not needed anymore?)
|
|
|
|
// Decryption event for avatar mediatag (TODO not needed anymore?)
|
|
|
|
$(window.document).on('decryption', function (e) {
|
|
|
|
$(window.document).on('decryption', function (e) {
|
|
|
@ -147,7 +143,7 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var addCreateInviteLinkButton = function ($container) {
|
|
|
|
var addCreateInviteLinkButton = function ($container) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
var obj = APP.lm.proxy;
|
|
|
|
/*var obj = APP.lm.proxy;
|
|
|
|
|
|
|
|
|
|
|
|
var proxy = Cryptpad.getProxy();
|
|
|
|
var proxy = Cryptpad.getProxy();
|
|
|
|
var userViewHash = Util.find(proxy, ['profile', 'view']);
|
|
|
|
var userViewHash = Util.find(proxy, ['profile', 'view']);
|
|
|
@ -185,7 +181,7 @@ define([
|
|
|
|
// TODO copy invite link to clipboard
|
|
|
|
// TODO copy invite link to clipboard
|
|
|
|
}, null, true);
|
|
|
|
}, null, true);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.appendTo($container);
|
|
|
|
.appendTo($container);*/
|
|
|
|
};
|
|
|
|
};
|
|
|
|
/* jshint ignore:end */
|
|
|
|
/* jshint ignore:end */
|
|
|
|
|
|
|
|
|
|
|
@ -398,13 +394,13 @@ define([
|
|
|
|
APP.$container.find('#'+CREATE_ID).remove();
|
|
|
|
APP.$container.find('#'+CREATE_ID).remove();
|
|
|
|
|
|
|
|
|
|
|
|
var obj = APP.lm && APP.lm.proxy;
|
|
|
|
var obj = APP.lm && APP.lm.proxy;
|
|
|
|
if (!APP.readOnly) {
|
|
|
|
/*if (!APP.readOnly) {
|
|
|
|
var pubKeys = Cryptpad.getPublicKeys();
|
|
|
|
var pubKeys = Cryptpad.getPublicKeys();
|
|
|
|
if (pubKeys && pubKeys.curve) {
|
|
|
|
if (pubKeys && pubKeys.curve) {
|
|
|
|
obj.curveKey = pubKeys.curve;
|
|
|
|
obj.curveKey = pubKeys.curve;
|
|
|
|
obj.edKey = pubKeys.ed;
|
|
|
|
obj.edKey = pubKeys.ed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
if (!APP.initialized) {
|
|
|
|
if (!APP.initialized) {
|
|
|
|
var $header = $('<div>', {id: HEADER_ID}).appendTo(APP.$rightside);
|
|
|
|
var $header = $('<div>', {id: HEADER_ID}).appendTo(APP.$rightside);
|
|
|
@ -426,7 +422,6 @@ define([
|
|
|
|
var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle'];
|
|
|
|
var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle'];
|
|
|
|
var configTb = {
|
|
|
|
var configTb = {
|
|
|
|
displayed: displayed,
|
|
|
|
displayed: displayed,
|
|
|
|
common: Cryptpad,
|
|
|
|
|
|
|
|
sfCommon: common,
|
|
|
|
sfCommon: common,
|
|
|
|
$container: APP.$toolbar,
|
|
|
|
$container: APP.$toolbar,
|
|
|
|
pageTitle: Messages.profileButton,
|
|
|
|
pageTitle: Messages.profileButton,
|
|
|
@ -447,12 +442,6 @@ define([
|
|
|
|
sFrameChan = common.getSframeChannel();
|
|
|
|
sFrameChan = common.getSframeChannel();
|
|
|
|
sFrameChan.onReady(waitFor());
|
|
|
|
sFrameChan.onReady(waitFor());
|
|
|
|
}).nThen(function (/*waitFor*/) {
|
|
|
|
}).nThen(function (/*waitFor*/) {
|
|
|
|
Cryptpad.onError(function (info) {
|
|
|
|
|
|
|
|
if (info && info.type === "store") {
|
|
|
|
|
|
|
|
onConnectError();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
createToolbar();
|
|
|
|
createToolbar();
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
var metadataMgr = common.getMetadataMgr();
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|
var privateData = metadataMgr.getPrivateData();
|
|
|
|