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

pull/1/head
yflory 7 years ago
commit 3188ea3f35

@ -1,12 +1,4 @@
language: node_js
env:
matrix:
- "BROWSER='firefox::Windows 10'"
- "BROWSER='chrome::Windows 10'"
#- "BROWSER='MicrosoftEdge:14.14393:Windows 10'"
#- "BROWSER='internet explorer:11.103:Windows 10'"
#- "BROWSER='safari:10.0:macOS 10.12'"
#- "BROWSER='safari:9.0:OS X 10.11'"
branches:
only:
- master
@ -14,17 +6,6 @@ branches:
- staging
node_js:
- "6.6.0"
before_script:
script:
- npm run-script lint
- npm run-script flow
- cp config.example.js config.js
- npm install bower
- ./node_modules/bower/bin/bower install
- node ./server.js &
- sleep 2
addons:
sauce_connect:
username: "cjdelisle"
access_key:
secure: "pgGh8YGXLPq6fpdwwK2jnjRtwXPbVWQ/HIFvwX7E6HBpzxxcF2edE8sCdonWW9TP2LQisZFmVLqoSnZWMnjBr2CBAMKMFvaHQDJDQCo4v3BXkID7KgqyKmNcwW+FPfSJ5MxNBro8/GE/awkhZzJLYGUTS5zi/gVuIUwdi6cHI8s="i
tunnel_domains: localhost

@ -86,6 +86,7 @@ define([
};
var fixSelection = cursor.fixSelection = function (sel, range) {
try {
if (Tree.contains(Range.start.el, inner) && Tree.contains(Range.end.el, inner)) {
var order = Tree.orderOfNodes(Range.start.el, Range.end.el, inner);
var backward;
@ -118,6 +119,7 @@ define([
console.error(errText);
return errText;
}
} catch (e) { console.error(e); }
};
cursor.pushDelta = function (oldVal, newVal) {

@ -837,6 +837,7 @@ define([
var proxy = store.proxy;
var userObject = store.userObject = UserObject.init(proxy.drive, {
pinPads: Store.pinPads,
unpinPads: Store.unpinPads,
loggedIn: store.loggedIn,
log: function (msg) {
postMessage("DRIVE_LOG", msg);

@ -13,6 +13,9 @@ define([
};
module.init = function (config, exp, files) {
var unpinPads = config.unpinPads || function () {
console.error("unpinPads was not provided");
};
var pinPads = config.pinPads;
var loggedIn = config.loggedIn;
var workgroup = config.workgroup;
@ -83,11 +86,21 @@ define([
if (workgroup || (!loggedIn && !config.testMode)) { return; }
var filesList = exp.getFiles([ROOT, 'hrefArray', TRASH]);
var toClean = [];
exp.getFiles([FILES_DATA]).forEach(function (id) {
if (filesList.indexOf(id) === -1) {
var fd = exp.getFileData(id);
if (fd && fd.href) {
toClean.push(Hash.hrefToHexChannelId(fd.href));
}
spliceFileData(id);
}
});
if (!toClean.length) { return; }
unpinPads(toClean, function (response) {
if (response && response.error) { return console.error(response.error); }
// console.error(response);
});
};
var deleteHrefs = function (ids) {
ids.forEach(function (obj) {

Loading…
Cancel
Save