mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Release commit
Refactoring
This commit is contained in:
parent
958c814c86
commit
484271bb69
21 changed files with 407 additions and 415 deletions
|
|
@ -22,6 +22,8 @@ if ('' === $sUrl || '' === $sSsoKey)
|
|||
}
|
||||
else
|
||||
{
|
||||
OC_Config::setValue('xframe_restriction', false);
|
||||
|
||||
$sUser = OCP\User::getUser();
|
||||
|
||||
$sEmail = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-email', '');
|
||||
|
|
|
|||
26
build/owncloud/rainloop-app/js/resize.js
Normal file
26
build/owncloud/rainloop-app/js/resize.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
$(function (window, document) {
|
||||
|
||||
var
|
||||
buffer = 5,
|
||||
ifr = document.getElementById('rliframe')
|
||||
;
|
||||
|
||||
|
||||
function pageY(elem) {
|
||||
return elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;
|
||||
}
|
||||
|
||||
function resizeIframe() {
|
||||
var height = document.documentElement.clientHeight;
|
||||
height -= pageY(ifr) + buffer;
|
||||
height = (height < 0) ? 0 : height;
|
||||
ifr.style.height = height + 'px';
|
||||
}
|
||||
|
||||
if (ifr)
|
||||
{
|
||||
ifr.onload = resizeIframe;
|
||||
window.onresize = resizeIframe;
|
||||
}
|
||||
|
||||
}(window, document));
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
<div style="box-sizing: border-box; width: 100%; height: 100%; padding: 0px; margin: 0px; background-color: #383c43; position: relative; overflow: hidden;"
|
||||
><iframe style="border: none; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px;" tabindex="-1" frameborder="0"
|
||||
src="<?php echo $_['rainloop-url']; ?>"></iframe></div>
|
||||
><iframe id="rliframe" style="border: none; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px;" tabindex="-1" frameborder="0"
|
||||
src="<?php echo $_['rainloop-url']; ?>"></iframe></div><?php OCP\Util::addScript('rainloop', 'resize');
|
||||
|
|
@ -6,9 +6,10 @@
|
|||
function LinkBuilder()
|
||||
{
|
||||
this.sBase = '#/';
|
||||
this.sServer = './?';
|
||||
this.sVersion = RL.settingsGet('Version');
|
||||
this.sSpecSuffix = RL.settingsGet('AuthAccountHash') || '0';
|
||||
this.sServer = (RL.settingsGet('IndexFile') || './') + '?';
|
||||
this.sStaticPrefix = RL.settingsGet('StaticPrefix') || 'rainloop/v/' + this.sVersion + '/static/';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -235,17 +236,7 @@ LinkBuilder.prototype.exportContactsCsv = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.emptyContactPic = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.emptyFullContactPic = function ()
|
||||
{
|
||||
return window.location.protocol + '//' + window.location.hostname +
|
||||
('80' === '' + window.location.port || '' === '' + window.location.port ? '' : ':' + window.location.port) + window.location.pathname +
|
||||
'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
|
||||
return this.sStaticPrefix + 'css/images/empty-contact.png';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -254,7 +245,7 @@ LinkBuilder.prototype.emptyFullContactPic = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.sound = function (sFileName)
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/sounds/' + sFileName;
|
||||
return this.sStaticPrefix + 'sounds/' + sFileName;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -278,7 +269,7 @@ LinkBuilder.prototype.themePreviewLink = function (sTheme)
|
|||
*/
|
||||
LinkBuilder.prototype.notificationMailIcon = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/css/images/icom-message-notification.png';
|
||||
return this.sStaticPrefix + 'css/images/icom-message-notification.png';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -286,7 +277,7 @@ LinkBuilder.prototype.notificationMailIcon = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.openPgpJs = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/js/openpgp.min.js';
|
||||
return this.sStaticPrefix + 'js/openpgp.min.js';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
|
|||
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
|
||||
{
|
||||
fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
|
||||
// fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=' +
|
||||
// window.encodeURIComponent(RL.link().emptyFullContactPic()), sEmail);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ if (file_exists(APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/index.php'))
|
|||
else
|
||||
{
|
||||
echo '[105] Missing version directory';
|
||||
exit(102);
|
||||
exit(105);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "RainLoop",
|
||||
"title": "RainLoop Webmail",
|
||||
"version": "1.6.7",
|
||||
"release": "139",
|
||||
"release": "141",
|
||||
"description": "Simple, modern & fast web-based email client",
|
||||
"homepage": "http://rainloop.net",
|
||||
"main": "gulpfile.js",
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
"plugins"
|
||||
],
|
||||
"readmeFilename": "README.md",
|
||||
"ownCloudPackageVersion": "1.4",
|
||||
"ownCloudPackageVersion": "1.5",
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1012,9 +1012,9 @@ class Actions
|
|||
|
||||
$aResult = array(
|
||||
'Version' => APP_VERSION,
|
||||
'IndexFile' => APP_INDEX_FILE,
|
||||
'Auth' => false,
|
||||
'AccountHash' => '',
|
||||
'StaticPrefix' => 'rainloop/v/' + APP_VERSION + '/static/',
|
||||
'AccountSignMe' => false,
|
||||
'AuthAccountHash' => '',
|
||||
'MailToEmail' => '',
|
||||
|
|
@ -1299,7 +1299,7 @@ class Actions
|
|||
$sStaticCache = \md5(APP_VERSION.$this->Plugins()->Hash());
|
||||
|
||||
$sTheme = $this->ValidateTheme($sTheme);
|
||||
$sNewThemeLink = APP_INDEX_FILE.'?/Css/0/'.($bAdmin ? 'Admin' : 'User').'/-/'.($bAdmin ? 'Default' : $sTheme).'/-/'.$sStaticCache.'/';
|
||||
$sNewThemeLink = './?/Css/0/'.($bAdmin ? 'Admin' : 'User').'/-/'.($bAdmin ? 'Default' : $sTheme).'/-/'.$sStaticCache.'/';
|
||||
|
||||
$bUserLanguage = false;
|
||||
if (!$bAdmin && !$aResult['Auth'] && !empty($_COOKIE['rllang']) &&
|
||||
|
|
@ -1327,15 +1327,15 @@ class Actions
|
|||
$sPluginsLink = '';
|
||||
if (0 < $this->Plugins()->Count())
|
||||
{
|
||||
$sPluginsLink = APP_INDEX_FILE.'?/Plugins/0/'.($bAdmin ? 'Admin' : 'User').'/'.$sStaticCache.'/';
|
||||
$sPluginsLink = './?/Plugins/0/'.($bAdmin ? 'Admin' : 'User').'/'.$sStaticCache.'/';
|
||||
}
|
||||
|
||||
$aResult['Theme'] = $sTheme;
|
||||
$aResult['NewThemeLink'] = $sNewThemeLink;
|
||||
$aResult['Language'] = $this->ValidateLanguage($sLanguage);
|
||||
$aResult['UserLanguage'] = $bUserLanguage;
|
||||
$aResult['LangLink'] = APP_INDEX_FILE.'?/Lang/0/'.($bAdmin ? 'en' : $aResult['Language']).'/'.$sStaticCache.'/';
|
||||
$aResult['TemplatesLink'] = APP_INDEX_FILE.'?/Templates/0/'.($bAdmin ? 'Admin' : 'App').'/'.$sStaticCache.'/';
|
||||
$aResult['LangLink'] = './?/Lang/0/'.($bAdmin ? 'en' : $aResult['Language']).'/'.$sStaticCache.'/';
|
||||
$aResult['TemplatesLink'] = './?/Templates/0/'.($bAdmin ? 'Admin' : 'App').'/'.$sStaticCache.'/';
|
||||
$aResult['PluginsLink'] = $sPluginsLink;
|
||||
$aResult['EditorDefaultType'] = 'Html' === $aResult['EditorDefaultType'] ? 'Html' : 'Plain';
|
||||
|
||||
|
|
@ -7070,9 +7070,8 @@ class Actions
|
|||
$fAdditionalExternalFilter = null;
|
||||
if (!!$this->Config()->Get('labs', 'use_local_proxy_for_external_images', false))
|
||||
{
|
||||
$sIndexPrefix = 0 < strlen(APP_INDEX_FILE) ? APP_INDEX_FILE : './';
|
||||
$fAdditionalExternalFilter = function ($sUrl) use ($sIndexPrefix) {
|
||||
return $sIndexPrefix.'?/ProxyExternal/'.\RainLoop\Utils::EncodeKeyValues(array(
|
||||
$fAdditionalExternalFilter = function ($sUrl) {
|
||||
return './?/ProxyExternal/'.\RainLoop\Utils::EncodeKeyValues(array(
|
||||
'Token' => \RainLoop\Utils::GetConnectionToken(),
|
||||
'Url' => $sUrl
|
||||
)).'/';
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class KeyPathHelper
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
static public function CssCache($sPluginsHash)
|
||||
static public function CssCache($sTheme, $sPluginsHash)
|
||||
{
|
||||
return '/CssCache/'.$sPluginsHash.'/'.$sTheme.'/'.APP_VERSION.'/';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,8 +175,7 @@ class Service
|
|||
$sJsBoot = \file_get_contents(APP_VERSION_ROOT_PATH.'static/js/boot.js');
|
||||
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Index.html'), array(
|
||||
'{{BaseRandHash}}' => \md5(\rand(1000, 9000).\microtime(true)),
|
||||
'{{BaseAppDataScriptLink}}' => ($bAdmin ? APP_INDEX_FILE.'?/AdminAppData/' : APP_INDEX_FILE.'?/AppData/'),
|
||||
'{{BaseAppIndexFile}}' => APP_INDEX_FILE,
|
||||
'{{BaseAppDataScriptLink}}' => ($bAdmin ? './?/AdminAppData/' : './?/AppData/'),
|
||||
'{{BaseAppFaviconIcoFile}}' => $aData['FaviconIcoLink'],
|
||||
'{{BaseAppFaviconPngFile}}' => $aData['FaviconPngLink'],
|
||||
'{{BaseAppAppleTouchFile}}' => $aData['AppleTouchLink'],
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
<meta name="viewport" content="width=950,maximum-scale=2">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<noscript>
|
||||
<meta http-equiv="refresh" content="0; URL={{BaseAppIndexFile}}?/NoScript" />
|
||||
<meta http-equiv="refresh" content="0; URL=./?/NoScript" />
|
||||
</noscript>
|
||||
<!--[if lte IE 7]>
|
||||
<meta http-equiv="refresh" content="0; URL={{BaseAppIndexFile}}?/BadBrowser" />
|
||||
<meta http-equiv="refresh" content="0; URL=./?/BadBrowser" />
|
||||
<![endif]-->
|
||||
<script type="text/javascript" data-cfasync="false">
|
||||
function __fIncludeScr(sSrc) {
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
|
||||
if (!navigator || !navigator.cookieEnabled) {
|
||||
document.location.replace('{{BaseAppIndexFile}}?/NoCookie');
|
||||
document.location.replace('./?/NoCookie');
|
||||
}
|
||||
</script>
|
||||
<meta name="Author" content="RainLoop Team" />
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
define('APP_START', microtime(true));
|
||||
define('APP_START_TIME', time());
|
||||
define('APP_REQUEST_RND', md5(APP_START.rand(10000, 99999).APP_START));
|
||||
define('APP_INDEX_FILE', 'index.php');
|
||||
define('APP_VERSION_ROOT_PATH', APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/');
|
||||
|
||||
$sCustomDataPath = '';
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ if (file_exists(APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/index.php'))
|
|||
else
|
||||
{
|
||||
echo '[105] Missing version directory';
|
||||
exit(102);
|
||||
exit(105);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3568,9 +3568,10 @@ ko.observable.fn.validateFunc = function (fFunc)
|
|||
function LinkBuilder()
|
||||
{
|
||||
this.sBase = '#/';
|
||||
this.sServer = './?';
|
||||
this.sVersion = RL.settingsGet('Version');
|
||||
this.sSpecSuffix = RL.settingsGet('AuthAccountHash') || '0';
|
||||
this.sServer = (RL.settingsGet('IndexFile') || './') + '?';
|
||||
this.sStaticPrefix = RL.settingsGet('StaticPrefix') || 'rainloop/v/' + this.sVersion + '/static/';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3797,17 +3798,7 @@ LinkBuilder.prototype.exportContactsCsv = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.emptyContactPic = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.emptyFullContactPic = function ()
|
||||
{
|
||||
return window.location.protocol + '//' + window.location.hostname +
|
||||
('80' === '' + window.location.port || '' === '' + window.location.port ? '' : ':' + window.location.port) + window.location.pathname +
|
||||
'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
|
||||
return this.sStaticPrefix + 'css/images/empty-contact.png';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3816,7 +3807,7 @@ LinkBuilder.prototype.emptyFullContactPic = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.sound = function (sFileName)
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/sounds/' + sFileName;
|
||||
return this.sStaticPrefix + 'sounds/' + sFileName;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3840,7 +3831,7 @@ LinkBuilder.prototype.themePreviewLink = function (sTheme)
|
|||
*/
|
||||
LinkBuilder.prototype.notificationMailIcon = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/css/images/icom-message-notification.png';
|
||||
return this.sStaticPrefix + 'css/images/icom-message-notification.png';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3848,7 +3839,7 @@ LinkBuilder.prototype.notificationMailIcon = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.openPgpJs = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/js/openpgp.min.js';
|
||||
return this.sStaticPrefix + 'js/openpgp.min.js';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -7962,8 +7953,6 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
|
|||
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
|
||||
{
|
||||
fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
|
||||
// fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=' +
|
||||
// window.encodeURIComponent(RL.link().emptyFullContactPic()), sEmail);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
8
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -3571,9 +3571,10 @@ ko.observable.fn.validateFunc = function (fFunc)
|
|||
function LinkBuilder()
|
||||
{
|
||||
this.sBase = '#/';
|
||||
this.sServer = './?';
|
||||
this.sVersion = RL.settingsGet('Version');
|
||||
this.sSpecSuffix = RL.settingsGet('AuthAccountHash') || '0';
|
||||
this.sServer = (RL.settingsGet('IndexFile') || './') + '?';
|
||||
this.sStaticPrefix = RL.settingsGet('StaticPrefix') || 'rainloop/v/' + this.sVersion + '/static/';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3800,17 +3801,7 @@ LinkBuilder.prototype.exportContactsCsv = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.emptyContactPic = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.emptyFullContactPic = function ()
|
||||
{
|
||||
return window.location.protocol + '//' + window.location.hostname +
|
||||
('80' === '' + window.location.port || '' === '' + window.location.port ? '' : ':' + window.location.port) + window.location.pathname +
|
||||
'rainloop/v/' + this.sVersion + '/static/css/images/empty-contact.png';
|
||||
return this.sStaticPrefix + 'css/images/empty-contact.png';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3819,7 +3810,7 @@ LinkBuilder.prototype.emptyFullContactPic = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.sound = function (sFileName)
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/sounds/' + sFileName;
|
||||
return this.sStaticPrefix + 'sounds/' + sFileName;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3843,7 +3834,7 @@ LinkBuilder.prototype.themePreviewLink = function (sTheme)
|
|||
*/
|
||||
LinkBuilder.prototype.notificationMailIcon = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/css/images/icom-message-notification.png';
|
||||
return this.sStaticPrefix + 'css/images/icom-message-notification.png';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3851,7 +3842,7 @@ LinkBuilder.prototype.notificationMailIcon = function ()
|
|||
*/
|
||||
LinkBuilder.prototype.openPgpJs = function ()
|
||||
{
|
||||
return 'rainloop/v/' + this.sVersion + '/static/js/openpgp.min.js';
|
||||
return this.sStaticPrefix + 'js/openpgp.min.js';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -18217,8 +18208,6 @@ AbstractCacheStorage.prototype.getUserPic = function (sEmail, fCallback)
|
|||
if (this.bCapaGravatar && '' === sUrl && '' !== sEmailLower)
|
||||
{
|
||||
fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=mm', sEmail);
|
||||
// fCallback('//secure.gravatar.com/avatar/' + Utils.md5(sEmailLower) + '.jpg?s=80&d=' +
|
||||
// window.encodeURIComponent(RL.link().emptyFullContactPic()), sEmail);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue