mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +03:00
Branding: User logo / logo title
This commit is contained in:
parent
56a11e5833
commit
86295f6e5b
11 changed files with 92 additions and 28 deletions
|
|
@ -39,6 +39,9 @@
|
|||
this.userLogo = ko.observable(Settings.settingsGet('UserLogo') || '');
|
||||
this.userLogo.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.userLogoTitle = ko.observable(Settings.settingsGet('UserLogoTitle') || '');
|
||||
this.userLogoTitle.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.loginDescription = ko.observable(Settings.settingsGet('LoginDescription'));
|
||||
this.loginDescription.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
|
|
@ -78,60 +81,67 @@
|
|||
_.delay(function () {
|
||||
|
||||
var
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.loginLogo.trigger, self),
|
||||
f4 = Utils.settingsSaveHelperSimpleFunction(self.loginDescription.trigger, self),
|
||||
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),
|
||||
f9 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageUrl.trigger, self),
|
||||
f10 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageDisplay.trigger, self)
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.loginLogo.trigger, self),
|
||||
f2 = Utils.settingsSaveHelperSimpleFunction(self.loginDescription.trigger, self),
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.loginCss.trigger, self),
|
||||
f4 = Utils.settingsSaveHelperSimpleFunction(self.userLogo.trigger, self),
|
||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.userLogoTitle.trigger, self),
|
||||
f6 = Utils.settingsSaveHelperSimpleFunction(self.loginBackground.trigger, self),
|
||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.userCss.trigger, self),
|
||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageUrl.trigger, self),
|
||||
f9 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageDisplay.trigger, self)
|
||||
;
|
||||
|
||||
self.loginLogo.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f3, {
|
||||
Remote.saveAdminConfig(f1, {
|
||||
'LoginLogo': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginBackground.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f7, {
|
||||
'LoginBackground': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.userLogo.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f6, {
|
||||
'UserLogo': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginDescription.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f4, {
|
||||
Remote.saveAdminConfig(f2, {
|
||||
'LoginDescription': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginCss.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f5, {
|
||||
Remote.saveAdminConfig(f3, {
|
||||
'LoginCss': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.userLogo.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f4, {
|
||||
'UserLogo': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.userLogoTitle.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f5, {
|
||||
'UserLogoTitle': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginBackground.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f6, {
|
||||
'LoginBackground': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.userCss.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f8, {
|
||||
Remote.saveAdminConfig(f7, {
|
||||
'UserCss': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.welcomePageUrl.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f9, {
|
||||
Remote.saveAdminConfig(f8, {
|
||||
'WelcomePageUrl': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.welcomePageDisplay.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f10, {
|
||||
Remote.saveAdminConfig(f9, {
|
||||
'WelcomePageDisplay': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -34,16 +34,25 @@
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.logoPlace {
|
||||
margin: -5px 10px 0 0;
|
||||
font-size: 25px;
|
||||
line-height: 30px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.audioPlace {
|
||||
|
||||
font-size: 25px;
|
||||
line-height: 30px;
|
||||
margin-right: 15px;
|
||||
margin-right: 10px;
|
||||
width: 25px;
|
||||
|
||||
.playIcon, .stopIcon {
|
||||
cursor: pointer;
|
||||
color: orange;
|
||||
text-shadow: 0 1px 0 #555;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.playIcon {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
{
|
||||
AbstractView.call(this, 'Right', 'SystemDropDown');
|
||||
|
||||
this.logoImg = Utils.trim(Settings.settingsGet('UserLogo'));
|
||||
this.logoTitle = Utils.trim(Settings.settingsGet('UserLogoTitle'));
|
||||
|
||||
this.currentAudio = AppStore.currentAudio;
|
||||
|
||||
this.accountEmail = AccountStore.email;
|
||||
|
|
|
|||
|
|
@ -1299,6 +1299,7 @@ class Actions
|
|||
'LoginBackground' => '',
|
||||
'LoginCss' => '',
|
||||
'UserLogo' => '',
|
||||
'UserLogoTitle' => '',
|
||||
'UserCss' => '',
|
||||
'WelcomePageUrl' => '',
|
||||
'WelcomePageDisplay' => 'none',
|
||||
|
|
@ -1390,6 +1391,7 @@ class Actions
|
|||
$aResult['LoginDescription'] = $oConfig->Get('branding', 'login_desc', '');
|
||||
$aResult['LoginPowered'] = !!$oConfig->Get('branding', 'login_powered', true);
|
||||
$aResult['UserLogo'] = $oConfig->Get('branding', 'user_logo', '');
|
||||
$aResult['UserLogoTitle'] = $oConfig->Get('branding', 'user_logo_title', '');
|
||||
$aResult['UserCss'] = $oConfig->Get('branding', 'user_css', '');
|
||||
$aResult['WelcomePageUrl'] = $oConfig->Get('branding', 'welcome_page_url', '');
|
||||
$aResult['WelcomePageDisplay'] = \strtolower($oConfig->Get('branding', 'welcome_page_display', 'none'));
|
||||
|
|
@ -3531,7 +3533,7 @@ class Actions
|
|||
|
||||
if ($this->HasOneOfActionParams(array(
|
||||
'LoginLogo', 'LoginBackground', 'LoginDescription', 'LoginCss', 'LoginPowered',
|
||||
'UserLogo', 'UserCss',
|
||||
'UserLogo', 'UserLogoTitle', 'UserCss',
|
||||
'WelcomePageUrl', 'WelcomePageDisplay'
|
||||
)) && $this->PremType())
|
||||
{
|
||||
|
|
@ -3542,6 +3544,7 @@ class Actions
|
|||
$this->setConfigFromParams($oConfig, 'LoginPowered', 'branding', 'login_powered', 'bool');
|
||||
|
||||
$this->setConfigFromParams($oConfig, 'UserLogo', 'branding', 'user_logo', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'UserLogoTitle', 'branding', 'user_logo_title', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'UserCss', 'branding', 'user_css', 'string');
|
||||
|
||||
$this->setConfigFromParams($oConfig, 'WelcomePageUrl', 'branding', 'welcome_page_url', 'string');
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
'login_css' => array(''),
|
||||
'login_powered' => array(true),
|
||||
'user_logo' => array(''),
|
||||
'user_logo_title' => array(''),
|
||||
'user_css' => array(''),
|
||||
'welcome_page_url' => array(''),
|
||||
'welcome_page_display' => array('none')
|
||||
|
|
|
|||
|
|
@ -126,6 +126,35 @@
|
|||
<div class="tab-pane" id="branding-user-section-id">
|
||||
|
||||
<div class="form-horizontal" data-bind="css: {'disabled-form': !capa()}">
|
||||
<div class="control-group">
|
||||
<label class="control-label" data-i18n="TAB_BRANDING/LABEL_USER_LOGO"></label>
|
||||
<div class="controls">
|
||||
<div data-bind="component: {
|
||||
name: 'Input',
|
||||
params: {
|
||||
value: userLogo,
|
||||
trigger: userLogo.trigger,
|
||||
placeholder: 'https://',
|
||||
size: 5,
|
||||
enable: capa
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" data-i18n="TAB_BRANDING/LABEL_USER_LOGO_TITLE"></label>
|
||||
<div class="controls">
|
||||
<div data-bind="component: {
|
||||
name: 'Input',
|
||||
params: {
|
||||
value: userLogoTitle,
|
||||
trigger: userLogoTitle.trigger,
|
||||
size: 5,
|
||||
enable: capa
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" data-i18n="TAB_BRANDING/LABEL_USER_CUSTOM_CSS"></label>
|
||||
<div class="controls">
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@
|
|||
<i class="stopIcon icon-pause"></i>
|
||||
</div>
|
||||
|
||||
<div class="logoPlace pull-right" data-bind="if: logoImg">
|
||||
<img style="height: 99%" data-tooltip-i18n="off" data-tooltip-mobile="on" data-tooltip-join="right"
|
||||
data-bind="attr: { 'src': logoImg }, tooltip: logoTitle" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -60,6 +60,7 @@ LABEL_LOGIN_CUSTOM_CSS = "Benutzerdefiniertes CSS"
|
|||
LABEL_LOGIN_SHOW_POWERED_LINK = "\"Powered by RainLoop\"-Link anzeigen"
|
||||
LEGEND_USER = "Benutzer"
|
||||
LABEL_USER_LOGO = "Logo"
|
||||
LABEL_USER_LOGO_TITLE = "Logo Title"
|
||||
LABEL_USER_CUSTOM_CSS = "Benutzerdefiniertes CSS"
|
||||
LEGEND_WELCOME_PAGE = "Willkommensseite"
|
||||
LABEL_WELCOME_PAGE_TITLE = "Titel"
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ LABEL_LOGIN_CUSTOM_CSS = "Custom CSS"
|
|||
LABEL_LOGIN_SHOW_POWERED_LINK = "Show \"Powered by RainLoop\" link"
|
||||
LEGEND_USER = "User"
|
||||
LABEL_USER_LOGO = "Logo"
|
||||
LABEL_USER_LOGO_TITLE = "Logo Title"
|
||||
LABEL_USER_CUSTOM_CSS = "Custom CSS"
|
||||
LEGEND_WELCOME_PAGE = "Welcome page"
|
||||
LABEL_WELCOME_PAGE_TITLE = "Title"
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ LABEL_LOGIN_CUSTOM_CSS = "CSS personalizado"
|
|||
LABEL_LOGIN_SHOW_POWERED_LINK = "Mostrar link \"Powered by RainLoop\""
|
||||
LEGEND_USER = "Internas"
|
||||
LABEL_USER_LOGO = "Logo"
|
||||
LABEL_USER_LOGO_TITLE = "Logo Title"
|
||||
LABEL_USER_CUSTOM_CSS = "CSS personalizado"
|
||||
LEGEND_WELCOME_PAGE = "Página de boas-vindas"
|
||||
LABEL_WELCOME_PAGE_TITLE = "Título"
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ LABEL_LOGIN_CUSTOM_CSS = "Кастомный CSS"
|
|||
LABEL_LOGIN_SHOW_POWERED_LINK = "Показывать ссылку \"Powered by RainLoop\""
|
||||
LEGEND_USER = "Экран пользователя"
|
||||
LABEL_USER_LOGO = "Логотип"
|
||||
LABEL_USER_LOGO_TITLE = "Название логотипа"
|
||||
LABEL_USER_CUSTOM_CSS = "Кастомный CSS"
|
||||
LEGEND_WELCOME_PAGE = "Приветствие"
|
||||
LABEL_WELCOME_PAGE_TITLE = "Название"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue