Remove some XXX

pull/1/head
yflory 5 years ago
parent aaed0b939e
commit 44edbf8b39

@ -304,7 +304,6 @@ define([
Messages.fm_forbidden : Messages.error; Messages.fm_forbidden : Messages.error;
return void UI.warn(text); return void UI.warn(text);
} }
// XXX add the pad to the team drive
var isTemplate = priv.isTemplate || data.isTemplate; var isTemplate = priv.isTemplate || data.isTemplate;
toAddTeams.forEach(function (obj) { toAddTeams.forEach(function (obj) {
sframeChan.query('Q_STORE_IN_TEAM', { sframeChan.query('Q_STORE_IN_TEAM', {
@ -505,7 +504,6 @@ define([
if (data.href || data.roHref) { if (data.href || data.roHref) {
parsed = Hash.parsePadUrl(data.href || data.roHref); parsed = Hash.parsePadUrl(data.href || data.roHref);
} }
// XXX Teams owner: transfer ownership
if (owned && data.roHref && parsed.type !== 'drive' && parsed.hashData.type === 'pad') { if (owned && data.roHref && parsed.type !== 'drive' && parsed.hashData.type === 'pad') {
var manageOwners = h('button.no-margin', Messages.owner_openModalButton); var manageOwners = h('button.no-margin', Messages.owner_openModalButton);
$(manageOwners).click(function () { $(manageOwners).click(function () {

@ -838,7 +838,6 @@ define([
postMessage('GET_PAD_METADATA', data, cb); postMessage('GET_PAD_METADATA', data, cb);
}; };
// XXX Teams: change the password of a pad owned by the team
common.changePadPassword = function (Crypt, Crypto, data, cb) { common.changePadPassword = function (Crypt, Crypto, data, cb) {
var href = data.href; var href = data.href;
var newPassword = data.password; var newPassword = data.password;

@ -36,31 +36,7 @@ define([
}; };
window.addEventListener('message', onMsg); window.addEventListener('message', onMsg);
}).nThen(function (/*waitFor*/) { }).nThen(function (/*waitFor*/) {
var teamId; // XXX var teamId;
var afterSecrets = function (Cryptpad, Utils, secret, cb) {
return void cb();
/*
var hash = window.location.hash.slice(1);
if (hash && Utils.LocalStore.isLoggedIn()) {
return; // XXX How to add a shared folder?
// Add a shared folder!
Cryptpad.addSharedFolder(teamId, secret, function (id) {
window.CryptPad_newSharedFolder = id;
cb();
});
return;
} else if (hash) {
var id = Utils.Util.createRandomInteger();
window.CryptPad_newSharedFolder = id;
var data = {
href: Utils.Hash.getRelativeHref(window.location.href),
password: secret.password
};
return void Cryptpad.loadSharedFolder(id, data, cb);
}
cb();
*/
};
var addRpc = function (sframeChan, Cryptpad) { var addRpc = function (sframeChan, Cryptpad) {
sframeChan.on('Q_SET_TEAM', function (data, cb) { sframeChan.on('Q_SET_TEAM', function (data, cb) {
teamId = data; teamId = data;
@ -72,11 +48,6 @@ define([
data.teamId = teamId; data.teamId = teamId;
Cryptpad.userObjectCommand(data, cb); Cryptpad.userObjectCommand(data, cb);
}); });
// XXX no drive restore in teams? you could restore old keys...
/*sframeChan.on('Q_DRIVE_RESTORE', function (data, cb) {
data.teamId = teamId;
Cryptpad.restoreDrive(data, cb);
});*/
sframeChan.on('Q_DRIVE_GETOBJECT', function (data, cb) { sframeChan.on('Q_DRIVE_GETOBJECT', function (data, cb) {
if (!teamId) { return void cb({error: 'EINVAL'}); } if (!teamId) { return void cb({error: 'EINVAL'}); }
if (data && data.sharedFolder) { if (data && data.sharedFolder) {
@ -109,7 +80,6 @@ define([
}); });
}; };
SFCommonO.start({ SFCommonO.start({
afterSecrets: afterSecrets,
noHash: true, noHash: true,
noRealtime: true, noRealtime: true,
//driveEvents: true, //driveEvents: true,

Loading…
Cancel
Save