mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-28 02:21:06 +08:00
Reimplement the BadBrowser page based on feature detection
This commit is contained in:
parent
a022139403
commit
bd34f9a9bc
4 changed files with 59 additions and 0 deletions
|
@ -141,6 +141,7 @@ The [squire](https://github.com/neilj/Squire) implementation is not 100% compati
|
|||
Still TODO:
|
||||
|
||||
* support for tables (really needed?!?)
|
||||
* support BIDI (really needed?!?)
|
||||
|
||||
| | normal | min | gzip | min gzip |
|
||||
|-------- |-------: |-------: |------: |--------: |
|
||||
|
|
|
@ -716,6 +716,20 @@ class ServiceActions
|
|||
return $this->localError($this->oActions->StaticI18N('STATIC/NO_COOKIE_TITLE'), $this->oActions->StaticI18N('STATIC/NO_COOKIE_DESC'));
|
||||
}
|
||||
|
||||
public function ServiceBadBrowser() : string
|
||||
{
|
||||
$sTitle = $this->oActions->StaticI18N('STATIC/BAD_BROWSER_TITLE');
|
||||
$sDesc = \nl2br($this->oActions->StaticI18N('STATIC/BAD_BROWSER_DESC'));
|
||||
|
||||
\header('Content-Type: text/html; charset=utf-8');
|
||||
return \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/BadBrowser.html'), array(
|
||||
'{{BaseWebStaticPath}}' => Utils::WebStaticPath(),
|
||||
'{{ErrorTitle}}' => $sTitle,
|
||||
'{{ErrorHeader}}' => $sTitle,
|
||||
'{{ErrorDesc}}' => $sDesc
|
||||
));
|
||||
}
|
||||
|
||||
public function ServiceMailto() : string
|
||||
{
|
||||
$this->oHttp->ServerNoCache();
|
||||
|
|
43
rainloop/v/0.0.0/app/templates/BadBrowser.html
Normal file
43
rainloop/v/0.0.0/app/templates/BadBrowser.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow, noodp" />
|
||||
<title>{{ErrorTitle}}</title>
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
.content {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
text-align: center;
|
||||
width: 600px;
|
||||
margin: -200px 0 0 -250px;
|
||||
background: #FFF;
|
||||
line-height: 150%;
|
||||
border-bottom: 1px solid #E4E4E4;
|
||||
}
|
||||
.error-desc {
|
||||
background-color: #eee;
|
||||
padding: 10px;
|
||||
}
|
||||
a {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="content">
|
||||
<h1>{{ErrorHeader}}</h1>
|
||||
<br />
|
||||
<div class="error-desc">
|
||||
<p>{{ErrorDesc}}</p>
|
||||
<a href="https://www.google.com/chrome/" target="_blank">Google Chrome</a>
|
||||
<a href="https://www.microsoft.com/edge/" target="_blank">Microsoft Edge</a>
|
||||
<a href="https://www.mozilla.org/firefox/" target="_blank">Mozilla Firefox</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -17,6 +17,7 @@
|
|||
<link type="text/css" rel="stylesheet" data-href="{{BaseAppMainCssLink}}" id="app-css" />
|
||||
<link type="text/css" rel="stylesheet" data-href="{{BaseAppThemeCssLink}}" id="app-theme-link" />
|
||||
<link rel="manifest" href="{{BaseAppManifestLink}}" />
|
||||
<script>Element.prototype.closest || (document.location.href = './?/BadBrowser');</script>
|
||||
</head>
|
||||
|
||||
<body class="thm-body">
|
||||
|
|
Loading…
Reference in a new issue