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

pull/1/head
yflory 7 years ago
commit 30cea8888d

@ -49,11 +49,6 @@ define([
h('p', Msg.main_footerText)
])
], ''),
/* footerCol(null, [
footLink('/about.html', 'about'),
footLink('/terms.html', 'terms'),
footLink('/privacy.html', 'privacy'),
], 'CryptPad'),*/
footerCol('footer_applications', [
footLink('/drive/', 'main_drive'),
footLink('/pad/', 'main_richText'),
@ -76,7 +71,7 @@ define([
])
])
]),
h('div.cp-version-footer', "CryptPad v1.20.0 (Unicorn)")
h('div.cp-version-footer', "CryptPad v1.21.0 (Vampire)")
]);
};
@ -690,45 +685,5 @@ define([
];
};
Pages['/drive/'] = Pages['/drive/index.html'] = function () {
return loadingScreen();
};
Pages['/file/'] = Pages['/file/index.html'] = function () {
return loadingScreen();
};
Pages['/contacts/'] = Pages['/contacts/index.html'] = function () {
return loadingScreen();
};
Pages['/pad/'] = Pages['/pad/index.html'] = function () {
return loadingScreen();
};
Pages['/code/'] = Pages['/code/index.html'] = function () {
return loadingScreen();
};
Pages['/slide/'] = Pages['/slide/index.html'] = function () {
return loadingScreen();
};
Pages['/invite/'] = Pages['/invite/index.html'] = function () {
return loadingScreen();
};
Pages['/settings/'] = Pages['/settings/index.html'] = function () {
return loadingScreen();
};
Pages['/profile/'] = Pages['/profile/index.html'] = function () {
return loadingScreen();
};
Pages['/todo/'] = Pages['/todo/index.html'] = function () {
return loadingScreen();
};
return Pages;
});

@ -1,11 +1,10 @@
define([
'jquery',
'/common/hyperscript.js',
'/common/cryptpad-common.js',
'/customize/pages.js',
'less!/bower_components/components-font-awesome/css/font-awesome.min.css',
], function ($, h, Cryptpad, Pages) {
], function ($, h, Pages) {
$(function () {
var $body = $('body');
var isMainApp = function () {

@ -1,7 +1,7 @@
{
"name": "cryptpad",
"description": "realtime collaborative visual editor with zero knowlege server",
"version": "1.20.0",
"version": "1.21.0",
"dependencies": {
"chainpad-server": "^1.0.1",
"express": "~4.10.1",

@ -633,6 +633,13 @@ define([
});
};
messenger.clearOwnedChannel = function (channel, cb) {
common.clearOwnedChannel(channel, function (e) {
if (e) { return void cb(e); }
cb();
});
};
// TODO listen for changes to your friend list
// emit 'update' events for clients

@ -559,6 +559,13 @@ define([
});
});
});
sframeChan.on('Q_CONTACTS_CLEAR_OWNED_CHANNEL', function (channel, cb) {
messenger.clearOwnedChannel(channel, function (e) {
cb({
error: e,
});
});
});
messenger.on('message', function (message) {
sframeChan.event('EV_CONTACTS_MESSAGE', message);

@ -108,6 +108,12 @@ define([], function () {
});
};
messenger.clearOwnedChannel = function (channel, cb) {
sFrameChan.query('Q_CONTACTS_CLEAR_OWNED_CHANNEL', channel, function (e) {
cb(e);
});
};
return messenger;
};

@ -156,6 +156,7 @@ define({
'Q_CONTACTS_GET_MORE_HISTORY': true,
'Q_CONTACTS_SEND_MESSAGE': true,
'Q_CONTACTS_SET_CHANNEL_HEAD': true,
'Q_CONTACTS_CLEAR_OWNED_CHANNEL': true,
// Put one or more entries to the localStore which will go in localStorage.
'EV_LOCALSTORE_PUT': true,

@ -9,6 +9,7 @@ define([
'/contacts/messenger-ui.js',
'/common/sframe-messenger-inner.js',
'/customize/messages.js',
'/common/common-interface.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'less!/bower_components/components-font-awesome/css/font-awesome.min.css',
@ -21,9 +22,10 @@ define([
nThen,
SFCommon,
h,
UI,
MessengerUI,
Messenger,
Messages
Messages,
UI
)
{
var APP = {};
@ -73,7 +75,7 @@ define([
var messenger = Messenger.create(sFrameChan);
UI.create(messenger, $(friendList), $(messaging), common);
MessengerUI.create(messenger, $(friendList), $(messaging), common);
UI.removeLoadingScreen();

@ -176,7 +176,8 @@ define([
$(removeHistory).click(function () {
UI.confirm(Messages.contacts_confirmRemoveHistory, function (yes) {
if (!yes) { return; }
Cryptpad.clearOwnedChannel(data.channel, function (e) {
messenger.clearOwnedChannel(data.channel, function (e) {
if (e) {
console.error(e);
UI.alert(Messages.contacts_removeHistoryServerError);

@ -186,8 +186,6 @@ define([
};
var onInit = function () {
UI.addLoadingScreen();
$body.on('dragover', function (e) { e.preventDefault(); });
$body.on('drop', function (e) { e.preventDefault(); });

Loading…
Cancel
Save