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

pull/1/head
yflory 6 years ago
commit 573a3557f1

@ -89,6 +89,7 @@ define([
value: token value: token
}, function (obj) { }, function (obj) {
if (obj && obj.error) { return void cb(obj.error); } if (obj && obj.error) { return void cb(obj.error); }
Feedback.send('LOGOUT_EVERYWHERE');
cb(); cb();
}); });
}; };
@ -118,7 +119,14 @@ define([
}; };
// Settings // Settings
common.deleteAccount = function (cb) { common.deleteAccount = function (cb) {
postMessage("DELETE_ACCOUNT", null, cb); postMessage("DELETE_ACCOUNT", null, function (obj) {
if (obj.state) {
Feedback.send('DELETE_ACCOUNT_AUTOMATIC');
} else {
Feedback.send('DELETE_ACCOUNT_MANUAL');
}
cb(obj);
});
}; };
// Drive // Drive
common.userObjectCommand = function (data, cb) { common.userObjectCommand = function (data, cb) {
@ -1099,6 +1107,14 @@ define([
return doesSupport; return doesSupport;
}; };
common.isWebRTCSupported = function () {
return navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia ||
window.RTCPeerConnection;
};
common.ready = (function () { common.ready = (function () {
var env = {}; var env = {};
var initialized = false; var initialized = false;
@ -1114,6 +1130,10 @@ define([
Feedback.send("NO_PROXIES"); Feedback.send("NO_PROXIES");
} }
if (!common.isWebRTCSupported()) {
Feedback.send("NO_WEBRTC");
}
var shimPattern = /CRYPTPAD_SHIM/; var shimPattern = /CRYPTPAD_SHIM/;
if (shimPattern.test(Array.isArray.toString())) { if (shimPattern.test(Array.isArray.toString())) {
Feedback.send("NO_ISARRAY"); Feedback.send("NO_ISARRAY");

@ -13,6 +13,7 @@ define([
'/customize/application_config.js', '/customize/application_config.js',
'/api/config', '/api/config',
'/settings/make-backup.js', '/settings/make-backup.js',
'/common/common-feedback.js',
'/bower_components/file-saver/FileSaver.min.js', '/bower_components/file-saver/FileSaver.min.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
@ -32,7 +33,8 @@ define([
Cred, Cred,
AppConfig, AppConfig,
ApiConfig, ApiConfig,
Backup Backup,
Feedback
) )
{ {
var saveAs = window.saveAs; var saveAs = window.saveAs;
@ -88,6 +90,7 @@ define([
onClick: function () { onClick: function () {
var urls = common.getMetadataMgr().getPrivateData().accounts; var urls = common.getMetadataMgr().getPrivateData().accounts;
window.open(urls.upgradeURL); window.open(urls.upgradeURL);
Feedback.send('SUBSCRIPTION_BUTTON');
} }
} }
}; };

Loading…
Cancel
Save