Ability to burn an anonymous drive from the browser

This commit is contained in:
yflory
2017-11-23 14:36:42 +01:00
parent 4b5abdecbe
commit 9795ac32cb
5 changed files with 40 additions and 5 deletions

View File

@@ -43,11 +43,20 @@ define([
Utils.LocalStore.getFSHash();
return Utils.Hash.getSecrets('drive', hash);
};
var addRpc = function (sframeChan, Cryptpad, Utils) {
sframeChan.on('EV_BURN_ANON_DRIVE', function () {
if (Utils.LocalStore.isLoggedIn()) { return; }
Utils.LocalStore.setFSHash('');
Utils.LocalStore.clearThumbnail();
window.location.reload();
});
};
Netflux.connect(NetConfig.getWebsocketURL()).then(function (network) {
SFCommonO.start({
getSecrets: getSecrets,
newNetwork: network,
noHash: true
noHash: true,
addRpc: addRpc
});
}, function (err) { console.error(err); });
});