mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 06:57:03 +03:00
Added individual signatures for every identity.
This commit is contained in:
parent
996703311b
commit
1119022916
45 changed files with 1353 additions and 337 deletions
|
|
@ -7,9 +7,7 @@
|
|||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Settings = require('Storage/Settings'),
|
||||
|
||||
Remote = require('Storage/User/Remote')
|
||||
Settings = require('Storage/Settings')
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
@ -26,24 +24,10 @@
|
|||
this.accounts = ko.observableArray([]);
|
||||
this.accounts.loading = ko.observable(false).extend({'throttle': 100});
|
||||
|
||||
this.accountsEmailNames = ko.observableArray([]).extend({'throttle': 1000});
|
||||
this.accountsEmailNames.skipFirst = true;
|
||||
|
||||
this.accounts.subscribe(function (aList) {
|
||||
this.accountsEmailNames(_.compact(_.map(aList, function (oItem) {
|
||||
this.accountsEmails = ko.computed(function () {
|
||||
return _.compact(_.map(this.accounts(), function (oItem) {
|
||||
return oItem ? oItem.email : null;
|
||||
})));
|
||||
}, this);
|
||||
|
||||
this.accountsEmailNames.subscribe(function (aList) {
|
||||
if (this.accountsEmailNames.skipFirst)
|
||||
{
|
||||
this.accountsEmailNames.skipFirst = false;
|
||||
}
|
||||
else if (aList && 1 < aList.length)
|
||||
{
|
||||
Remote.accountSortOrder(null, aList);
|
||||
}
|
||||
}));
|
||||
}, this);
|
||||
|
||||
this.accountsUnreadCount = ko.computed(function () {
|
||||
|
|
@ -65,10 +49,6 @@
|
|||
AccountUserStore.prototype.populate = function ()
|
||||
{
|
||||
this.email(Settings.settingsGet('Email'));
|
||||
// this.incLogin(Settings.settingsGet('IncLogin'));
|
||||
// this.outLogin(Settings.settingsGet('OutLogin'));
|
||||
|
||||
// this.signature(Settings.settingsGet('Signature'));
|
||||
};
|
||||
|
||||
module.exports = new AccountUserStore();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko')
|
||||
;
|
||||
|
||||
|
|
@ -14,6 +15,12 @@
|
|||
{
|
||||
this.identities = ko.observableArray([]);
|
||||
this.identities.loading = ko.observable(false).extend({'throttle': 100});
|
||||
|
||||
this.identitiesIDS = ko.computed(function () {
|
||||
return _.compact(_.map(this.identities(), function (oItem) {
|
||||
return oItem ? oItem.id : null;
|
||||
}));
|
||||
}, this);
|
||||
}
|
||||
|
||||
module.exports = new IdentityUserStore();
|
||||
|
|
|
|||
44
dev/Stores/User/Template.js
Normal file
44
dev/Stores/User/Template.js
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Remote = require('Storage/User/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function TemplateUserStore()
|
||||
{
|
||||
this.templates = ko.observableArray([]);
|
||||
this.templates.loading = ko.observable(false).extend({'throttle': 100});
|
||||
|
||||
this.templatesNames = ko.observableArray([]).extend({'throttle': 1000});
|
||||
this.templatesNames.skipFirst = true;
|
||||
|
||||
this.templates.subscribe(function (aList) {
|
||||
this.templatesNames(_.compact(_.map(aList, function (oItem) {
|
||||
return oItem ? oItem.name : null;
|
||||
})));
|
||||
}, this);
|
||||
|
||||
this.templatesNames.subscribe(function (aList) {
|
||||
if (this.templatesNames.skipFirst)
|
||||
{
|
||||
this.templatesNames.skipFirst = false;
|
||||
}
|
||||
else if (aList && 1 < aList.length)
|
||||
{
|
||||
Remote.templatesSortOrder(null, aList);
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
|
||||
module.exports = new TemplateUserStore();
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue