Make automatic pad storage configurable

This commit is contained in:
yflory
2018-08-28 11:42:48 +02:00
parent e8a5244362
commit 9ebb598467
13 changed files with 288 additions and 82 deletions

View File

@@ -767,12 +767,11 @@ define([
if (!contains) {
var autoStore = Util.find(store.proxy, ['settings', 'general', 'autostore']);
if (autoStore !== 1 && !data.forceSave && !data.path) {
// XXX
// send event to inner to display the corner popup
postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", {
autoStore: autoStore
});
return void cb({error: "EAUTH"});
return void cb();
} else {
var roHref;
if (h.mode === "view") {

View File

@@ -17,6 +17,7 @@ define([
var path = file.path;
var password = file.password;
var forceSave = file.forceSave;
var hash, secret, key, id, href;
var getNewHash = function () {
@@ -94,7 +95,7 @@ define([
password: password,
channel: id,
owners: metadata.owners,
// XXX FORCESAVE ??
forceSave: forceSave
};
common.setPadTitle(data, function (err) {
if (err) { return void console.error(err); }