From 76546ff06c8731766d20275d2317a5463afd03ce Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 4 Nov 2022 10:27:17 +0200 Subject: [PATCH 1/2] logo svg --- .../Espo/Resources/metadata/themes/Espo.json | 4 ++-- client/img/logo.svg | 22 +++++++++++++++++++ client/src/views/login.js | 2 +- client/src/views/site-portal/navbar.js | 4 ++-- client/src/views/site/navbar.js | 2 +- install/core/tpl/header.tpl | 2 +- public/install/css/install.css | 1 + 7 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 client/img/logo.svg diff --git a/application/Espo/Resources/metadata/themes/Espo.json b/application/Espo/Resources/metadata/themes/Espo.json index 0b89c51613..9226e3afce 100644 --- a/application/Espo/Resources/metadata/themes/Espo.json +++ b/application/Espo/Resources/metadata/themes/Espo.json @@ -22,8 +22,8 @@ "logo": { "param": "navbar", "valueMap": { - "side": "client/img/logo-39.png", - "top": "client/img/logo-39.png" + "side": "client/img/logo.svg", + "top": "client/img/logo.svg" } } }, diff --git a/client/img/logo.svg b/client/img/logo.svg new file mode 100644 index 0000000000..ba0dff18fc --- /dev/null +++ b/client/img/logo.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/src/views/login.js b/client/src/views/login.js index 7dc43fd800..3a4f714e94 100644 --- a/client/src/views/login.js +++ b/client/src/views/login.js @@ -68,7 +68,7 @@ define('views/login', ['view'], function (Dep) { var companyLogoId = this.getConfig().get('companyLogoId'); if (!companyLogoId) { - return this.getBasePath() + ('client/img/logo.png'); + return this.getBasePath() + ('client/img/logo.svg'); } return this.getBasePath() + '?entryPoint=LogoImage&id='+companyLogoId; diff --git a/client/src/views/site-portal/navbar.js b/client/src/views/site-portal/navbar.js index 3e499d9c4e..7548eb97f6 100644 --- a/client/src/views/site-portal/navbar.js +++ b/client/src/views/site-portal/navbar.js @@ -26,14 +26,14 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/site-portal/navbar', 'views/site/navbar', function (Dep) { +define('views/site-portal/navbar', ['views/site/navbar'], function (Dep) { return Dep.extend({ getLogoSrc: function () { var companyLogoId = this.getConfig().get('companyLogoId'); if (!companyLogoId) { - return this.getBasePath() + (this.getThemeManager().getParam('logo') || 'client/img/logo.png'); + return this.getBasePath() + (this.getThemeManager().getParam('logo') || 'client/img/logo.svg'); } return this.getBasePath() + '?entryPoint=LogoImage&id='+companyLogoId+'&t=' + companyLogoId; }, diff --git a/client/src/views/site/navbar.js b/client/src/views/site/navbar.js index 9c216d7d4f..208a52d53e 100644 --- a/client/src/views/site/navbar.js +++ b/client/src/views/site/navbar.js @@ -334,7 +334,7 @@ define('views/site/navbar', ['view'], function (Dep) { var companyLogoId = this.getConfig().get('companyLogoId'); if (!companyLogoId) { - return this.getBasePath() + (this.getThemeManager().getParam('logo') || 'client/img/logo.png'); + return this.getBasePath() + (this.getThemeManager().getParam('logo') || 'client/img/logo.svg'); } return this.getBasePath() + '?entryPoint=LogoImage&id='+companyLogoId; diff --git a/install/core/tpl/header.tpl b/install/core/tpl/header.tpl index 9e779fddb8..891c1e8975 100644 --- a/install/core/tpl/header.tpl +++ b/install/core/tpl/header.tpl @@ -1,5 +1,5 @@
- +
diff --git a/public/install/css/install.css b/public/install/css/install.css index 9a47fe62b6..8ef3c50d81 100644 --- a/public/install/css/install.css +++ b/public/install/css/install.css @@ -145,6 +145,7 @@ span.ok { .main-header.panel-heading { background-color: var(--navbar-inverse-bg) !important; padding: 0 2px; + border-bottom-width: 0; } header.step-header { From 62d1c0fae9a8370c8f28e2592a660a606f689ec8 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 4 Nov 2022 10:36:00 +0200 Subject: [PATCH 2/2] attachment csp --- application/Espo/EntryPoints/Attachment.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/Espo/EntryPoints/Attachment.php b/application/Espo/EntryPoints/Attachment.php index 4a9fbc33d4..b8ec347028 100644 --- a/application/Espo/EntryPoints/Attachment.php +++ b/application/Espo/EntryPoints/Attachment.php @@ -111,6 +111,7 @@ class Attachment implements EntryPoint $response ->setHeader('Pragma', 'public') ->setHeader('Content-Length', (string) $size) + ->setHeader('Content-Security-Policy', "default-src 'self'") ->setBody($stream); }