From 0aa97324bf6e5625aa9d96ec4235f92641df105d Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Thu, 26 Jan 2023 14:13:24 +0530 Subject: [PATCH] fix: Fix Appsmith logo in emails (#20030) SVG images don't load correctly in emails, so we're switching back to PNG. Co-authored-by: Pawan Kumar --- app/client/src/ce/reducers/tenantReducer.ts | 2 +- app/client/src/utils/BrandingUtils.ts | 4 ++-- .../com/appsmith/server/services/ce/AssetServiceCEImpl.java | 1 - .../src/main/resources/email/forgotPasswordTemplate.html | 2 +- .../src/main/resources/email/inviteUserTemplate.html | 2 +- .../src/main/resources/email/welcomeUserTemplate.html | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/client/src/ce/reducers/tenantReducer.ts b/app/client/src/ce/reducers/tenantReducer.ts index f6aa54d923..c53762e26c 100644 --- a/app/client/src/ce/reducers/tenantReducer.ts +++ b/app/client/src/ce/reducers/tenantReducer.ts @@ -18,7 +18,7 @@ export const defaultBrandingConfig = { brandColors: { ...createBrandColorsFromPrimaryColor("#F86A2B"), }, - brandLogoUrl: "https://assets.appsmith.com/appsmith-logo.svg", + brandLogoUrl: "https://assets.appsmith.com/appsmith-logo-no-margin.png", }; export const initialState: TenantReduxState = { diff --git a/app/client/src/utils/BrandingUtils.ts b/app/client/src/utils/BrandingUtils.ts index d4a1b754bf..176bd55b79 100644 --- a/app/client/src/utils/BrandingUtils.ts +++ b/app/client/src/utils/BrandingUtils.ts @@ -64,7 +64,7 @@ export function createBrandColorsFromPrimaryColor( * * checks: * 1. file size max 2MB - * 2. file type - jpg, svg or png + * 2. file type - jpg, or png * * @param e * @param callback @@ -90,7 +90,7 @@ export const logoImageValidator = ( } // case 3: image selected - const validTypes = ["image/jpeg", "image/png", "image/svg+xml"]; + const validTypes = ["image/jpeg", "image/png"]; if (!validTypes.includes(file.type)) { Toaster.show({ diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AssetServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AssetServiceCEImpl.java index 99e8284815..a75a412200 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AssetServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/AssetServiceCEImpl.java @@ -42,7 +42,6 @@ public class AssetServiceCEImpl implements AssetServiceCE { private static final Set ALLOWED_CONTENT_TYPES = Set.of( MediaType.IMAGE_JPEG, MediaType.IMAGE_PNG, - MediaType.valueOf("image/svg+xml"), MediaType.valueOf("image/x-icon"), MediaType.valueOf("image/vnd.microsoft.icon") ); diff --git a/app/server/appsmith-server/src/main/resources/email/forgotPasswordTemplate.html b/app/server/appsmith-server/src/main/resources/email/forgotPasswordTemplate.html index d1c62dc3d0..c4ad264012 100644 --- a/app/server/appsmith-server/src/main/resources/email/forgotPasswordTemplate.html +++ b/app/server/appsmith-server/src/main/resources/email/forgotPasswordTemplate.html @@ -67,7 +67,7 @@
-
+

Password reset link for Appsmith apps

diff --git a/app/server/appsmith-server/src/main/resources/email/inviteUserTemplate.html b/app/server/appsmith-server/src/main/resources/email/inviteUserTemplate.html index d4fd133ec4..485e19b1bc 100644 --- a/app/server/appsmith-server/src/main/resources/email/inviteUserTemplate.html +++ b/app/server/appsmith-server/src/main/resources/email/inviteUserTemplate.html @@ -67,7 +67,7 @@
-
+

{{inviterFirstName}} has invited you to collaborate on the workspace "{{inviterWorkspaceName}}"

diff --git a/app/server/appsmith-server/src/main/resources/email/welcomeUserTemplate.html b/app/server/appsmith-server/src/main/resources/email/welcomeUserTemplate.html index ff6e06779f..42f9fe8ab0 100644 --- a/app/server/appsmith-server/src/main/resources/email/welcomeUserTemplate.html +++ b/app/server/appsmith-server/src/main/resources/email/welcomeUserTemplate.html @@ -218,7 +218,7 @@
-
+

Welcome to Appsmith