mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Added additiona setting for google drive integration
This commit is contained in:
parent
430d36a648
commit
aabed21b19
17 changed files with 136 additions and 49 deletions
|
|
@ -20,6 +20,9 @@
|
|||
Settings = require('Storage/Settings')
|
||||
;
|
||||
|
||||
this.capa = !!Settings.capa(Enums.Capa.Prem);
|
||||
this.capa = true;
|
||||
|
||||
this.title = ko.observable(Settings.settingsGet('Title'));
|
||||
this.title.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
|
|
@ -43,47 +46,50 @@
|
|||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
_.delay(function () {
|
||||
if (this.capa)
|
||||
{
|
||||
_.delay(function () {
|
||||
|
||||
var
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.title.trigger, self),
|
||||
f2 = Utils.settingsSaveHelperSimpleFunction(self.loadingDesc.trigger, self),
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.loginLogo.trigger, self),
|
||||
f4 = Utils.settingsSaveHelperSimpleFunction(self.loginDescription.trigger, self),
|
||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.loginCss.trigger, self)
|
||||
;
|
||||
var
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.title.trigger, self),
|
||||
f2 = Utils.settingsSaveHelperSimpleFunction(self.loadingDesc.trigger, self),
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.loginLogo.trigger, self),
|
||||
f4 = Utils.settingsSaveHelperSimpleFunction(self.loginDescription.trigger, self),
|
||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.loginCss.trigger, self)
|
||||
;
|
||||
|
||||
self.title.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f1, {
|
||||
'Title': Utils.trim(sValue)
|
||||
self.title.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f1, {
|
||||
'Title': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
self.loadingDesc.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f2, {
|
||||
'LoadingDescription': Utils.trim(sValue)
|
||||
self.loadingDesc.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f2, {
|
||||
'LoadingDescription': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
self.loginLogo.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f3, {
|
||||
'LoginLogo': Utils.trim(sValue)
|
||||
self.loginLogo.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f3, {
|
||||
'LoginLogo': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
self.loginDescription.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f4, {
|
||||
'LoginDescription': Utils.trim(sValue)
|
||||
self.loginDescription.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f4, {
|
||||
'LoginDescription': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
self.loginCss.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f5, {
|
||||
'LoginCss': Utils.trim(sValue)
|
||||
self.loginCss.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f5, {
|
||||
'LoginCss': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
}, 50);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = BrandingAdminSetting;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
this.googleClientID = Data.googleClientID;
|
||||
this.googleApiKey = Data.googleApiKey;
|
||||
this.googleClientSecret = Data.googleClientSecret;
|
||||
|
||||
|
||||
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger3 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
|
@ -116,6 +116,18 @@
|
|||
});
|
||||
});
|
||||
|
||||
self.googleEnable.auth.subscribe(function (bValue) {
|
||||
Remote.saveAdminConfig(Utils.emptyFunction, {
|
||||
'GoogleEnableAuth': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
self.googleEnable.drive.subscribe(function (bValue) {
|
||||
Remote.saveAdminConfig(Utils.emptyFunction, {
|
||||
'GoogleEnableDrive': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
self.googleClientID.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f5, {
|
||||
'GoogleClientID': Utils.trim(sValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue