mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
parent
07b0f20305
commit
d3ee36bb97
68 changed files with 629 additions and 392 deletions
16
dev/Admin/About.js
Normal file
16
dev/Admin/About.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminAbout()
|
||||
{
|
||||
this.version = ko.observable(RL.settingsGet('Version'));
|
||||
}
|
||||
|
||||
Utils.addSettingsViewModel(AdminAbout, 'AdminSettingsAbout', 'About', 'about');
|
||||
|
||||
//AdminAbout.prototype.onBuild = function ()
|
||||
//{
|
||||
//
|
||||
//};
|
||||
|
|
@ -13,11 +13,11 @@ function AdminGeneral()
|
|||
this.language = oData.language;
|
||||
this.theme = oData.theme;
|
||||
|
||||
this.allowThemes = oData.allowThemes;
|
||||
this.allowLanguagesOnSettings = oData.allowLanguagesOnSettings;
|
||||
this.allowAdditionalAccounts = oData.allowAdditionalAccounts;
|
||||
this.allowIdentities = oData.allowIdentities;
|
||||
this.allowGravatar = oData.allowGravatar;
|
||||
this.capaThemes = oData.capaThemes;
|
||||
this.capaGravatar = oData.capaGravatar;
|
||||
this.capaAdditionalAccounts = oData.capaAdditionalAccounts;
|
||||
this.capaAdditionalIdentities = oData.capaAdditionalIdentities;
|
||||
|
||||
this.themesOptions = ko.computed(function () {
|
||||
return _.map(oData.themes(), function (sTheme) {
|
||||
|
|
@ -62,27 +62,27 @@ AdminGeneral.prototype.onBuild = function ()
|
|||
});
|
||||
});
|
||||
|
||||
self.allowAdditionalAccounts.subscribe(function (bValue) {
|
||||
self.capaAdditionalAccounts.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(null, {
|
||||
'AllowAdditionalAccounts': bValue ? '1' : '0'
|
||||
'CapaAdditionalAccounts': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
self.allowIdentities.subscribe(function (bValue) {
|
||||
self.capaAdditionalIdentities.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(null, {
|
||||
'AllowIdentities': bValue ? '1' : '0'
|
||||
'CapaAdditionalIdentities': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
self.allowGravatar.subscribe(function (bValue) {
|
||||
self.capaGravatar.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(null, {
|
||||
'AllowGravatar': bValue ? '1' : '0'
|
||||
'CapaGravatar': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
self.allowThemes.subscribe(function (bValue) {
|
||||
self.capaThemes.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(null, {
|
||||
'AllowThemes': bValue ? '1' : '0'
|
||||
'CapaThemes': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
function AdminSecurity()
|
||||
{
|
||||
this.csrfProtection = ko.observable(!!RL.settingsGet('UseTokenProtection'));
|
||||
this.openPGP = ko.observable(!!RL.settingsGet('OpenPGP'));
|
||||
this.allowTwoFactorAuth = ko.observable(!!RL.settingsGet('AllowTwoFactorAuth'));
|
||||
this.capaOpenPGP = ko.observable(RL.capa(Enums.Capa.OpenPGP));
|
||||
this.capaTwoFactorAuth = ko.observable(RL.capa(Enums.Capa.TwoFactor));
|
||||
|
||||
this.adminLogin = ko.observable(RL.settingsGet('AdminLogin'));
|
||||
this.adminPassword = ko.observable('');
|
||||
|
|
@ -84,15 +84,15 @@ AdminSecurity.prototype.onBuild = function ()
|
|||
});
|
||||
});
|
||||
|
||||
this.openPGP.subscribe(function (bValue) {
|
||||
this.capaOpenPGP.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||
'OpenPGP': bValue ? '1' : '0'
|
||||
'CapaOpenPGP': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
this.allowTwoFactorAuth.subscribe(function (bValue) {
|
||||
this.capaTwoFactorAuth.subscribe(function (bValue) {
|
||||
RL.remote().saveAdminConfig(Utils.emptyFunction, {
|
||||
'AllowTwoFactorAuth': bValue ? '1' : '0'
|
||||
'CapaTwoFactorAuth': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue