mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Welcome page branding option
This commit is contained in:
parent
acb013fbb5
commit
351c12c002
50 changed files with 531 additions and 160 deletions
|
|
@ -7,7 +7,8 @@
|
|||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Common/Utils')
|
||||
Utils = require('Common/Utils'),
|
||||
Translator = require('Common/Translator')
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
@ -47,6 +48,21 @@
|
|||
this.userCss = ko.observable(Settings.settingsGet('UserCss'));
|
||||
this.userCss.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.welcomePageUrl = ko.observable(Settings.settingsGet('WelcomePageUrl'));
|
||||
this.welcomePageUrl.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.welcomePageDisplay = ko.observable(Settings.settingsGet('WelcomePageDisplay'));
|
||||
this.welcomePageDisplay.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.welcomePageDisplay.options = ko.computed(function () {
|
||||
Translator.trigger();
|
||||
return [
|
||||
{'optValue': 'none', 'optText': Translator.i18n('TAB_BRANDING/OPTION_WELCOME_PAGE_DISPLAY_NONE')},
|
||||
{'optValue': 'once', 'optText': Translator.i18n('TAB_BRANDING/OPTION_WELCOME_PAGE_DISPLAY_ONCE')},
|
||||
{'optValue': 'always', 'optText': Translator.i18n('TAB_BRANDING/OPTION_WELCOME_PAGE_DISPLAY_ALWAYS')}
|
||||
];
|
||||
});
|
||||
|
||||
this.loginPowered = ko.observable(!!Settings.settingsGet('LoginPowered'));
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +85,9 @@
|
|||
f5 = Utils.settingsSaveHelperSimpleFunction(self.loginCss.trigger, self),
|
||||
f6 = Utils.settingsSaveHelperSimpleFunction(self.userLogo.trigger, self),
|
||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.loginBackground.trigger, self),
|
||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.userCss.trigger, self)
|
||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.userCss.trigger, self),
|
||||
f9 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageUrl.trigger, self),
|
||||
f10 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageDisplay.trigger, self)
|
||||
;
|
||||
|
||||
self.title.subscribe(function (sValue) {
|
||||
|
|
@ -120,6 +138,18 @@
|
|||
});
|
||||
});
|
||||
|
||||
self.welcomePageUrl.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f9, {
|
||||
'WelcomePageUrl': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.welcomePageDisplay.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f10, {
|
||||
'WelcomePageDisplay': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginPowered.subscribe(function (bValue) {
|
||||
Remote.saveAdminConfig(null, {
|
||||
'LoginPowered': bValue ? '1' : '0'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue