Change default settings for hidden hash
parent
4d2538c796
commit
243abc3e53
|
@ -32,6 +32,16 @@ define([
|
|||
NetConfig, AppConfig,
|
||||
Crypto, ChainPad, CpNetflux, Listmap, nThen, Saferphore) {
|
||||
|
||||
// Default settings for new users
|
||||
var NEW_USER_SETTINGS = {
|
||||
drive: {
|
||||
hideDuplicate: true
|
||||
},
|
||||
general: {
|
||||
allowUserFeedback: true // XXX corner popup in settings?
|
||||
}
|
||||
};
|
||||
|
||||
var create = function () {
|
||||
var Store = window.Cryptpad_Store = {};
|
||||
var postMessage = function () {};
|
||||
|
@ -2270,7 +2280,7 @@ define([
|
|||
if (!store.loggedIn) { return void cb(); }
|
||||
Store.pinPads(null, data, cb);
|
||||
};
|
||||
if (!proxy.settings) { proxy.settings = {}; }
|
||||
if (!proxy.settings) { proxy.settings = NEW_USER_SETTINGS; }
|
||||
if (!proxy.friends_pending) { proxy.friends_pending = {}; }
|
||||
var manager = store.manager = ProxyManager.create(proxy.drive, {
|
||||
onSync: function (cb) { onSync(null, cb); },
|
||||
|
@ -2355,13 +2365,7 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
if (!proxy.settings || !proxy.settings.general ||
|
||||
typeof(proxy.settings.general.allowUserFeedback) !== 'boolean') {
|
||||
proxy.settings = proxy.settings || {};
|
||||
proxy.settings.general = proxy.settings.general || {};
|
||||
proxy.settings.general.allowUserFeedback = true;
|
||||
}
|
||||
returned.feedback = proxy.settings.general.allowUserFeedback;
|
||||
returned.feedback = Util.find(proxy, ['settings', 'general', 'allowUserFeedback']);
|
||||
Feedback.init(returned.feedback);
|
||||
|
||||
if (typeof(cb) === 'function') { cb(returned); }
|
||||
|
|
Loading…
Reference in New Issue