From e067079f8aac9792cc48e21334fd9ca672c0448a Mon Sep 17 00:00:00 2001
From: the-djmaze <>
Date: Thu, 24 Nov 2022 11:31:12 +0100
Subject: [PATCH] Fixes cPanel CSS issue #697
---
.../var/cpanel/webmail/webmail_snappymail.yaml | 3 +++
plugins/login-remote/index.php | 8 ++++++++
snappymail/v/0.0.0/themes/SnowDarkV1/styles.css | 2 +-
snappymail/v/0.0.0/themes/SquaresDark/styles.css | 12 ++++++------
vendors/bootstrap/less/forms.less | 2 +-
5 files changed, 19 insertions(+), 8 deletions(-)
create mode 100644 integrations/cpanel/var/cpanel/webmail/webmail_snappymail.yaml
diff --git a/integrations/cpanel/var/cpanel/webmail/webmail_snappymail.yaml b/integrations/cpanel/var/cpanel/webmail/webmail_snappymail.yaml
new file mode 100644
index 000000000..30a093c44
--- /dev/null
+++ b/integrations/cpanel/var/cpanel/webmail/webmail_snappymail.yaml
@@ -0,0 +1,3 @@
+url: "/3rdparty/snappymail/"
+displayname: "SnappyMail"
+icon: "/3rdparty/snappymail/snappymail/v/2.22.1/static/logo-text.png"
diff --git a/plugins/login-remote/index.php b/plugins/login-remote/index.php
index 9efba76b9..3abbfd004 100644
--- a/plugins/login-remote/index.php
+++ b/plugins/login-remote/index.php
@@ -16,6 +16,14 @@ class LoginRemotePlugin extends \RainLoop\Plugins\AbstractPlugin
public function Init() : void
{
$this->addPartHook('RemoteAutoLogin', 'ServiceRemoteAutoLogin');
+ $this->addHook('filter.app-data', 'FilterAppData');
+ }
+
+ public function FilterAppData($bAdmin, &$aResult)
+ {
+ if (!$bAdmin && \is_array($aResult) && empty($aResult['Auth']) && isset($_ENV['REMOTE_USER'])) {
+ $aResult['DevEmail'] = $this->Config()->Get('plugin', 'email', $_ENV['REMOTE_USER']);
+ }
}
public function ServiceRemoteAutoLogin() : bool
diff --git a/snappymail/v/0.0.0/themes/SnowDarkV1/styles.css b/snappymail/v/0.0.0/themes/SnowDarkV1/styles.css
index 2ea19b377..4ff960a1d 100644
--- a/snappymail/v/0.0.0/themes/SnowDarkV1/styles.css
+++ b/snappymail/v/0.0.0/themes/SnowDarkV1/styles.css
@@ -172,7 +172,7 @@ input, textarea, .select, select, .emailaddresses {
color: #fff;
}
.select, select {
- background-image: url("data:image/svg+xml,");
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIGhlaWdodD0nMTBweCcgd2lkdGg9JzE1cHgnPjx0ZXh0IHg9JzAnIHk9JzEwJyBmaWxsPSdyZ2IoMjU1LDI1NSwyNTUpJz7ilr48L3RleHQ+PC9zdmc+);
}
hr {
diff --git a/snappymail/v/0.0.0/themes/SquaresDark/styles.css b/snappymail/v/0.0.0/themes/SquaresDark/styles.css
index 39661fd04..8e418647e 100644
--- a/snappymail/v/0.0.0/themes/SquaresDark/styles.css
+++ b/snappymail/v/0.0.0/themes/SquaresDark/styles.css
@@ -45,6 +45,11 @@
/* MESSAGE LIST */
--message-list-toolbar-bg-color: #222;
+
+ /* FORMS */
+ --input-clr: #fff;
+ --input-bg-clr: #000;
+ --input-border-clr: #aaa;
}
::-webkit-scrollbar {
@@ -144,13 +149,8 @@
background: linear-gradient(#555 0%, #000 100%);
}
-input, textarea, .select, select, .emailaddresses {
- background-color: #000;
- border-color: #aaa;
- color: #fff;
-}
.select, select {
- background-image: url("data:image/svg+xml,");
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIGhlaWdodD0nMTBweCcgd2lkdGg9JzE1cHgnPjx0ZXh0IHg9JzAnIHk9JzEwJyBmaWxsPSdyZ2IoMjU1LDI1NSwyNTUpJz7ilr48L3RleHQ+PC9zdmc+);
}
hr {
diff --git a/vendors/bootstrap/less/forms.less b/vendors/bootstrap/less/forms.less
index 26657a059..267f48c45 100644
--- a/vendors/bootstrap/less/forms.less
+++ b/vendors/bootstrap/less/forms.less
@@ -83,7 +83,7 @@ select, .select {
// Safari requires -webkit-
-webkit-appearance: none;
appearance: none;
- background: var(--input-bg-clr, #fff) url("data:image/svg+xml,") right center/1em no-repeat border-box;
+ background: var(--input-bg-clr, #fff) url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIGhlaWdodD0nMTBweCcgd2lkdGg9JzE1cHgnPjx0ZXh0IHg9JzAnIHk9JzEwJyBmaWxsPSdyZ2IoODUsODUsODUpJz7ilr48L3RleHQ+PC9zdmc+) right center/1em no-repeat border-box;
border: 1px solid var(--input-border-clr, #ccc);
cursor: pointer;
padding-right: 1.5em;