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
}, function (obj) {
if (obj && obj.error) { return void cb(obj.error); }
Feedback.send('LOGOUT_EVERYWHERE');
cb();
});
};
@ -118,7 +119,14 @@ define([
};
// Settings
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
common.userObjectCommand = function (data, cb) {
@ -1099,6 +1107,14 @@ define([
return doesSupport;
};
common.isWebRTCSupported = function () {
return navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia ||
window.RTCPeerConnection;
};
common.ready = (function () {
var env = {};
var initialized = false;
@ -1114,6 +1130,10 @@ define([
Feedback.send("NO_PROXIES");
}
if (!common.isWebRTCSupported()) {
Feedback.send("NO_WEBRTC");
}
var shimPattern = /CRYPTPAD_SHIM/;
if (shimPattern.test(Array.isArray.toString())) {
Feedback.send("NO_ISARRAY");

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

Loading…
Cancel
Save