mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Added a new theme (Rain Drops)
Added a "video-on-login-screen" plugin Added a few branding settings
This commit is contained in:
parent
0735071f1c
commit
67c5e31e58
32 changed files with 971 additions and 30 deletions
|
|
@ -1058,11 +1058,15 @@ class Actions
|
|||
'Title' => 'RainLoop Webmail',
|
||||
'LoadingDescription' => 'RainLoop',
|
||||
'LoadingDescriptionEsc' => 'RainLoop',
|
||||
'LoginLogo' => '',
|
||||
'LoginDescription' => '',
|
||||
'LoginCss' => '',
|
||||
'LoginPowered' => true,
|
||||
'LoginLogo' => '',
|
||||
'LoginBackground' => '',
|
||||
'LoginCss' => '',
|
||||
'UserLogo' => '',
|
||||
'UserCss' => '',
|
||||
'IncludeCss' => '',
|
||||
'IncludeBackground' => '',
|
||||
'Token' => $oConfig->Get('security', 'csrf_protection', false) ? \RainLoop\Utils::GetCsrfToken() : '',
|
||||
'InIframe' => (bool) $oConfig->Get('labs', 'in_iframe', false),
|
||||
'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true),
|
||||
|
|
@ -1120,10 +1124,12 @@ class Actions
|
|||
$aResult['LoadingDescription'] = $oConfig->Get('webmail', 'loading_description', '');
|
||||
|
||||
$aResult['LoginLogo'] = $oConfig->Get('branding', 'login_logo', '');
|
||||
$aResult['LoginDescription'] = $oConfig->Get('branding', 'login_desc', '');
|
||||
$aResult['LoginBackground'] = $oConfig->Get('branding', 'login_background', '');
|
||||
$aResult['LoginCss'] = $oConfig->Get('branding', 'login_css', '');
|
||||
$aResult['LoginDescription'] = $oConfig->Get('branding', 'login_desc', '');
|
||||
$aResult['LoginPowered'] = !!$oConfig->Get('branding', 'login_powered', true);
|
||||
$aResult['UserLogo'] = $oConfig->Get('branding', 'user_logo', '');
|
||||
$aResult['UserCss'] = $oConfig->Get('branding', 'user_css', '');
|
||||
}
|
||||
|
||||
$aResult['LoadingDescriptionEsc'] = \htmlspecialchars($aResult['LoadingDescription'], ENT_QUOTES|ENT_IGNORE, 'UTF-8');
|
||||
|
|
@ -1134,6 +1140,8 @@ class Actions
|
|||
$oAccount = $this->getAccountFromToken(false);
|
||||
if ($oAccount instanceof \RainLoop\Model\Account)
|
||||
{
|
||||
$aResult['IncludeCss'] = $aResult['UserCss'];
|
||||
|
||||
$oAddressBookProvider = $this->AddressBookProvider($oAccount);
|
||||
|
||||
$aResult['Auth'] = true;
|
||||
|
|
@ -1186,6 +1194,9 @@ class Actions
|
|||
{
|
||||
$oAccount = null;
|
||||
|
||||
$aResult['IncludeBackground'] = $aResult['LoginBackground'];
|
||||
$aResult['IncludeCss'] = $aResult['LoginCss'];
|
||||
|
||||
$aResult['DevEmail'] = $oConfig->Get('labs', 'dev_email', '');
|
||||
$aResult['DevPassword'] = $oConfig->Get('labs', 'dev_password', '');
|
||||
}
|
||||
|
|
@ -2707,17 +2718,19 @@ class Actions
|
|||
$this->setConfigFromParams($oConfig, 'DetermineUserLanguage', 'login', 'determine_user_language', 'bool');
|
||||
$this->setConfigFromParams($oConfig, 'DetermineUserDomain', 'login', 'determine_user_domain', 'bool');
|
||||
|
||||
if ($this->HasOneOfActionParams(array('Title', 'LoadingDescription', 'LoginLogo', 'LoginDescription', 'LoginCss', 'LoginPowered', 'UserLogo')) && $this->PremType())
|
||||
if ($this->HasOneOfActionParams(array('Title', 'LoadingDescription', 'LoginLogo', 'LoginBackground', 'LoginDescription', 'LoginCss', 'LoginPowered', 'UserLogo', 'UserCss')) && $this->PremType())
|
||||
{
|
||||
$this->setConfigFromParams($oConfig, 'Title', 'webmail', 'title', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'LoadingDescription', 'webmail', 'loading_description', 'string');
|
||||
|
||||
$this->setConfigFromParams($oConfig, 'LoginLogo', 'branding', 'login_logo', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'LoginBackground', 'branding', 'login_background', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'LoginDescription', 'branding', 'login_desc', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'LoginCss', 'branding', 'login_css', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'LoginPowered', 'branding', 'login_powered', 'bool');
|
||||
|
||||
$this->setConfigFromParams($oConfig, 'UserLogo', 'branding', 'user_logo', 'string');
|
||||
$this->setConfigFromParams($oConfig, 'UserCss', 'branding', 'user_css', 'string');
|
||||
}
|
||||
|
||||
$this->setConfigFromParams($oConfig, 'TokenProtection', 'security', 'csrf_protection', 'bool');
|
||||
|
|
|
|||
|
|
@ -86,10 +86,12 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
|
||||
'branding' => array(
|
||||
'login_logo' => array(''),
|
||||
'login_background' => array(''),
|
||||
'login_desc' => array(''),
|
||||
'login_css' => array(''),
|
||||
'login_powered' => array(true),
|
||||
'user_logo' => array('')
|
||||
'user_logo' => array(''),
|
||||
'user_css' => array('')
|
||||
),
|
||||
|
||||
'contacts' => array(
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@
|
|||
window.document.getElementById('rlThemeLink').href = window.rainloopAppData['NewThemeLink'];
|
||||
}
|
||||
</script>
|
||||
<script data-cfasync="false">
|
||||
if (window.rainloopAppData && window.rainloopAppData['IncludeCss']) {
|
||||
__includeStyle(window.rainloopAppData['IncludeCss']);
|
||||
}
|
||||
</script>
|
||||
<script data-cfasync="false"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -89,13 +94,25 @@
|
|||
window.$LAB
|
||||
.script(function () {
|
||||
return [
|
||||
{'src': '{{BaseAppLibsScriptLink}}', 'type': 'text/javascript', 'charset': 'utf-8'},
|
||||
{'src': '{{BaseAppLibsScriptLink}}', 'type': 'text/javascript', 'charset': 'utf-8'}
|
||||
];
|
||||
})
|
||||
.wait(function () {
|
||||
__simplePace(20);
|
||||
if (window.rainloopAppData['IncludeBackground']) {
|
||||
$('#rl-bg').attr('style', 'background-image: none !important;').backstretch(window.rainloopAppData['IncludeBackground'], {
|
||||
'fade': 1000
|
||||
}).removeAttr('style');
|
||||
}
|
||||
})
|
||||
.script(function () {
|
||||
return [
|
||||
{'src': window.rainloopAppData['TemplatesLink'], 'type': 'text/javascript', 'charset': 'utf-8'},
|
||||
{'src': window.rainloopAppData['LangLink'], 'type': 'text/javascript', 'charset': 'utf-8'}
|
||||
];
|
||||
})
|
||||
.wait(function () {
|
||||
__simplePace(30);
|
||||
__simplePace(10);
|
||||
})
|
||||
.script(function () {
|
||||
return {'src': '{{BaseAppMainScriptLink}}', 'type': 'text/javascript', 'charset': 'utf-8'};
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<br />
|
||||
<div class="legend">
|
||||
Login Page
|
||||
Login
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
|
|
@ -79,10 +79,27 @@
|
|||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Custom CSS
|
||||
Background
|
||||
</label>
|
||||
<div class="controls">
|
||||
<div data-bind="component: {
|
||||
name: 'Input',
|
||||
params: {
|
||||
value: loginBackground,
|
||||
trigger: loginBackground.trigger,
|
||||
placeholder: 'https://',
|
||||
size: 5,
|
||||
enable: capa
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Custom CSS
|
||||
</label>
|
||||
<div class="controls">
|
||||
<div class="custom-css-wrapper" data-bind="component: {
|
||||
name: 'TextArea',
|
||||
params: {
|
||||
value: loginCss,
|
||||
|
|
@ -106,12 +123,10 @@
|
|||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<br />
|
||||
<div class="legend">
|
||||
User Page
|
||||
User
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<!-- <div class="control-group">
|
||||
<label class="control-label">
|
||||
Logo
|
||||
</label>
|
||||
|
|
@ -127,7 +142,23 @@
|
|||
}
|
||||
}"></div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
Custom CSS
|
||||
</label>
|
||||
<div class="controls">
|
||||
<div class="custom-css-wrapper" data-bind="component: {
|
||||
name: 'TextArea',
|
||||
params: {
|
||||
value: userCss,
|
||||
trigger: userCss.trigger,
|
||||
width: 530,
|
||||
enable: capa,
|
||||
rows: 7
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
<style data-bind="csstext: logoCss"></style>
|
||||
<div class="b-login-content">
|
||||
<div class="loginFormWrapper">
|
||||
<center>
|
||||
|
|
|
|||
BIN
rainloop/v/0.0.0/themes/RainDrops/images/background.jpg
Normal file
BIN
rainloop/v/0.0.0/themes/RainDrops/images/background.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
BIN
rainloop/v/0.0.0/themes/RainDrops/images/preview.png
Normal file
BIN
rainloop/v/0.0.0/themes/RainDrops/images/preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
58
rainloop/v/0.0.0/themes/RainDrops/styles.less
Normal file
58
rainloop/v/0.0.0/themes/RainDrops/styles.less
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
|
||||
// MAIN
|
||||
@main-color: #333;
|
||||
@main-background-color: #354C17;
|
||||
@main-background-image: "images/background.jpg";
|
||||
@main-background-size: cover;
|
||||
|
||||
// LOADING
|
||||
@loading-color: #fff;
|
||||
@loading-text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
|
||||
|
||||
// LOGIN
|
||||
@login-color: #eee;
|
||||
@login-background-color: #2b333d;
|
||||
@login-rgba-background-color: rgba(0,0,0,0.5);
|
||||
@login-box-shadow: 0px 2px 10px rgba(0,0,0,0.2);
|
||||
@login-border: none;
|
||||
@login-border-radius: 7px;
|
||||
@powered-color: #ddd;
|
||||
@languages-color: #ddd;
|
||||
|
||||
// MENU
|
||||
@dropdown-menu-color: #333;
|
||||
@dropdown-menu-background-color: #fff;
|
||||
@dropdown-menu-hover-background-color: #48525C;
|
||||
@dropdown-menu-hover-color: #eee;
|
||||
@dropdown-menu-disable-color: #999;
|
||||
|
||||
// FOLDERS
|
||||
@folders-color: #fff;
|
||||
@folders-disabled-color: #aaa;
|
||||
@folders-selected-color: #fff;
|
||||
@folders-selected-background-color: #2b333d;
|
||||
@folders-selected-rgba-background-color: rgba(255,255,255,0.3);
|
||||
@folders-focused-color: #fff;
|
||||
@folders-focused-background-color: #2b333d;
|
||||
@folders-focused-rgba-background-color: rgba(255,255,255,0.3);
|
||||
@folders-hover-color: #fff;
|
||||
@folders-hover-background-color: #2b333d;
|
||||
@folders-hover-rgba-background-color: rgba(255,255,255,0.3);
|
||||
@folders-drop-color: #fff;
|
||||
@folders-drop-background-color: #2b333d;
|
||||
@folders-drop-rgba-background-color: rgba(255,255,255,0.3);
|
||||
|
||||
// SETTINGS
|
||||
@settings-menu-color: #fff;
|
||||
@settings-menu-disabled-color: #aaa;
|
||||
@settings-menu-selected-color: #fff;
|
||||
@settings-menu-selected-background-color: #2b333d;
|
||||
@settings-menu-selected-rgba-background-color: rgba(255,255,255,0.3);
|
||||
@settings-menu-hover-color: #fff;
|
||||
@settings-menu-hover-background-color: #2b333d;
|
||||
@settings-menu-hover-rgba-background-color: rgba(255,255,255,0.3);
|
||||
|
||||
// MESSAGE LIST
|
||||
@message-list-toolbar-background-color: #eee;
|
||||
@message-list-toolbar-gradient-start: #f4f4f4;
|
||||
@message-list-toolbar-gradient-end: #dfdfdf;
|
||||
Loading…
Add table
Add a link
Reference in a new issue