mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Improve resource loaders
This commit is contained in:
parent
a250d84025
commit
151646f990
6 changed files with 66 additions and 56 deletions
|
|
@ -1525,7 +1525,7 @@ class Actions
|
|||
|
||||
/*
|
||||
required by Index.html and rl.js:
|
||||
NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBackground PluginsLink AuthAccountHash
|
||||
NewThemeLink IncludeCss LoadingDescriptionEsc LangLink IncludeBackground PluginsLink AuthAccountHash
|
||||
*/
|
||||
|
||||
$aResult = array(
|
||||
|
|
@ -1973,7 +1973,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
$aResult['LangLink'] = './?/Lang/0/'.($bAdmin ? 'Admin' : 'App').'/'.
|
||||
($bAdmin ? $aResult['LanguageAdmin'] : $aResult['Language']).'/'.$sStaticCache.'/';
|
||||
|
||||
$aResult['TemplatesLink'] = './?/Templates/0/'.($bAdmin ? 'Admin' : 'App').'/'.$sStaticCache.'/';
|
||||
// $aResult['TemplatesLink'] = './?/Templates/0/'.($bAdmin ? 'Admin' : 'App').'/'.$sStaticCache.'/';
|
||||
|
||||
$bAppJsDebug = !!$this->Config()->Get('labs', 'use_app_debug_js', false);
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ class Service
|
|||
|
||||
if (0 === \strlen($sResult))
|
||||
{
|
||||
// $aTemplateParameters['{{BaseTemplates}}'] = $this->oServiceActions->compileTemplates($bAdmin, false);
|
||||
$aTemplateParameters['{{BaseTemplates}}'] = $this->oServiceActions->compileTemplates($bAdmin, false);
|
||||
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Index.html'), $aTemplateParameters);
|
||||
|
||||
$sResult = \RainLoop\Utils::ClearHtmlOutput($sResult);
|
||||
|
|
|
|||
|
|
@ -1302,7 +1302,7 @@ class ServiceActions
|
|||
|
||||
$this->oActions->Plugins()->CompileTemplate($aTemplates, $bAdmin);
|
||||
|
||||
$sHtml = '';
|
||||
$sHtml = '<script id="rainloop-templates-id"></script>';
|
||||
foreach ($aTemplates as $sName => $sFile)
|
||||
{
|
||||
$sName = \preg_replace('/[^a-zA-Z0-9]/', '', $sName);
|
||||
|
|
|
|||
|
|
@ -1,33 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="no-js rl-booted-trigger rl-started-trigger glass" dir="{{BaseDir}}">
|
||||
<head>
|
||||
<noscript>
|
||||
<meta http-equiv="refresh" content="0; URL=./?/NoScript" />
|
||||
</noscript>
|
||||
<!--[if lte IE 8]>
|
||||
|
||||
<head>
|
||||
<noscript>
|
||||
<meta http-equiv="refresh" content="0; URL=./?/NoScript" />
|
||||
</noscript>
|
||||
<!--[if lte IE 8]>
|
||||
<meta http-equiv="refresh" content="0; URL=./?/BadBrowser" />
|
||||
<![endif]-->
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="viewport" content="{{BaseViewport}}">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="google" content="notranslate" />
|
||||
<meta name="robots" content="noindex,nofollow,noodp" />
|
||||
<meta name="AppBootData" content='{{RainloopBootData}}' id="app-boot-data" />
|
||||
<script type="text/javascript" data-cfasync="false" src="{{BaseAppPolyfillsScriptLink}}"></script>
|
||||
{{BaseContentSecurityPolicy}}
|
||||
<title></title>
|
||||
{{BaseAppHeadScriptLink}}
|
||||
{{BaseAppFaviconPngLinkTag}}
|
||||
{{BaseAppFaviconTouchLinkTag}}
|
||||
<link type="text/css" rel="stylesheet" href="{{BaseAppMainCssLink}}" />
|
||||
<link type="text/css" rel="stylesheet" href="{{BaseAppThemeCssLink}}" id="app-theme-link" />
|
||||
<link rel="manifest" href="{{BaseAppManifestLink}}" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="rl-app"></div>
|
||||
<div id="rl-check"></div>
|
||||
{{BaseAppBodyScript}}
|
||||
<script type="text/javascript" data-cfasync="false" src="{{BaseAppBootScriptLink}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="viewport" content="{{BaseViewport}}">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="google" content="notranslate" />
|
||||
<meta name="robots" content="noindex,nofollow,noodp" />
|
||||
<meta name="AppBootData" content='{{RainloopBootData}}' id="app-boot-data" />
|
||||
<script type="text/javascript" data-cfasync="false" src="{{BaseAppPolyfillsScriptLink}}"></script>
|
||||
{{BaseContentSecurityPolicy}}
|
||||
<title></title>
|
||||
{{BaseAppHeadScriptLink}}
|
||||
{{BaseAppFaviconPngLinkTag}}
|
||||
{{BaseAppFaviconTouchLinkTag}}
|
||||
<link type="text/css" rel="stylesheet" href="{{BaseAppMainCssLink}}" />
|
||||
<link type="text/css" rel="stylesheet" href="{{BaseAppThemeCssLink}}" id="app-theme-link" />
|
||||
<link rel="manifest" href="{{BaseAppManifestLink}}" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="rl-app"></div>
|
||||
<div id="rl-check"></div>
|
||||
{{BaseTemplates}}
|
||||
{{BaseAppBodyScript}}
|
||||
<script type="text/javascript" data-cfasync="false" src="{{BaseAppBootScriptLink}}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue