2015-01-27 05:06:00 +08:00
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var
|
|
|
|
ko = require('ko'),
|
|
|
|
|
2015-02-03 07:58:58 +08:00
|
|
|
Settings = require('Storage/Settings'),
|
2015-02-06 23:26:20 +08:00
|
|
|
|
2015-02-03 07:58:58 +08:00
|
|
|
AppStore = require('Stores/App')
|
2015-01-27 05:06:00 +08:00
|
|
|
;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
function AppUserStore()
|
|
|
|
{
|
2015-02-03 07:58:58 +08:00
|
|
|
AppStore.call(this);
|
|
|
|
|
|
|
|
this.projectHash = ko.observable('');
|
|
|
|
this.threadsAllowed = ko.observable(false);
|
2015-01-27 05:06:00 +08:00
|
|
|
|
2015-02-22 06:00:51 +08:00
|
|
|
this.composeInEdit = ko.observable(false);
|
|
|
|
|
2015-01-27 05:06:00 +08:00
|
|
|
this.contactsAutosave = ko.observable(false);
|
|
|
|
this.useLocalProxyForExternalImages = ko.observable(false);
|
|
|
|
|
|
|
|
this.contactsIsAllowed = ko.observable(false);
|
|
|
|
|
2015-02-03 07:58:58 +08:00
|
|
|
this.devEmail = '';
|
|
|
|
this.devPassword = '';
|
2015-01-27 05:06:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
AppUserStore.prototype.populate = function()
|
|
|
|
{
|
2015-02-03 07:58:58 +08:00
|
|
|
AppStore.prototype.populate.call(this);
|
|
|
|
|
|
|
|
this.projectHash(Settings.settingsGet('ProjectHash'));
|
2015-01-27 05:06:00 +08:00
|
|
|
|
2015-02-06 23:26:20 +08:00
|
|
|
this.contactsAutosave(!!Settings.settingsGet('ContactsAutosave'));
|
2015-01-27 05:06:00 +08:00
|
|
|
this.useLocalProxyForExternalImages(!!Settings.settingsGet('UseLocalProxyForExternalImages'));
|
2015-02-06 23:26:20 +08:00
|
|
|
|
2015-01-27 05:06:00 +08:00
|
|
|
this.contactsIsAllowed(!!Settings.settingsGet('ContactsIsAllowed'));
|
2015-02-03 07:58:58 +08:00
|
|
|
|
|
|
|
this.devEmail = Settings.settingsGet('DevEmail');
|
|
|
|
this.devPassword = Settings.settingsGet('DevPassword');
|
2015-01-27 05:06:00 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = new AppUserStore();
|
|
|
|
|
|
|
|
}());
|