mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Added Allow/Disallow multiple identities
This commit is contained in:
parent
28d93f70ae
commit
2f482a6288
49 changed files with 32740 additions and 32243 deletions
|
|
@ -37,6 +37,7 @@
|
|||
this.capaUserBackground = CapaAdminStore.userBackground;
|
||||
this.capaGravatar = CapaAdminStore.gravatar;
|
||||
this.capaAdditionalAccounts = CapaAdminStore.additionalAccounts;
|
||||
this.capaIdentities = CapaAdminStore.identities;
|
||||
this.capaAttachmentThumbnails = CapaAdminStore.attachmentThumbnails;
|
||||
this.capaTemplates = CapaAdminStore.templates;
|
||||
|
||||
|
|
@ -136,6 +137,12 @@
|
|||
});
|
||||
});
|
||||
|
||||
self.capaIdentities.subscribe(function (bValue) {
|
||||
Remote.saveAdminConfig(null, {
|
||||
'CapaIdentities': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
self.capaTemplates.subscribe(function (bValue) {
|
||||
Remote.saveAdminConfig(null, {
|
||||
'CapaTemplates': bValue ? '1' : '0'
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
function AccountsUserSettings()
|
||||
{
|
||||
this.allowAdditionalAccount = Settings.capa(Enums.Capa.AdditionalAccounts);
|
||||
this.allowIdentities = true;
|
||||
this.allowIdentities = Settings.capa(Enums.Capa.Identities);;
|
||||
|
||||
this.accounts = AccountStore.accounts;
|
||||
this.identities = IdentityStore.identities;
|
||||
|
|
|
|||
|
|
@ -16,9 +16,12 @@
|
|||
AppStore = require('Stores/User/App'),
|
||||
LanguageStore = require('Stores/Language'),
|
||||
SettingsStore = require('Stores/User/Settings'),
|
||||
IdentityStore = require('Stores/User/Identity'),
|
||||
NotificationStore = require('Stores/User/Notification'),
|
||||
MessageStore = require('Stores/User/Message'),
|
||||
|
||||
Settings = require('Storage/Settings'),
|
||||
|
||||
Remote = require('Remote/User/Ajax')
|
||||
;
|
||||
|
||||
|
|
@ -62,6 +65,20 @@
|
|||
|
||||
this.isAnimationSupported = Globals.bAnimationSupported;
|
||||
|
||||
this.identities = IdentityStore.identities;
|
||||
|
||||
this.identityMain = ko.computed(function () {
|
||||
var aList = this.identities();
|
||||
return Utils.isArray(aList) ? _.find(aList, function (oItem) {
|
||||
return oItem && '' === oItem.id() ? true : false;
|
||||
}) : null;
|
||||
}, this);
|
||||
|
||||
this.identityMainDesc = ko.computed(function () {
|
||||
var oIdentity = this.identityMain();
|
||||
return oIdentity ? oIdentity.formattedName() : '---';
|
||||
}, this);
|
||||
|
||||
this.editorDefaultTypes = ko.computed(function () {
|
||||
Translator.trigger();
|
||||
return [
|
||||
|
|
@ -82,6 +99,15 @@
|
|||
}, this);
|
||||
}
|
||||
|
||||
GeneralUserSettings.prototype.editMainIdentity = function ()
|
||||
{
|
||||
var oIdentity = this.identityMain();
|
||||
if (oIdentity)
|
||||
{
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Identity'), [oIdentity]);
|
||||
}
|
||||
};
|
||||
|
||||
GeneralUserSettings.prototype.testSoundNotification = function ()
|
||||
{
|
||||
NotificationStore.playSoundNotification(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue